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
- 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.11 2003/10/09 21:04:44 rdonkin Exp $
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, createStatement, createStatement, createStatement, equals, getAutoCommit, getCatalog, getDelegate, getHoldability, getInnermostDelegate, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, hashCode, isClosed, isReadOnly, nativeSQL, passivate, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setDelegate, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
_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,
org.apache.commons.dbcp.AbandonedConfig config)
- Deprecated. AbandonedConfig is now deprecated.
- 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
SQLException
reallyClose
public void reallyClose()
throws SQLException
- Actually close my underlying
Connection
.
SQLException
Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.