|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.dbcp.PoolableConnectionFactory
public class PoolableConnectionFactory
A PoolableObjectFactory
that creates
PoolableConnection
s.
Field Summary | |
---|---|
protected AbandonedConfig |
_config
Configuration for removing abandoned connections. |
protected Collection |
_connectionInitSqls
|
protected ConnectionFactory |
_connFactory
|
protected boolean |
_defaultAutoCommit
|
protected String |
_defaultCatalog
|
protected Boolean |
_defaultReadOnly
|
protected int |
_defaultTransactionIsolation
|
protected ObjectPool |
_pool
|
protected KeyedObjectPoolFactory |
_stmtPoolFactory
|
protected String |
_validationQuery
|
protected int |
_validationQueryTimeout
|
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,
AbandonedConfig config)
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,
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. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
Collection connectionInitSqls,
boolean defaultReadOnly,
boolean defaultAutoCommit)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
Collection connectionInitSqls,
boolean defaultReadOnly,
boolean defaultAutoCommit,
int defaultTransactionIsolation)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
Collection connectionInitSqls,
Boolean defaultReadOnly,
boolean defaultAutoCommit,
int defaultTransactionIsolation,
String defaultCatalog,
AbandonedConfig config)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
int validationQueryTimeout,
boolean defaultReadOnly,
boolean defaultAutoCommit)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
int validationQueryTimeout,
boolean defaultReadOnly,
boolean defaultAutoCommit,
int defaultTransactionIsolation)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
int validationQueryTimeout,
Boolean defaultReadOnly,
boolean defaultAutoCommit,
int defaultTransactionIsolation,
String defaultCatalog,
AbandonedConfig config)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
int validationQueryTimeout,
Collection connectionInitSqls,
boolean defaultReadOnly,
boolean defaultAutoCommit)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
int validationQueryTimeout,
Collection connectionInitSqls,
boolean defaultReadOnly,
boolean defaultAutoCommit,
int defaultTransactionIsolation)
Create a new PoolableConnectionFactory. |
|
PoolableConnectionFactory(ConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
int validationQueryTimeout,
Collection connectionInitSqls,
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()
Returns the ObjectPool in which Connection s are pooled. |
protected void |
initializeConnection(Connection conn)
|
Object |
makeObject()
|
void |
passivateObject(Object obj)
|
void |
setConnectionFactory(ConnectionFactory connFactory)
Sets the ConnectionFactory from which to obtain base Connection s. |
void |
setConnectionInitSql(Collection connectionInitSqls)
Sets the SQL statements I use to initialize newly created Connection s. |
void |
setDefaultAutoCommit(boolean defaultAutoCommit)
Sets the default "auto commit" setting for borrowed Connection s |
void |
setDefaultCatalog(String defaultCatalog)
Sets the default "catalog" setting for borrowed Connection s |
void |
setDefaultReadOnly(boolean defaultReadOnly)
Sets the default "read only" setting for borrowed Connection s |
void |
setDefaultTransactionIsolation(int defaultTransactionIsolation)
Sets the default "Transaction Isolation" setting for borrowed Connection s |
void |
setPool(ObjectPool pool)
Sets the ObjectPool in which to pool Connection s. |
void |
setStatementPoolFactory(KeyedObjectPoolFactory stmtPoolFactory)
Sets the KeyedObjectPoolFactory I use to create KeyedObjectPool s
for pooling PreparedStatement s. |
void |
setValidationQuery(String validationQuery)
Sets the query I use to validate Connection s. |
void |
setValidationQueryTimeout(int timeout)
Sets the validation query timeout, the amount of time, in seconds, that connection validation will wait for a response from the database when executing a validation query. |
void |
validateConnection(Connection conn)
|
boolean |
validateObject(Object obj)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected volatile ConnectionFactory _connFactory
protected volatile String _validationQuery
protected volatile int _validationQueryTimeout
protected Collection _connectionInitSqls
protected volatile ObjectPool _pool
protected volatile KeyedObjectPoolFactory _stmtPoolFactory
protected Boolean _defaultReadOnly
protected boolean _defaultAutoCommit
protected int _defaultTransactionIsolation
protected String _defaultCatalog
protected AbandonedConfig _config
Constructor Detail |
---|
public PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, Collection connectionInitSqls, boolean defaultReadOnly, boolean defaultAutoCommit)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.connectionInitSqls
- a Collection of SQL statements to initialize Connection
s. Using null turns off initialization.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, int validationQueryTimeout, boolean defaultReadOnly, boolean defaultAutoCommit)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.validationQueryTimeout
- the number of seconds that validation queries will wait for database response before failing. Use a value less than or equal to 0 for no timeout.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, int validationQueryTimeout, Collection connectionInitSqls, boolean defaultReadOnly, boolean defaultAutoCommit)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.validationQueryTimeout
- the number of seconds that validation queries will wait for database response before failing. Use a value less than or equal to 0 for no timeout.connectionInitSqls
- a Collection of SQL statements to initialize Connection
s. Using null turns off initialization.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, Collection connectionInitSqls, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.connectionInitSqls
- a Collection of SQL statement to initialize Connection
s. Using null turns off initialization.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, int validationQueryTimeout, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.validationQueryTimeout
- the number of seconds that validation queries will wait for database response before failing. Use a value less than or equal to 0 for no timeout.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, int validationQueryTimeout, Collection connectionInitSqls, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.validationQueryTimeout
- the number of seconds that validation queries will wait for database response before failing. Use a value less than or equal to 0 for no timeout.connectionInitSqls
- a Collection of SQL statement to initialize Connection
s. Using null turns off initialization.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
spublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, AbandonedConfig config)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sconfig
- the AbandonedConfig if tracing SQL objectspublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, AbandonedConfig config)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
sconfig
- the AbandonedConfig if tracing SQL objectspublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
sdefaultCatalog
- the default "catalog" setting for returned Connection
sconfig
- the AbandonedConfig if tracing SQL objectspublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, Boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
sdefaultCatalog
- the default "catalog" setting for returned Connection
sconfig
- the AbandonedConfig if tracing SQL objectspublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, Collection connectionInitSqls, Boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.connectionInitSqls
- a Collection of SQL statements to initialize Connection
s. Using null turns off initialization.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
sdefaultCatalog
- the default "catalog" setting for returned Connection
sconfig
- the AbandonedConfig if tracing SQL objectspublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, int validationQueryTimeout, Boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.validationQueryTimeout
- the number of seconds that validation queries will wait for database response before failing. Use a value less than or equal to 0 for no timeout.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
sdefaultCatalog
- the default "catalog" setting for returned Connection
sconfig
- the AbandonedConfig if tracing SQL objectspublic PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, int validationQueryTimeout, Collection connectionInitSqls, Boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
connFactory
- the ConnectionFactory
from which to obtain base Connection
spool
- the ObjectPool
in which to pool those Connection
sstmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
s, or null to disable PreparedStatement
poolingvalidationQuery
- a query to use to validate
Connection
s. Should return at least one row. Using null turns off validation.validationQueryTimeout
- the number of seconds that validation queries will wait for database response before failing. Use a value less than or equal to 0 for no timeout.connectionInitSqls
- a Collection of SQL statements to initialize Connection
s. Using null turns off initialization.defaultReadOnly
- the default "read only" setting for borrowed Connection
sdefaultAutoCommit
- the default "auto commit" setting for returned Connection
sdefaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
sdefaultCatalog
- the default "catalog" setting for returned Connection
sconfig
- the AbandonedConfig if tracing SQL objectsMethod Detail |
---|
public void setConnectionFactory(ConnectionFactory connFactory)
ConnectionFactory
from which to obtain base Connection
s.
connFactory
- the ConnectionFactory
from which to obtain base Connection
spublic void setValidationQuery(String validationQuery)
validate
Connection
s.
Should return at least one row.
Using null turns off validation.
validationQuery
- a query to use to validate
Connection
s.public void setValidationQueryTimeout(int timeout)
timeout
- new validation query timeout value in secondspublic void setConnectionInitSql(Collection connectionInitSqls)
Connection
s.
Using null turns off connection initialization.
connectionInitSqls
- SQL statement to initialize Connection
s.public void setPool(ObjectPool pool)
ObjectPool
in which to pool Connection
s.
pool
- the ObjectPool
in which to pool those Connection
spublic ObjectPool getPool()
ObjectPool
in which Connection
s are pooled.
public void setStatementPoolFactory(KeyedObjectPoolFactory stmtPoolFactory)
KeyedObjectPoolFactory
I use to create KeyedObjectPool
s
for pooling PreparedStatement
s.
Set to null to disable PreparedStatement
pooling.
stmtPoolFactory
- the KeyedObjectPoolFactory
to use to create KeyedObjectPool
s for pooling PreparedStatement
spublic void setDefaultReadOnly(boolean defaultReadOnly)
Connection
s
defaultReadOnly
- the default "read only" setting for borrowed Connection
spublic void setDefaultAutoCommit(boolean defaultAutoCommit)
Connection
s
defaultAutoCommit
- the default "auto commit" setting for borrowed Connection
spublic void setDefaultTransactionIsolation(int defaultTransactionIsolation)
Connection
s
defaultTransactionIsolation
- the default "Transaction Isolation" setting for returned Connection
spublic void setDefaultCatalog(String defaultCatalog)
Connection
s
defaultCatalog
- the default "catalog" setting for borrowed Connection
spublic Object makeObject() throws Exception
makeObject
in interface PoolableObjectFactory
Exception
protected void initializeConnection(Connection conn) throws SQLException
SQLException
public void destroyObject(Object obj) throws Exception
destroyObject
in interface PoolableObjectFactory
Exception
public boolean validateObject(Object obj)
validateObject
in interface PoolableObjectFactory
public void validateConnection(Connection conn) throws SQLException
SQLException
public void passivateObject(Object obj) throws Exception
passivateObject
in interface PoolableObjectFactory
Exception
public void activateObject(Object obj) throws Exception
activateObject
in interface PoolableObjectFactory
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |