Class PoolingConnection

All Implemented Interfaces:
AutoCloseable, Connection, Wrapper, KeyedPooledObjectFactory<PStmtKey,DelegatingPreparedStatement>, TrackedUse

A DelegatingConnection that pools PreparedStatements.

The prepareStatement(org.apache.tomcat.dbcp.dbcp2.PStmtKey) and prepareCall(org.apache.tomcat.dbcp.dbcp2.PStmtKey) 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.)

See Also: