public class PoolableManagedConnectionFactory extends PoolableConnectionFactory
PoolableConnectionFactory that creates PoolableManagedConnections._config, _connectionInitSqls, _connFactory, _defaultAutoCommit, _defaultCatalog, _defaultReadOnly, _defaultTransactionIsolation, _pool, _stmtPoolFactory, _validationQuery, _validationQueryTimeout| Constructor and Description |
|---|
PoolableManagedConnectionFactory(XAConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
boolean defaultReadOnly,
boolean defaultAutoCommit)
Create a PoolableManagedConnectionFactory and attach it to a connection pool.
|
PoolableManagedConnectionFactory(XAConnectionFactory connFactory,
ObjectPool pool,
KeyedObjectPoolFactory stmtPoolFactory,
String validationQuery,
int validationQueryTimeout,
Collection connectionInitSqls,
Boolean defaultReadOnly,
boolean defaultAutoCommit,
int defaultTransactionIsolation,
String defaultCatalog,
AbandonedConfig config)
Create a PoolableManagedConnectionFactory and attach it to a connection pool.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
makeObject()
Uses the configured XAConnectionFactory to create a
PoolableManagedConnection. |
activateObject, destroyObject, getPool, initializeConnection, passivateObject, setConnectionFactory, setConnectionInitSql, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setPool, setStatementPoolFactory, setValidationQuery, setValidationQueryTimeout, validateConnection, validateObjectpublic PoolableManagedConnectionFactory(XAConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit)
connFactory - XAConnectionFactorypool - connection poolstmtPoolFactory - the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling
PreparedStatements, or null to disable 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 Connectionspublic PoolableManagedConnectionFactory(XAConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory stmtPoolFactory, String validationQuery, int validationQueryTimeout, Collection connectionInitSqls, Boolean defaultReadOnly, boolean defaultAutoCommit, int defaultTransactionIsolation, String defaultCatalog, AbandonedConfig config)
connFactory - XAConnectionFactorypool - connection poolstmtPoolFactory - the KeyedObjectPoolFactory to use to create KeyedObjectPools for pooling
PreparedStatements, or null to disable PreparedStatement poolingvalidationQuery - a query to use to validate Connections.
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 Connections.
Using null turns off initialization.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 objectspublic Object makeObject() throws Exception
PoolableManagedConnection.
Throws IllegalStateException if the connection factory returns null.
Also initializes the connection using configured initialization sql (if provided)
and sets up a prepared statement pool associated with the PoolableManagedConnection
if statement pooling is enabled.makeObject in interface PoolableObjectFactorymakeObject in class PoolableConnectionFactoryException - if there is a problem creating a new instance,
this will be propagated to the code requesting an object.Copyright © 2017. All rights reserved.