org.apache.commons.dbcp

Class PoolableConnection

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:
$Revision: 1.14 $ $Date: 2004/05/01 12:50:12 $
Authors:
Rodney Waldhoff
Glenn L. Nielsen
James House

Constructor Summary

PoolableConnection(Connection conn, ObjectPool pool)
PoolableConnection(Connection conn, ObjectPool pool, AbandonedConfig config)
Deprecated. AbandonedConfig is now deprecated.

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

clearWarnings, close, commit, createStatement, createStatement, createStatement, equals, getAutoCommit, getCatalog, getDelegate, getHoldability, getInnermostDelegate, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, hashCode, isClosed, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setDelegate, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap

Methods inherited from class org.apache.commons.dbcp.AbandonedTrace

printStackTrace

Constructor Details

PoolableConnection

public PoolableConnection(Connection conn,
                          ObjectPool pool)
Parameters:
conn - my underlying connection
pool - the pool to which I should return when closed

PoolableConnection

public PoolableConnection(Connection conn,
                          ObjectPool pool,
                          AbandonedConfig config)

Deprecated. AbandonedConfig is now deprecated.

Parameters:
conn - my underlying connection
pool - the pool to which I should return when closed
config - the abandoned configuration settings

Method Details

close

public void close()
            throws SQLException
Returns me to my pool.
Overrides:
close in interface DelegatingConnection

reallyClose

public void reallyClose()
            throws SQLException
Actually close my underlying Connection.

Copyright © 2001-2003 Apache Software Foundation. Documenation generated March 27 2007.