| |
|
| java.lang.Object org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
Inner Class :class ConPoolFactory extends DriverManagerConnectionFactory | |
PARAM_NAME_POOL_STATEMENTS | final public static String PARAM_NAME_POOL_STATEMENTS(Code) | | |
PARAM_NAME_STATEMENT_POOL_MAX_TOTAL | final public static String PARAM_NAME_STATEMENT_POOL_MAX_TOTAL(Code) | | |
PARAM_NAME_UNWRAP_ALLOWED | final public static String PARAM_NAME_UNWRAP_ALLOWED(Code) | | |
createConnectionFactory | protected org.apache.commons.dbcp.ConnectionFactory createConnectionFactory(JdbcConnectionDescriptor jcd)(Code) | | Creates a DriverManager-based ConnectionFactory for creating the Connection
instances to feed into the object pool of the specified jcd-alias.
NB! If you override this method to specify your own ConnectionFactory
you must make sure that you follow OJB's lifecycle contract defined in the
org.apache.ojb.broker.platforms.Platform API - ie that you call
initializeJdbcConnection when a new Connection is created. For convenience, use
ConnectionFactoryAbstractImpl.initializeJdbcConnection instead of Platform call.
The above is automatically true if you re-use the inner class
ConPoolFactory below and just override this method for additional user-defined "tweaks".
Parameters: jcd - the jdbc-connection-alias for which we are creating a ConnectionFactory a DriverManager-based ConnectionFactory that creates Connection instancesusing DriverManager, and that follows the lifecycle contract defined in OJBorg.apache.ojb.broker.platforms.Platform API. |
createConnectionPool | protected ObjectPool createConnectionPool(GenericObjectPool.Config config, AbandonedConfig ac)(Code) | | |
getDataSource | protected DataSource getDataSource(JdbcConnectionDescriptor jcd) throws LookupException(Code) | | Returns the DBCP DataSource for the specified connection descriptor,
after creating a new DataSource if needed.
Parameters: jcd - the descriptor for which to return a DataSource a DataSource, after creating a new pool if needed.Guaranteed to never be null. throws: LookupException - if pool is not in cache and cannot be created |
releaseAllResources | public void releaseAllResources()(Code) | | Closes all managed pools.
|
setupPool | protected ObjectPool setupPool(JdbcConnectionDescriptor jcd)(Code) | | Returns a new ObjectPool for the specified connection descriptor.
Override this method to setup your own pool.
Parameters: jcd - the connection descriptor for which to set up the pool a newly created object pool |
wrapAsDataSource | protected DataSource wrapAsDataSource(JdbcConnectionDescriptor jcd, ObjectPool connectionPool)(Code) | | Wraps the specified object pool for connections as a DataSource.
Parameters: jcd - the OJB connection descriptor for the pool to be wrapped Parameters: connectionPool - the connection pool to be wrapped a DataSource attached to the connection pool.Connections will be wrapped using DBCP PoolGuard, that will not allowunwrapping unless the "accessToUnderlyingConnectionAllowed=true" configurationis specified. |
|
|
|