Db2Connectionpooldatasource Class - IBM DB2 Manual

Table of Contents

Advertisement

DB2ConnectionPoolDataSource class

DB2ConnectionPoolDataSource is a factory for PooledConnection objects. An object
that implements this interface is registered with a naming service that is based on
the Java Naming and Directory Interface (JNDI).
The com.ibm.db2.jcc.DB2ConnectionPoolDataSource class extends the
com.ibm.db2.jcc.DB2BaseDataSource class, and implements the
javax.sql.ConnectionPoolDataSource, java.io.Serializable, and
javax.naming.Referenceable interfaces.
DB2ConnectionPoolDataSource properties
These properties are defined only for the IBM Data Server Driver for JDBC and
SQLJ. "Properties for the IBM Data Server Driver for JDBC and SQLJ" for
explanations of these properties.
These properties have a setXXX method to set the value of the property and a
getXXX method to retrieve the value. A setXXX method has this form:
void setProperty-name(data-type property-value)
A getXXX method has this form:
data-type getProperty-name()
Property-name is the unqualified property name, with the first character capitalized.
The following table lists the IBM Data Server Driver for JDBC and SQLJ properties
and their data types.
Table 86. DB2ConnectionPoolDataSource properties and their data types
Property name
com.ibm.db2.jcc.DB2ConnectionPoolDataSource.maxStatements
DB2ConnectionPoolDataSource methods
getDB2PooledConnection
Formats:
public DB2PooledConnection getDB2PooledConnection(String user,
String password,
java.util.Properties properties)
throws java.sql.SQLException
public DB2PooledConnection getDB2PooledConnection(
org.ietf.jgss.GSSCredential gssCredential,
java.util.Properties properties)
throws java.sql.SQLException
Establishes the initial untrusted connection in a heterogeneous pooling
environment.
The first form getDB2PooledConnection provides a user ID and password. The
second form of getDB2PooledConnection is for connections that use Kerberos
security.
Parameter descriptions:
user
The authorization ID that is used to establish the connection.
Chapter 7. JDBC and SQLJ reference information
Data type
int
341

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents