| java.lang.Object org.apache.commons.dbcp.datasources.CPDSConnectionFactory
CPDSConnectionFactory | class CPDSConnectionFactory implements PoolableObjectFactory,ConnectionEventListener(Code) | | A
PoolableObjectFactory that creates
PoolableConnection s.
author: John D. McNally version: $Revision: 479137 $ $Date: 2006-11-25 08:51:48 -0700 (Sat, 25 Nov 2006) $ |
_pool | protected ObjectPool _pool(Code) | | |
_rollbackAfterValidation | protected boolean _rollbackAfterValidation(Code) | | |
CPDSConnectionFactory | public CPDSConnectionFactory(ConnectionPoolDataSource cpds, ObjectPool pool, String validationQuery, String username, String password)(Code) | | Create a new PoolableConnectionFactory.
Parameters: cpds - the ConnectionPoolDataSource from which to obtainPooledConnection's Parameters: pool - the ObjectPool in which to pool thoseConnections Parameters: validationQuery - a query to use to CPDSConnectionFactory.validateObject validateConnections. Should return at least one row. May be null Parameters: username - Parameters: password - |
connectionClosed | public void connectionClosed(ConnectionEvent event)(Code) | | This will be called if the Connection returned by the getConnection
method came from a PooledConnection, and the user calls the close()
method of this connection object. What we need to do here is to
release this PooledConnection from our pool...
|
connectionErrorOccurred | public void connectionErrorOccurred(ConnectionEvent event)(Code) | | If a fatal error occurs, close the underlying physical connection so as
not to be returned in the future
|
getPool | public ObjectPool getPool()(Code) | | |
passivateObject | public void passivateObject(Object obj)(Code) | | |
setCPDS | public synchronized void setCPDS(ConnectionPoolDataSource cpds)(Code) | | Sets the {*link ConnectionFactory} from which to obtain base
{*link Connection}s.
Parameters: connFactory - the {*link ConnectionFactory} from which to obtainbase {*link Connection}s |
setPool | public synchronized void setPool(ObjectPool pool) throws SQLException(Code) | | Sets the {*link ObjectPool} in which to pool {*link Connection}s.
Parameters: pool - the {*link ObjectPool} in which to pool those{*link Connection}s |
setRollbackAfterValidation | public synchronized void setRollbackAfterValidation(boolean rollbackAfterValidation)(Code) | | Sets whether a rollback should be issued after
{*link #validateObject validating}
{*link Connection}s.
Parameters: rollbackAfterValidation - whether a rollback should be issued after{*link #validateObject validating} {*link Connection}s. |
setValidationQuery | public synchronized void setValidationQuery(String validationQuery)(Code) | | Sets the query I use to {*link #validateObject validate}
{*link Connection}s.
Should return at least one row.
May be null
Parameters: validationQuery - a query to use to {*link #validateObject validate}{*link Connection}s. |
validateObject | public boolean validateObject(Object obj)(Code) | | |
|
|