public class OCIConnectionPoolManagerImpl extends ResourcePoolManager implements ConnectionPoolManager
The OCIConnectionPoolManagerImpl acquires and releases JDBC connections from an OracleOCIConnectionPool. This pool manager should be used if the application requires JDBC/OCI features like middle tier authentication through proxy connections. Proxy authentication may be enabled with the following steps:
1. Grant "connect through" priveleges on the Oracle database to the proxied used. For example, if DB user mary is to use the authenticated credentials of DB user john then the following must be granted to mary:
      alter user mary grant connect through john;
   
 
 2.  Specify the proxy properties in the info properties that
   are passed to getConnection(String,String,Properties,String,String).
 Please see the OCI/JDBC application developer's guide for more information
 about different proxy types and their required properties.
 
 Proxy properties may be passed from a BC4J client to getConnection
 by implementing a EnvInfoProvider and
 declaring it to the framework.
 
In order to use the OCIConnectionPoolManagerImpl you must first declare it to the framework using a framework property. For example:
jbo.ConnectionPoolManager=oracle.jbo.server.OCIConnectionPoolManagerImpl
 Please see ConnectionPoolManager for more
 information about the ConnectionPoolManager interface.
mLock| Constructor and Description | 
|---|
| OCIConnectionPoolManagerImpl()Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addConnection(java.lang.String poolKey,
             java.sql.Connection connection)Adds a connection to a connection pool. | 
| protected void | createPoolMonitor() | 
| 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. | 
addResourcePool, classLoaderShuttingDown, destroy, getManagerInstance, getProperty, getResourcePool, getResourcePoolKeys, getResourcePools, getResourcePoolTimer, removePoolMonitor, removeResourcePool, wakeuppublic java.sql.Connection getConnection(java.lang.String poolKey,
                                java.lang.String url,
                                java.util.Properties info,
                                java.lang.String user,
                                java.lang.String password)
ConnectionPoolManagergetConnection in interface ConnectionPoolManagerpoolKey - 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)
ConnectionPoolManagerConnectionPoolManager.getConnection(String, String, Properties, String, String)getConnectionForInternalUse in interface ConnectionPoolManagerconnectionPoolKey - 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)
ConnectionPoolManagerThe 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 ConnectionPoolManagerpoolKey - 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)
ConnectionPoolManagerThe implementation of this operation should ensure that the returned connection does in fact belong to the specified connection pool.
returnConnection in interface ConnectionPoolManagerpoolKey - 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)
ConnectionPoolManagerThe 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 ConnectionPoolManagerpoolKey - 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)
ConnectionPoolManagerThe 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 ConnectionPoolManagerpoolKey - 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)
ConnectionPoolManagerremoveConnection in interface ConnectionPoolManagerpoolKey - 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)
ConnectionPoolManagergeneratePoolKey in interface ConnectionPoolManagerurl - 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)
ConnectionPoolManagergeneratePoolKey in interface ConnectionPoolManagerurl - 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()
ConnectionPoolManagerThe 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 ConnectionPoolManagerpublic int getMaxPoolSize()
ConnectionPoolManagerThe 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 ConnectionPoolManagerprotected int getMonitorSleepInterval()
ResourcePoolManagergetMonitorSleepInterval in class ResourcePoolManagerprotected void createPoolMonitor()
createPoolMonitor in class ResourcePoolManager