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 ConnectionFactory from which to obtain base Connections. |
void | setDefaultAutoCommit(boolean defaultAutoCommit)
Sets the default "auto commit" setting for borrowed Connections |
void | setDefaultCatalog(String defaultCatalog)
Sets the default "catalog" setting for borrowed Connections |
void | setDefaultReadOnly(boolean defaultReadOnly)
Sets the default "read only" setting for borrowed Connections |
void | setDefaultTransactionIsolation(int defaultTransactionIsolation)
Sets the default "Transaction Isolation" setting for borrowed Connections |
void | setPool(ObjectPool pool)
Sets the ObjectPool in which to pool Connections. |
void | setStatementPoolFactory(KeyedObjectPoolFactory stmtPoolFactory)
Sets the KeyedObjectPoolFactory I use to create KeyedObjectPools
for pooling java.sql.PreparedStatements.
|
void | setValidationQuery(String validationQuery)
Sets the query I use to validate Connections.
|
void | validateConnection(Connection conn) |
boolean | validateObject(Object obj) |
Parameters: connFactory the ConnectionFactory from which to obtain base Connections pool the ObjectPool in which to pool those Connections stmtPoolFactory the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling java.sql.PreparedStatements, or null to disable java.sql.PreparedStatement pooling validationQuery a query to use to validate
Connections. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed Connections defaultAutoCommit the default "auto commit" setting for returned Connections
Parameters: connFactory the ConnectionFactory from which to obtain base Connections pool the ObjectPool in which to pool those Connections stmtPoolFactory the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling java.sql.PreparedStatements, or null to disable java.sql.PreparedStatement pooling validationQuery a query to use to validate
Connections. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed Connections defaultAutoCommit the default "auto commit" setting for returned Connections defaultTransactionIsolation the default "Transaction Isolation" setting for returned Connections
Deprecated: AbandonedConfig is now deprecated.
Create a new PoolableConnectionFactory.Parameters: connFactory the ConnectionFactory from which to obtain base Connections pool the ObjectPool in which to pool those Connections stmtPoolFactory the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling java.sql.PreparedStatements, or null to disable java.sql.PreparedStatement pooling validationQuery a query to use to validate
Connections. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed Connections defaultAutoCommit the default "auto commit" setting for returned Connections config the AbandonedConfig if tracing SQL objects
Deprecated: AbandonedConfig is now deprecated.
Create a new PoolableConnectionFactory.Parameters: connFactory the ConnectionFactory from which to obtain base Connections pool the ObjectPool in which to pool those Connections stmtPoolFactory the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling java.sql.PreparedStatements, or null to disable java.sql.PreparedStatement pooling validationQuery a query to use to validate
Connections. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed Connections defaultAutoCommit the default "auto commit" setting for returned Connections defaultTransactionIsolation the default "Transaction Isolation" setting for returned Connections config the AbandonedConfig if tracing SQL objects
Deprecated: AbandonedConfig is now deprecated.
Create a new PoolableConnectionFactory.Parameters: connFactory the ConnectionFactory from which to obtain base Connections pool the ObjectPool in which to pool those Connections stmtPoolFactory the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling java.sql.PreparedStatements, or null to disable java.sql.PreparedStatement pooling validationQuery a query to use to validate
Connections. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed Connections defaultAutoCommit the default "auto commit" setting for returned Connections defaultTransactionIsolation the default "Transaction Isolation" setting for returned Connections defaultCatalog the default "catalog" setting for returned Connections config the AbandonedConfig if tracing SQL objects
Parameters: connFactory the ConnectionFactory from which to obtain base Connections pool the ObjectPool in which to pool those Connections stmtPoolFactory the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling java.sql.PreparedStatements, or null to disable java.sql.PreparedStatement pooling validationQuery a query to use to validate
Connections. Should return at least one row. Using null turns off validation. defaultReadOnly the default "read only" setting for borrowed Connections defaultAutoCommit the default "auto commit" setting for returned Connections defaultTransactionIsolation the default "Transaction Isolation" setting for returned Connections defaultCatalog the default "catalog" setting for returned Connections config the AbandonedConfig if tracing SQL objects
Parameters: connFactory the ConnectionFactory from which to obtain base Connections
Parameters: defaultAutoCommit the default "auto commit" setting for borrowed Connections
Parameters: defaultCatalog the default "catalog" setting for borrowed Connections
Parameters: defaultReadOnly the default "read only" setting for borrowed Connections
Parameters: defaultTransactionIsolation the default "Transaction Isolation" setting for returned Connections
Parameters: pool the ObjectPool in which to pool those Connections
Parameters: stmtPoolFactory the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling java.sql.PreparedStatements
validate
Connections.
Should return at least one row.
Using null turns off validation.Parameters: validationQuery a query to use to validate
Connections.