Class PoolableManagedConnectionFactory
- java.lang.Object
- 
- org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory
- 
- org.apache.tomcat.dbcp.dbcp2.managed.PoolableManagedConnectionFactory
 
 
- 
- All Implemented Interfaces:
- PooledObjectFactory<PoolableConnection>
 
 public class PoolableManagedConnectionFactory extends PoolableConnectionFactory APoolableConnectionFactorythat createsPoolableManagedConnections.- Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description PoolableManagedConnectionFactory(XAConnectionFactory connFactory, javax.management.ObjectName dataSourceJmxName)Creates a PoolableManagedConnectionFactory and attach it to a connection pool.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionRegistrygetTransactionRegistry()PooledObject<PoolableConnection>makeObject()Uses the configured XAConnectionFactory to create aPoolableManagedConnection.- 
Methods inherited from class org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactoryactivateObject, destroyObject, destroyObject, getCacheState, getConnectionFactory, getConnectionIndex, getConnectionInitSqls, getDataSourceJmxName, getDataSourceJmxObjectName, getDefaultAutoCommit, getDefaultCatalog, getDefaultQueryTimeout, getDefaultQueryTimeoutDuration, getDefaultQueryTimeoutSeconds, getDefaultReadOnly, getDefaultSchema, getDefaultTransactionIsolation, getDisconnectionSqlCodes, getMaxConnDuration, getMaxConnLifetimeMillis, getMaxOpenPreparedStatements, getPool, getPoolStatements, getValidationQuery, getValidationQueryTimeoutDuration, getValidationQueryTimeoutSeconds, initializeConnection, isAutoCommitOnReturn, isEnableAutoCommitOnReturn, isFastFailValidation, isRollbackOnReturn, passivateObject, setAutoCommitOnReturn, setCacheState, setClearStatementPoolOnReturn, setConnectionInitSql, setDefaultAutoCommit, setDefaultCatalog, setDefaultQueryTimeout, setDefaultQueryTimeout, setDefaultReadOnly, setDefaultSchema, setDefaultTransactionIsolation, setDisconnectionSqlCodes, setEnableAutoCommitOnReturn, setFastFailValidation, setMaxConn, setMaxConnLifetimeMillis, setMaxOpenPreparedStatements, setMaxOpenPrepatedStatements, setPool, setPoolStatements, setRollbackOnReturn, setValidationQuery, setValidationQueryTimeout, setValidationQueryTimeout, validateConnection, validateObject
 
- 
 
- 
- 
- 
Constructor Detail- 
PoolableManagedConnectionFactorypublic PoolableManagedConnectionFactory(XAConnectionFactory connFactory, javax.management.ObjectName dataSourceJmxName) Creates a PoolableManagedConnectionFactory and attach it to a connection pool.- Parameters:
- connFactory- XAConnectionFactory
- dataSourceJmxName- The data source name.
 
 
- 
 - 
Method Detail- 
getTransactionRegistrypublic TransactionRegistry getTransactionRegistry() - Returns:
- The transaction registry.
- Since:
- 2.6.0
 
 - 
makeObjectpublic PooledObject<PoolableConnection> makeObject() throws java.sql.SQLException Uses the configured XAConnectionFactory to create aPoolableManagedConnection. ThrowsIllegalStateExceptionif 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.- Specified by:
- makeObjectin interface- PooledObjectFactory<PoolableConnection>
- Overrides:
- makeObjectin class- PoolableConnectionFactory
- Returns:
- a PooledObjectwrapping an instance that can be served by the pool
- Throws:
- java.sql.SQLException
 
 
- 
 
-