|
Problem(Abstract) |
The client application data for an IBM® WebSphere®
Application Server JDBC™ connection does not list WebSphere Application
Server as the application client using the JDBC connection. This occurs
when the connection is displayed using an IBM DB2® command to list all of
the active JDBC connections. |
|
|
|
Cause |
WebSphere Application Server V5.1 does not set the client
application information on DB2 connections. |
|
|
Resolving the
problem |
There are three possible solutions for this:
1. For the DB2 Universal driver, set the following custom property on the
data source. The value assigned to the property is what will be displayed
as the client application:
clientApplicationInformation
Since this property is set on the data source, every application that uses
this data source will return the same value, If you require a different
client application to be associated with the same DB2 database, you will
need to create a data source for each different client application and
specify the appropriate client in the clientApplicationInformation
property.
Note: the application name will show up implicitly as long as the
following trace is enabled:
WAS.clientinfo=all=enabled
2. For the DB2 CLI driver, in order to set client application data, it has
to be set in the db2cli.ini file.
To set it within db2cli.ini, include the following settings:
ClientApplName=<application name>
ClientUserID=<user id>
ClientWrkStnName=<workstation name>
ClientAcctStr=<accounting string>
For more information about the settings for these parameters, see the DB2
Information Center.
3. Use the jdbcCall feature of WebSphere Application Server to set the
client application information.
WSCallHelper.jdbcCall
(null,conn,"setDB2ClientApplicationInformation",new Object[]
{"JamieAPI"}, new Class[]
{String.class});
WSCallHelper.jdbcCall(null,conn,"setDB2ClientProgramId",new
Object[]{"JamiePN"}, new Class[] {String.class});
WSCallHelper.jdbcCall(null,conn,"setDB2ClientWorkstation",new
Object[]{"JamieWS"}, new Class[] {String.class});
WSCallHelper.jdbcCall(null,conn,"setDB2ClientApplicationInformation",new
Object[]{"JamieAPI"}, new Class[] {String.class});???
WSCallHelper.jdbcCall(null,conn,"setDB2ClientUser",new
Object[]{"JamieCU"}, new Class[] {String.class});
WSCallHelper.jdbcCall(null,conn,"setDB2ClientAccountingInformation",new
Object[]{new String("JamieAI")}, new Class[] {String.class}); |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|