Class PoolableManagedConnection
java.lang.Object
org.apache.tomcat.dbcp.dbcp2.AbandonedTrace
org.apache.tomcat.dbcp.dbcp2.DelegatingConnection<Connection>
org.apache.tomcat.dbcp.dbcp2.PoolableConnection
org.apache.tomcat.dbcp.dbcp2.managed.PoolableManagedConnection
- All Implemented Interfaces:
- AutoCloseable,- Connection,- Wrapper,- PoolableConnectionMXBean,- TrackedUse
PoolableConnection that unregisters from TransactionRegistry on Connection real destroy.
- Since:
- 2.0
- See Also:
- 
Field SummaryFields inherited from interface java.sql.ConnectionTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
- 
Constructor SummaryConstructorsConstructorDescriptionPoolableManagedConnection(TransactionRegistry transactionRegistry, Connection conn, ObjectPool<PoolableConnection> pool) Create a PoolableManagedConnection.PoolableManagedConnection(TransactionRegistry transactionRegistry, Connection conn, ObjectPool<PoolableConnection> pool, Collection<String> disconnectSqlCodes, boolean fastFailValidation) Create a PoolableManagedConnection.
- 
Method SummaryModifier and TypeMethodDescriptionvoidActually close the underlying connection.Methods inherited from class org.apache.tomcat.dbcp.dbcp2.PoolableConnectionabort, close, getDisconnectionSqlCodes, getToString, handleException, isClosed, isFastFailValidation, passivate, validate, validateMethods inherited from class org.apache.tomcat.dbcp.dbcp2.DelegatingConnectionactivate, checkOpen, clearCachedState, clearWarnings, closeInternal, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCacheState, getCatalog, getClientInfo, getClientInfo, getDefaultQueryTimeout, getDefaultQueryTimeoutDuration, getDelegate, getDelegateInternal, getHoldability, getInnermostDelegate, getInnermostDelegateInternal, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, handleExceptionNoThrow, innermostDelegateEquals, isClosedInternal, isReadOnly, isValid, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCacheState, setCatalog, setClientInfo, setClientInfo, setClosedInternal, setDefaultQueryTimeout, setDefaultQueryTimeout, setDelegate, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, toString, unwrapMethods inherited from class org.apache.tomcat.dbcp.dbcp2.AbandonedTraceaddTrace, clearTrace, close, getLastUsed, getLastUsedInstant, getTrace, removeThisTrace, removeTrace, setLastUsed, setLastUsed, setLastUsedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.sql.ConnectionbeginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValidMethods inherited from interface org.apache.tomcat.dbcp.dbcp2.PoolableConnectionMXBeanclearCachedState, clearWarnings, getAutoCommit, getCacheState, getCatalog, getHoldability, getSchema, getTransactionIsolation, isReadOnly, setAutoCommit, setCacheState, setCatalog, setHoldability, setReadOnly, setSchema, setTransactionIsolation
- 
Constructor Details- 
PoolableManagedConnectionpublic PoolableManagedConnection(TransactionRegistry transactionRegistry, Connection conn, ObjectPool<PoolableConnection> pool) Create a PoolableManagedConnection.- Parameters:
- transactionRegistry- transaction registry
- conn- underlying connection
- pool- connection pool
 
- 
PoolableManagedConnectionpublic PoolableManagedConnection(TransactionRegistry transactionRegistry, Connection conn, ObjectPool<PoolableConnection> pool, Collection<String> disconnectSqlCodes, boolean fastFailValidation) Create a PoolableManagedConnection.- Parameters:
- transactionRegistry- transaction registry
- conn- underlying connection
- pool- connection pool
- disconnectSqlCodes- SQL_STATE codes considered fatal disconnection errors
- fastFailValidation- true means fatal disconnection errors cause subsequent validations to fail immediately (no attempt to run query or isValid)
 
 
- 
- 
Method Details- 
getTransactionRegistry- Returns:
- The transaction registry.
- Since:
- 2.6.0
 
- 
reallyCloseActually close the underlying connection.- Specified by:
- reallyClosein interface- PoolableConnectionMXBean
- Overrides:
- reallyClosein class- PoolableConnection
- Throws:
- SQLException
 
 
-