org.apache.commons.dbcp
public class PoolableConnectionFactory extends Object implements PoolableObjectFactory
Version: $Revision: 1.23 $ $Date: 2004/06/09 18:21:23 $
Constructor Summary | |
---|---|
PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit)
Create a new PoolableConnectionFactory. | |
PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation)
Create a new PoolableConnectionFactory. | |
PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, AbandonedConfig config)
Create a new PoolableConnectionFactory. | |
PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, AbandonedConfig config)
Create a new PoolableConnectionFactory. | |
PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
Create a new PoolableConnectionFactory. | |
PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, Boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
Create a new PoolableConnectionFactory. |
Method Summary | |
---|---|
void | activateObject(Object obj) |
void | destroyObject(Object obj) |
ObjectPool | getPool() |
Object | makeObject() |
void | passivateObject(Object obj) |
void | setConnectionFactory(ConnectionFactory connFactory)
Sets the {@link ConnectionFactory} from which to obtain base {@link Connection}s. |
void | setDefaultAutoCommit(boolean defaultAutoCommit)
Sets the default "auto commit" setting for borrowed {@link Connection}s |
void | setDefaultCatalog(String defaultCatalog)
Sets the default "catalog" setting for borrowed {@link Connection}s |
void | setDefaultReadOnly(boolean defaultReadOnly)
Sets the default "read only" setting for borrowed {@link Connection}s |
void | setDefaultTransactionIsolation(int defaultTransactionIsolation)
Sets the default "Transaction Isolation" setting for borrowed {@link Connection}s |
void | setPool(ObjectPool pool)
Sets the {@link ObjectPool} in which to pool {@link Connection}s. |
void | setStatementPoolFactory(KeyedObjectPoolFactory stmtPoolFactory)
Sets the {@link KeyedObjectPoolFactory} I use to create {@link KeyedObjectPool}s
for pooling {@link java.sql.PreparedStatement}s.
|
void | setValidationQuery(String validationQuery)
Sets the query I use to {@link #validateObject validate} {@link Connection}s.
|
void | validateConnection(Connection conn) |
boolean | validateObject(Object obj) |
Parameters: connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s pool the {@link ObjectPool} in which to pool those {@link Connection}s stmtPoolFactory the {@link KeyedObjectPoolFactory} to use to create {@link KeyedObjectPool}s for pooling {@link java.sql.PreparedStatement}s, or null to disable {@link java.sql.PreparedStatement} pooling validationQuery a query to use to {@link #validateObject validate} {@link Connection}s. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed {@link Connection}s defaultAutoCommit the default "auto commit" setting for returned {@link Connection}s
Parameters: connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s pool the {@link ObjectPool} in which to pool those {@link Connection}s stmtPoolFactory the {@link KeyedObjectPoolFactory} to use to create {@link KeyedObjectPool}s for pooling {@link java.sql.PreparedStatement}s, or null to disable {@link java.sql.PreparedStatement} pooling validationQuery a query to use to {@link #validateObject validate} {@link Connection}s. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed {@link Connection}s defaultAutoCommit the default "auto commit" setting for returned {@link Connection}s defaultTransactionIsolation the default "Transaction Isolation" setting for returned {@link Connection}s
Deprecated: AbandonedConfig is now deprecated.
Create a new PoolableConnectionFactory.Parameters: connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s pool the {@link ObjectPool} in which to pool those {@link Connection}s stmtPoolFactory the {@link KeyedObjectPoolFactory} to use to create {@link KeyedObjectPool}s for pooling {@link java.sql.PreparedStatement}s, or null to disable {@link java.sql.PreparedStatement} pooling validationQuery a query to use to {@link #validateObject validate} {@link Connection}s. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed {@link Connection}s defaultAutoCommit the default "auto commit" setting for returned {@link Connection}s config the AbandonedConfig if tracing SQL objects
Deprecated: AbandonedConfig is now deprecated.
Create a new PoolableConnectionFactory.Parameters: connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s pool the {@link ObjectPool} in which to pool those {@link Connection}s stmtPoolFactory the {@link KeyedObjectPoolFactory} to use to create {@link KeyedObjectPool}s for pooling {@link java.sql.PreparedStatement}s, or null to disable {@link java.sql.PreparedStatement} pooling validationQuery a query to use to {@link #validateObject validate} {@link Connection}s. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed {@link Connection}s defaultAutoCommit the default "auto commit" setting for returned {@link Connection}s defaultTransactionIsolation the default "Transaction Isolation" setting for returned {@link Connection}s config the AbandonedConfig if tracing SQL objects
Deprecated: AbandonedConfig is now deprecated.
Create a new PoolableConnectionFactory.Parameters: connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s pool the {@link ObjectPool} in which to pool those {@link Connection}s stmtPoolFactory the {@link KeyedObjectPoolFactory} to use to create {@link KeyedObjectPool}s for pooling {@link java.sql.PreparedStatement}s, or null to disable {@link java.sql.PreparedStatement} pooling validationQuery a query to use to {@link #validateObject validate} {@link Connection}s. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed {@link Connection}s defaultAutoCommit the default "auto commit" setting for returned {@link Connection}s defaultTransactionIsolation the default "Transaction Isolation" setting for returned {@link Connection}s defaultCatalog the default "catalog" setting for returned {@link Connection}s config the AbandonedConfig if tracing SQL objects
Parameters: connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s pool the {@link ObjectPool} in which to pool those {@link Connection}s stmtPoolFactory the {@link KeyedObjectPoolFactory} to use to create {@link KeyedObjectPool}s for pooling {@link java.sql.PreparedStatement}s, or null to disable {@link java.sql.PreparedStatement} pooling validationQuery a query to use to {@link #validateObject validate} {@link Connection}s. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed {@link Connection}s defaultAutoCommit the default "auto commit" setting for returned {@link Connection}s defaultTransactionIsolation the default "Transaction Isolation" setting for returned {@link Connection}s defaultCatalog the default "catalog" setting for returned {@link Connection}s config the AbandonedConfig if tracing SQL objects
Parameters: connFactory the {@link ConnectionFactory} from which to obtain base {@link Connection}s
Parameters: defaultAutoCommit the default "auto commit" setting for borrowed {@link Connection}s
Parameters: defaultCatalog the default "catalog" setting for borrowed {@link Connection}s
Parameters: defaultReadOnly the default "read only" setting for borrowed {@link Connection}s
Parameters: defaultTransactionIsolation the default "Transaction Isolation" setting for returned {@link Connection}s
Parameters: pool the {@link ObjectPool} in which to pool those {@link Connection}s
Parameters: stmtPoolFactory the {@link KeyedObjectPoolFactory} to use to create {@link KeyedObjectPool}s for pooling {@link java.sql.PreparedStatement}s
Parameters: validationQuery a query to use to {@link #validateObject validate} {@link Connection}s.