|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jbo.pool.ResourcePoolManager
oracle.jbo.server.ConnectionPoolManagerImpl
public class ConnectionPoolManagerImpl
Default BC4J implementation of the connection pool manager.
Field Summary |
---|
Fields inherited from class oracle.jbo.pool.ResourcePoolManager |
---|
mLock |
Constructor Summary | |
---|---|
ConnectionPoolManagerImpl() Constructor |
Method Summary | |
---|---|
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. |
java.sql.Connection |
getConnectionForInternalUse(java.lang.String connectionPoolKey, 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. |
void |
returnConnectionForInternalUse(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, classLoaderShuttingDown, createPoolMonitor, destroy, getManagerInstance, getProperty, getResourcePool, getResourcePoolKeys, getResourcePools, getResourcePoolTimer, removePoolMonitor, 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
poolKey
- 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 java.sql.Connection getConnectionForInternalUse(java.lang.String connectionPoolKey, java.lang.String url, java.util.Properties info, java.lang.String user, java.lang.String password)
ConnectionPoolManager
ConnectionPoolManager.getConnection(String, String, Properties, String, String)
getConnectionForInternalUse
in interface 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
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
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
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 returnConnectionForInternalUse(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.
This method is invoked when the BC4J framework is releasing a JDBC connection instance which was used internally. The method is provided for applications with special handling requirements for internal connections. Internal connections may be required by BC4J to support the failover and spill to disk features of the BC4J framework. Most applications may delegate the implementation of this method to ConnectionPoolManager.returnConnection(String, Connection, Properties)
.
returnConnectionForInternalUse
in interface 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
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
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
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
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
protected int getMonitorSleepInterval()
ResourcePoolManager
getMonitorSleepInterval
in class ResourcePoolManager
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |