|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.pool.ResourcePoolManager | +--oracle.jbo.server.ConnectionPoolManagerImpl
Default BC4J implementation of the connection pool manager.
Fields inherited from class oracle.jbo.pool.ResourcePoolManager |
mLock |
Constructor Summary |
ConnectionPoolManagerImpl()
Constructor |
Method Summary |
Type | Method |
---|---|
void |
addConnection(java.lang.String poolKey,
java.sql.Connection connection)
Adds a connection to a connection pool. |
java.lang.String |
generatePoolKey(java.lang.String url,
java.util.Properties info)
Generates a unique pool identifier (poolKey) for the specified JDBC URL and JDBC driver properties. |
java.lang.String |
generatePoolKey(java.lang.String url,
java.lang.String user,
java.lang.String password)
Generates a unique pool identifier (poolKey) for the specified JDBC URL and JDBC driver properties. |
java.sql.Connection |
getConnection(java.lang.String poolKey,
java.lang.String url,
java.util.Properties info,
java.lang.String user,
java.lang.String password)
Returns a pooled connection from the specified target pool. |
int |
getInitPoolSize()
Returns the initial pool size for connection pools that are managed by this connection pool manager. |
int |
getMaxPoolSize()
Returns the maximum pool size for connection pools that are managed by this connection pool manager. |
protected int |
getMonitorSleepInterval()
Returns the interval in milliseconds for which the monitor daemon should sleep between wakeup requests. |
void |
removeConnection(java.lang.String poolKey,
java.sql.Connection connection)
Removes a pooled connection from a connection pool. |
void |
returnConnection(java.lang.String poolKey,
java.sql.Connection connection)
Returns a pooled connection to a connection pool. |
void |
returnConnection(java.lang.String poolKey,
java.sql.Connection connection,
java.util.Properties info)
Returns a pooled connection to a connection pool. |
Methods inherited from class oracle.jbo.pool.ResourcePoolManager |
addResourcePool, getManagerInstance, getResourcePool, getResourcePoolKeys, getResourcePoolMonitor, getResourcePools, removeResourcePool |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConnectionPoolManagerImpl()
Method Detail |
public java.sql.Connection getConnection(java.lang.String poolKey, java.lang.String url, java.util.Properties info, java.lang.String user, java.lang.String password)
ConnectionPoolManager
getConnection
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
connectionPoolKey
- a unique identifier for the target connection pool.url
- the JDBC url that will be used to create connections in this pool.info
- the JDBC properties that will be used
to create connections
in this pool.user
- the username that will be used for database authentication.password
- the password that will be used for database authentication.ConnectionPoolManager.generatePoolKey(String, Properties)
public void addConnection(java.lang.String poolKey, java.sql.Connection connection)
ConnectionPoolManager
The implementation of this method should not return the connection to the pool after the connection has been added, because the invoking object still holds a reference to that connection. Instead, it is recommended that returning the new connection be the responsibility of of the object that owns the initial reference to the connection.
addConnection
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
poolKey
- a unique identifier for the target connection pool.connection
- the connection that should be checked in.ConnectionPoolManager.returnConnection(String, Connection)
,
ConnectionPoolManager.generatePoolKey(String, Properties)
public void returnConnection(java.lang.String poolKey, java.sql.Connection connection)
ConnectionPoolManager
The implementation of this operation should ensure that the returned connection does in fact belong to the specified connection pool.
returnConnection
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
poolKey
- a unique identifier for the target connection pool.connection
- the connection that should be checked in.ConnectionPoolManager.generatePoolKey(String, Properties)
public void returnConnection(java.lang.String poolKey, java.sql.Connection connection, java.util.Properties info)
ConnectionPoolManager
The implementation of this operation should ensure that the returned connection does in fact belong to the specified connection pool.
The properties object that is passed to return connection may be used by custom connection pool managers that require the original JDBC context to return the connection to the appropriate pool.
returnConnection
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
poolKey
- a unique identifier for the target connection pool.connection
- the connection that should be checked in.info
- the JDBC context that was used when the connection was
acquired.ConnectionPoolManager.generatePoolKey(String, Properties)
public void removeConnection(java.lang.String poolKey, java.sql.Connection connection)
ConnectionPoolManager
removeConnection
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
poolKey
- a unique identifier for the target connection pool.connection
- the connection that should be checked in.ConnectionPoolManager.generatePoolKey(String, Properties)
public java.lang.String generatePoolKey(java.lang.String url, java.util.Properties info)
ConnectionPoolManager
generatePoolKey
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
url
- the JDBC url that will be used to create connections in this
pool.info
- the JDBC properties that will be used to create connections
in this pool.public java.lang.String generatePoolKey(java.lang.String url, java.lang.String user, java.lang.String password)
ConnectionPoolManager
generatePoolKey
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
url
- the JDBC url that will be used to create connections in this
pool.user
- the user that will be used for database authentication.password
- the password that will be used for database authentication.public int getInitPoolSize()
ConnectionPoolManager
The InitPoolSize is typically set as a JVM parameter (for example, java -Djbo.initpoolsize=2 myApplication note that lower case for the JVM parameter is required) or in the jboserver.properties file (for example, jbo.InitPoolSize=2 myApplication).
getInitPoolSize
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
public int getMaxPoolSize()
ConnectionPoolManager
The MaxPoolSize is typically set as a JVM parameter (for example, java -Djbo.maxpoolsize=10 myApplication note that lower case for the JVM parameter is required) or in the jboserver.properties file (for example, jbo.MaxPoolSize=10 myApplication).
The maximum number of connections supported by a particular driver should be documented with the driver. The default MaxPoolSize is set high enough so that the driver's maximum number of connections will be reached before the default MaxPoolSize is reached.
getMaxPoolSize
in interface ConnectionPoolManager
oracle.jbo.server.ConnectionPoolManager
protected int getMonitorSleepInterval()
oracle.jbo.pool.ResourcePoolManager
getMonitorSleepInterval
in class oracle.jbo.pool.ResourcePoolManager
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |