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