|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.u2.jdbcx.UniJDBCCoreDataSource | +--com.ibm.u2.jdbcx.UniJDBCConnectionPoolDataSource
UniJDBCConnectionPoolDataSource is the IBM Universe/Unidata implemenation of javax.sql.ConnectionPoolDataSource. This class is embedded in the datasource that implements connection pooling.
DataSource
,
ConnectionPoolDataSource
,
UniJDBCCoreDataSource
, Serialized FormFields inherited from class com.ibm.u2.jdbcx.UniJDBCCoreDataSource |
DSProperties, mMsgFactory, password, user, value |
Constructor Summary | |
UniJDBCConnectionPoolDataSource()
Contructor. |
Method Summary | |
protected boolean |
checkIsDirect()
checkIsDirect -- check if the protocol is DirectProtocol once per CPDS |
protected void |
checkMaxConnections()
enforce IBM_CPM_MAX_CONNECTIONS This is NOT synchronized; you may have to do so if necessary. |
protected int |
getConnectionCount()
get the count of connections allocated by the "DB server". |
int |
getInitialPoolSize()
IBM_CPM_INIT_POOLSIZE = initialPoolSize JDBC3.0 compliance |
int |
getMaxIdleTime()
IBM_CPM_AGELIMIT = maxIdleTime JDBC3.0 compliance |
int |
getMaxPoolSize()
IBM_CPM_MAX_POOLSIZE = maxPoolSize JDBC3.0 compliance |
int |
getMaxStatements()
getmaxStatements: Not implemented for JDBC 2.30 |
int |
getMinPoolSize()
IBM_CPM_MIN_POOLSIZE = minPoolSize JDBC3.0 compliance |
javax.sql.PooledConnection |
getPooledConnection()
Attempt to establish a database connection. |
javax.sql.PooledConnection |
getPooledConnection(java.lang.String luser,
java.lang.String lpassword)
Attempt to establish a database connection. |
javax.sql.PooledConnection |
getPooledConnection(java.lang.String luser,
java.lang.String lpassword,
com.ibm.u2.jdbcx.UniJDBCConnectionEventListener listener)
Attempt to establish a database connection. |
int |
getPropertyCycle()
|
javax.naming.Reference |
getReference()
Make a reference to this UniJDBCConnectionPooledDataSource. |
protected java.lang.reflect.Constructor |
getReUsableCons()
getReUsableCons -- get the directReUsableConstructor |
long |
getUniJDBCCPMAgeLimit()
Gets the life span of a connection in the Pool . |
int |
getUniJDBCCPMInitPoolSize()
gets the initial number of connections to preallocate for the Pool Default is 0. |
int |
getUniJDBCCPMMaxConnections()
gets the limit for the maximum number of connections Default is -1, meaning no limit restriction. |
int |
getUniJDBCCPMMaxPoolSize()
gets the high water mark for the Pool. |
long |
getUniJDBCCPMMinAgeLimit()
Gets the ageLimit for connections under the minimum level Default is -1, means it lives indefinitely 0, means it lives as long as the other free connections |
int |
getUniJDBCCPMMinPoolSize()
gets the minimum connections to maintain in the Pool. |
long |
getUniJDBCCPMServiceInterval()
Gets the Pool service interval in milliseconds. |
protected void |
incConnectionCount(int amount)
increment/decrement the count of connections from the server. |
void |
setInitialPoolSize(int init)
IBM_CPM_INIT_POOLSIZE = initialPoolSize JDBC3.0 compliance |
void |
setMaxIdleTime(int ageLimit)
IBM_CPM_AGELIMIT = maxIdleTime JDBC3.0 compliance |
void |
setMaxPoolSize(int max)
IBM_CPM_MAX_POOLSIZE = maxPoolSize JDBC3.0 compliance |
void |
setMaxStatements(int limit)
maxStatements - This is a parameter for statement pooling and is not implemented for JDBC 2.30 |
void |
setMinPoolSize(int min)
IBM_CPM_MIN_POOLSIZE = minPoolSize JDBC3.0 compliance |
void |
setPropertyCycle(int cyc)
|
protected void |
setReUsableCons(java.lang.reflect.Constructor cons)
setReUsableCons -- set the directReUsableConstructor |
void |
setUniJDBCCPMAgeLimit(long ageLimit)
Sets the property IBM_CPM_AGELIMIT The value limits the life of a connection in the pool. |
void |
setUniJDBCCPMInitPoolSize(int init)
Sets the property IBM_CPM_INIT_POOLSIZE The value is the initial number of connections to preallocate for the Pool. |
void |
setUniJDBCCPMMaxConnections(int limit)
Sets the property IBM_CPM_MAX_CONNECTIONS The value is the maximum limit to the total number of Server connections for the Connection Pool Datasource. |
void |
setUniJDBCCPMMaxPoolSize(int max)
Sets the property IBM_CPM_MAX_POOLSIZE The value is the high-water mark for the Pool. |
void |
setUniJDBCCPMMinAgeLimit(long ageLimit)
Sets the property IBM_CPM_MIN_AGELIMIT The value is length of time in seconds in which connections under the minimum level are maintained. |
void |
setUniJDBCCPMMinPoolSize(int min)
Sets the property IBM_CPM_MIN_POOLSIZE The value is the minimum number of connections to maintain in the free Pool. |
void |
setUniJDBCCPMServiceInterval(long interval)
Sets the property IBM_CPM_SERVICE_INTERVAL The value is service interval in milliseconds in which the Pool Service thread will pause in between operations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.ConnectionPoolDataSource |
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
public UniJDBCConnectionPoolDataSource()
Method Detail |
protected void setReUsableCons(java.lang.reflect.Constructor cons)
protected java.lang.reflect.Constructor getReUsableCons()
public javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException
Attempt to establish a database connection.
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
- if a database-access error occurs.
NEVER USEDpublic javax.sql.PooledConnection getPooledConnection(java.lang.String luser, java.lang.String lpassword) throws java.sql.SQLException
Attempt to establish a database connection.
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
user
- the database user on whose behalf the Connection is being madepassword
- the user's passwordjava.sql.SQLException
- if a database-access error occurs.
DOES NOT APPEAR TO BE USEDpublic javax.sql.PooledConnection getPooledConnection(java.lang.String luser, java.lang.String lpassword, com.ibm.u2.jdbcx.UniJDBCConnectionEventListener listener) throws java.sql.SQLException
Attempt to establish a database connection.
user
- the database user on whose behalf the Connection is being madepassword
- the user's passwordlistener
- the event listener.java.sql.SQLException
- if a database-access error occurs.protected void checkMaxConnections() throws java.sql.SQLException
enforce IBM_CPM_MAX_CONNECTIONS This is NOT synchronized; you may have to do so if necessary.
java.sql.SQLException
- ifprotected void incConnectionCount(int amount)
increment/decrement the count of connections from the server. This is NOT synchronized; you have to do so if necessary.
amount
- is the number to add or subtractprotected int getConnectionCount()
get the count of connections allocated by the "DB server". Note: be aware that multiple client threads may be running asynchronously to get or close connections! You will have to block them if necessary.
public javax.naming.Reference getReference() throws javax.naming.NamingException
Make a reference to this UniJDBCConnectionPooledDataSource. (see similar comments in UniJDBCDataSource)
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
- if error occurs in getting the reference.public void setUniJDBCCPMMaxConnections(int limit)
limit
- is the maximum connections allowed for the CPDS .public void setMaxStatements(int limit) throws java.sql.SQLException
public int getUniJDBCCPMMaxConnections()
public int getMaxStatements() throws java.sql.SQLException
public void setUniJDBCCPMInitPoolSize(int init)
init
- is the number of initial connectionspublic void setInitialPoolSize(int init)
public int getUniJDBCCPMInitPoolSize()
public int getInitialPoolSize()
public void setUniJDBCCPMMaxPoolSize(int max)
max
- is the maximum connections to keep in the Pool.public void setMaxPoolSize(int max)
public int getUniJDBCCPMMaxPoolSize()
public int getMaxPoolSize()
public void setUniJDBCCPMMinPoolSize(int min)
min
- is the minimum connections to maintain in the Pool.public void setMinPoolSize(int min)
public int getUniJDBCCPMMinPoolSize()
public int getMinPoolSize()
public void setUniJDBCCPMMinAgeLimit(long ageLimit)
ageLimit
- is the time in seconds.public long getUniJDBCCPMMinAgeLimit()
public void setUniJDBCCPMAgeLimit(long ageLimit)
ageLimit
- is the time in seconds.public void setMaxIdleTime(int ageLimit)
public long getUniJDBCCPMAgeLimit()
public int getMaxIdleTime()
public void setPropertyCycle(int cyc) throws java.sql.SQLException
public int getPropertyCycle() throws java.sql.SQLException
public void setUniJDBCCPMServiceInterval(long interval)
interval
- the service interval in milliseconds.public long getUniJDBCCPMServiceInterval()
protected boolean checkIsDirect()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |