IBM DB2 Manual page 362

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
|
|
|
|
346
Application Programming Guide and Reference for Java
IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for z/OS
v
Version 9.1 or later
DB2PooledConnection methods
The following methods are defined only for the IBM Data Server Driver for JDBC
and SQLJ.
getConnection (untrusted or trusted reuse without reauthentication)
Format:
public DB2Connection getConnection()
throws java.sql.SQLException
This method is for dirty reuse of a connection. This means that the connection
state is not reset when the object is reused from the pool. Special register
settings and property settings remain in effect unless they are overridden by
passed properties. Global temporary tables are not deleted. Properties that are
not specified are not re-initialized. All JDBC standard transient properties, such
as the isolation level, autocommit mode, and read-only mode are reset to their
JDBC defaults. Certain properties, such as user, password, databaseName,
serverName, portNumber, planName, and pkList remain unchanged.
getDB2Connection (trusted reuse)
Formats:
public DB2Connection getDB2Connection(byte[] cookie,
String user,
String password,
String userRegistry,
byte[] userSecToken,
String originalUser,
java.util.Properties properties)
throws java.sql.SQLException
public Connection getDB2Connection(byte[] cookie,
org.ietf.GSSCredential gssCredential,
String usernameRegistry,
byte[] userSecToken,
String originalUser,
java.util.Properties properties)
throws java.sql.SQLException
Switches the user that is associated with a trusted connection without
authentication.
The second form of getDB2Connection is supported only for IBM Data Server
Driver for JDBC and SQLJ type 4 connectivity.
Parameter descriptions:
cookie
A unique cookie that the JDBC driver generates for the Connection
instance. The cookie is known only to the application server and the
underlying JDBC driver that established the initial trusted connection. The
application server passes the cookie that was created by the driver when
the pooled connection instance was created. The JDBC driver checks that
the supplied cookie matches the cookie of the underlying trusted physical
connection to ensure that the request originated from the application server
that established the trusted physical connection. If the cookies match, the
connection can become available, with different properties, for immediate
use by a new user .

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents