Implicitly set client information

If you track client information in your database, you can choose one of two ways to pass WebSphere Application Server client data on database connections.

You can choose to explicitly pass the information on connections by calling an IBM proprietary API, setClientInformation(Properties), on the com.ibm.websphere.rsadapter.WSConnection object within your application code.

In some cases, however, you might want WebSphere Application Server to handle the passing of client information to database connections. This method of setting the client information is referred to as implicit. You might choose the implicit method because:

The WebSphere Application Server trace facility provides the capability for setting client information implicitly. You can designate one of two special trace groups to enable or disable client information passing: WAS.clientinfo trace or WAS.clientinfopluslogging trace.

Possible run-time scenarios

WAS.clientinfo trace

By default, the implicit mechanism is disabled. You can turn on this mechanism dynamically, without stopping and starting your application server, or statically by setting the WebSphere Application Server trace group WAS.clientinfo=all=enabled.

[AIX HP-UX Linux Solaris Windows] The information implicitly collected and set on the database connection consists of the user name, user location and application name.

[z/OS] The information implicitly collected and set on the database connection consists of the thread ID, user name, user location, and application name.

Important: User name and user location can only be implicitly collected and set on the database connection if you enable global security.
thread ID [z/OS]
An eight-character hexadecimal value that identifies the Java thread that controls the processing of the application request within WebSphere Application Server. This ID is displayed in the trace header.
user name
The name of the user that initiates the application request. This option is collected and passed to the backend database (when supported). Information here is collected by calling the WSSecurityHelper.getFirstCaller method.
user location
The name of the location of the user, in the form of cell:node:server. This option is collected and passed to the backend database (when appropriate). Information here is collected by calling the WSSecurityHelper.getFirstServer method.
application name
The name of the application running. This value is the output of the getApplication method from the J2EEName object. This value is collected regardless of the Global Security setting.

WAS.clientinfopluslogging trace

When debugging database problems, such as deadlocks, there is a set of information that is needed to help with the debugging effort. This information is typically obtained by enabling a WebSphere Relational Resource Adapter (RRA) trace, and an Enterprise JavaBean (EJB) container trace. However, there are some cases where timing is an issue when reproducing a given problem. Having too much tracing information can alter the behavior of the application, such as change the timing, and the problem might no longer occur.

Because of this situation, a new trace group is provided where only a minimum set of information is collected. This trace group is WAS.clientinfopluslogging. This function sets the client information implicitly on the connection, just like the WAS.clientinfo trace, as well as logs and traces important application activities. Those activities are:
  • SQL Strings that are run (such as, select userId from tabl1 where id=? for update).
  • Start, commit, and rollback of transactions.
  • EJB calls (such as, Create, Remove, findByPrimaryKey, and so on).



Related tasks
Setting client information traces with the administrative console
Reference topic    

Terms of Use | Feedback

Last updated: Aug 29, 2010 9:31:45 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=vela&product=was-nd-mp&topic=rdat_impclientinfo
File name: rdat_impclientinfo.html