org.apache.commons.dbcp
Class PoolableConnection
java.lang.Object
org.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingConnection
org.apache.commons.dbcp.PoolableConnection
- All Implemented Interfaces:
- Connection, Wrapper
- Direct Known Subclasses:
- PoolableManagedConnection
public class PoolableConnection
- extends DelegatingConnection
A delegating connection that, rather than closing the underlying
connection, returns itself to an ObjectPool
when
closed.
- Version:
- $Revision: 892307 $ $Date: 2013-12-31 23:27:28 +0000 (Tue, 31 Dec 2013) $
- Author:
- Rodney Waldhoff, Glenn L. Nielsen, James House
Field Summary |
protected ObjectPool |
_pool
The pool to which I should return. |
Methods inherited from class org.apache.commons.dbcp.DelegatingConnection |
activate, checkOpen, clearWarnings, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, equals, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getDelegate, getDelegateInternal, getHoldability, getInnermostDelegate, getInnermostDelegateInternal, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, handleException, hashCode, innermostDelegateEquals, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, passivate, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setDelegate, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, toString, unwrap |
_pool
protected ObjectPool _pool
- The pool to which I should return.
PoolableConnection
public PoolableConnection(Connection conn,
ObjectPool pool)
- Parameters:
conn
- my underlying connectionpool
- the pool to which I should return when closed
PoolableConnection
public PoolableConnection(Connection conn,
ObjectPool pool,
AbandonedConfig config)
- Parameters:
conn
- my underlying connectionpool
- the pool to which I should return when closedconfig
- the abandoned configuration settings
close
public void close()
throws SQLException
- Returns me to my pool.
- Specified by:
close
in interface Connection
- Overrides:
close
in class DelegatingConnection
- Throws:
SQLException
reallyClose
public void reallyClose()
throws SQLException
- Actually close my underlying
Connection
.
- Throws:
SQLException
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.