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
- public class PoolableConnection
- extends DelegatingConnection
A delegating connection that, rather than closing the underlying
connection, returns itself to an ObjectPool
when
closed.
- Version:
- $Id: PoolableConnection.java,v 1.4 2002/06/28 15:28:20 glenn Exp $
- Author:
- Rodney Waldhoff
, Glenn L. Nielsen
, James House (james@interobjective.com)
Field Summary |
protected org.apache.commons.pool.ObjectPool |
_pool
The pool to which I should return. |
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
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 |
activate, checkOpen, clearWarnings, commit, createStatement, createStatement, getAutoCommit, getCatalog, getDelegate, getInnermostDelegate, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, passivate, prepareCall, prepareCall, prepareStatement, prepareStatement, rollback, setAutoCommit, setCatalog, setDelegate, setReadOnly, setTransactionIsolation, setTypeMap |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.Connection |
createStatement, getHoldability, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setHoldability, setSavepoint, setSavepoint |
_pool
protected org.apache.commons.pool.ObjectPool _pool
- The pool to which I should return.
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
PoolableConnection
public PoolableConnection(java.sql.Connection conn,
org.apache.commons.pool.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 java.sql.SQLException
- Returns me to my pool.
- Specified by:
close
in interface java.sql.Connection
- Overrides:
close
in class DelegatingConnection
java.sql.SQLException
reallyClose
public void reallyClose()
throws java.sql.SQLException
- Actually close my underlying
Connection
.
java.sql.SQLException
Copyright © 2001 Apache Software Foundation. Documenation generated August 12 2002.