My Oracle Support Banner

UCP connection.close Does Not Clear ClientId, Module, Action Attributes In V$SESSION Using connection.setClientInfo Method (Doc ID 2487572.1)

Last updated on JULY 21, 2023

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


On : version, Thin JDBC driver

When setting CLIENTID, MODULE, ACTION to null before closing JDBC UCP connection and returning to connection pool, the attributes are not reset in V$SESSION view.

This causes issues with tools that report data based on these attributes such as OEM, as well as when using DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE and DBMS_MONITOR.SERV_MOD_ACT_TRACE_ENABLE procedures. For example, when resetting the attributes to null and returning to the connection pool, tracing should automatically be disabled for the session if set using DBMS_MONITOR. However, since these attributes are not reset, this does not occur. In addition, monitoring tools will display incorrect information because the attributes still exist in V$SESSION though the connection is really not actively being used to carry out work for the related CLIENTID, MODULE, ACTION.

It is expected to have those properties be set to null.

The issue can be reproduced at will with the following steps:
1. Use the next java program:

Executing the above after the attributes have been set to null and the connection returned to the pool will show that CLIENTID, ACTION, MODULE are still set for the session.




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.