Class PoolingConnection

All Implemented Interfaces:
AutoCloseable, Connection, Wrapper, org.apache.commons.pool.KeyedPoolableObjectFactory

public class PoolingConnection extends DelegatingConnection implements Connection, org.apache.commons.pool.KeyedPoolableObjectFactory
A DelegatingConnection that pools PreparedStatements.

The prepareStatement(java.lang.String) and prepareCall(java.lang.String) methods, rather than creating a new PreparedStatement each time, may actually pull the statement from a pool of unused statements. The Statement.close() method of the returned statement doesn't actually close the statement, but rather returns it to the pool. (See PoolablePreparedStatement, PoolableCallableStatement.)

Version:
$Revision: 885261 $ $Date: 2009-11-29 15:07:02 -0500 (Sun, 29 Nov 2009) $
Author:
Rodney Waldhoff, Dirk Verbeeck
See Also: