org.apache.commons.dbcp2.managed

## Class PoolableManagedConnection

- java.lang.Object
- - org.apache.commons.dbcp2.AbandonedTrace
  - - org.apache.commons.dbcp2.DelegatingConnection<Connection>
    - - org.apache.commons.dbcp2.PoolableConnection
      - - org.apache.commons.dbcp2.managed.PoolableManagedConnection

- All Implemented Interfaces:
    AutoCloseable, Connection, Wrapper, PoolableConnectionMXBean, org.apache.commons.pool2.TrackedUse

      public class PoolableManagedConnection
      extends PoolableConnection

  PoolableConnection that unregisters from TransactionRegistry on Connection real destroy.
  Since:
    2.0
  See Also:
    `PoolableConnection`

- - ### Field Summary

    - ### Fields inherited from interface java.sql.Connection

      `TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PoolableManagedConnection(TransactionRegistry transactionRegistry, Connection conn, org.apache.commons.pool2.ObjectPool<PoolableConnection> pool)` Create a PoolableManagedConnection.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `reallyClose()` Actually close the underlying connection.

    - ### Methods inherited from class org.apache.commons.dbcp2.PoolableConnection

      `close, getToString, isClosed, passivate, validate`

    - ### Methods inherited from class org.apache.commons.dbcp2.DelegatingConnection

      `abort, activate, checkOpen, clearCachedState, clearWarnings, closeInternal, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCacheState, getCatalog, getClientInfo, getClientInfo, getDefaultQueryTimeout, getDelegate, getDelegateInternal, getHoldability, getInnermostDelegate, getInnermostDelegateInternal, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, handleException, innermostDelegateEquals, isClosedInternal, isReadOnly, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCacheState, setCatalog, setClientInfo, setClientInfo, setClosedInternal, setDefaultQueryTimeout, setDelegate, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, toString, unwrap`

    - ### Methods inherited from class org.apache.commons.dbcp2.AbandonedTrace

      `addTrace, clearTrace, getLastUsed, getTrace, removeTrace, setLastUsed, setLastUsed`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.commons.dbcp2.PoolableConnectionMXBean

      `clearCachedState, clearWarnings, getAutoCommit, getCacheState, getCatalog, getHoldability, getSchema, getTransactionIsolation, isReadOnly, setAutoCommit, setCacheState, setCatalog, setHoldability, setReadOnly, setSchema, setTransactionIsolation`

- - ### Constructor Detail

    - #### PoolableManagedConnection

          public PoolableManagedConnection(TransactionRegistry transactionRegistry,
                                   Connection conn,
                                   org.apache.commons.pool2.ObjectPool<PoolableConnection> pool)

      Create a PoolableManagedConnection.
      Parameters:
        `transactionRegistry` - transaction registry
        `conn` - underlying connection
        `pool` - connection pool

  - ### Method Detail

    - #### reallyClose

          public void reallyClose()
                           throws SQLException

      Actually close the underlying connection.
      Specified by:
        `reallyClose` in interface `PoolableConnectionMXBean`
      Overrides:
        `reallyClose` in class `PoolableConnection`
      Throws:
        `SQLException`

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.