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:
- java.sql.Connection, java.sql.Wrapper
public class PoolableConnection
- extends DelegatingConnection
A delegating connection that, rather than closing the underlying
connection, returns itself to an ObjectPool
when
closed.
- Version:
- $Revision: 1.14 $ $Date: 2004/05/01 12:50:12 $
- Author:
- Rodney Waldhoff, Glenn L. Nielsen, James House
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary |
PoolableConnection(java.sql.Connection conn,
org.apache.commons.pool.ObjectPool pool)
|
Method Summary |
void |
close()
Returns me to my pool. |
void |
reallyClose()
Actually close my underlying Connection . |
Methods inherited from class org.apache.commons.dbcp.DelegatingConnection |
abort, clearWarnings, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, equals, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getDelegate, getHoldability, getInnermostDelegate, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, hashCode, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setDelegate, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, unwrap |
Methods inherited from class org.apache.commons.dbcp.AbandonedTrace |
printStackTrace |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
PoolableConnection
public PoolableConnection(java.sql.Connection conn,
org.apache.commons.pool.ObjectPool pool)
- Parameters:
conn
- my underlying connectionpool
- the pool to which I should return when closed
close
public void close()
throws java.sql.SQLException
- Returns me to my pool.
- Specified by:
close
in interface java.sql.Connection
- Overrides:
close
in class DelegatingConnection
- Throws:
java.sql.SQLException
reallyClose
public void reallyClose()
throws java.sql.SQLException
- Actually close my underlying
Connection
.
- Throws:
java.sql.SQLException
Copyright © 2001-2003 Apache Software Foundation. Documenation generated May 11 2016.