Package com.mchange.v2.c3p0
Class AbstractConnectionCustomizer
java.lang.Object
com.mchange.v2.c3p0.AbstractConnectionCustomizer
- All Implemented Interfaces:
ConnectionCustomizer
An abstract implementation of the
ConnectionCustomizer interface
in which all methods are no-ops.
Just a convenience class since
most clients will only need to
implement a single method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onAcquire
(Connection c, String parentDataSourceIdentityToken) Called immediately after a Connection is acquired from the underlying database for incorporation into the pool.void
onCheckIn
(Connection c, String parentDataSourceIdentityToken) Called immediately after a Connection is checked in, prior to reincorporation into the pool.void
onCheckOut
(Connection c, String parentDataSourceIdentityToken) Called immediately before a Connection is made available to a client upon checkout.void
onDestroy
(Connection c, String parentDataSourceIdentityToken) Called immediately before a Connection is destroyed after being removed from the pool.
-
Constructor Details
-
AbstractConnectionCustomizer
public AbstractConnectionCustomizer()
-
-
Method Details
-
onAcquire
Description copied from interface:ConnectionCustomizer
Called immediately after a Connection is acquired from the underlying database for incorporation into the pool.
This method is only called once per Connection. If standard JDBC Connection properties are modified [holdability, transactionIsolation, readOnly], those modifications will override defaults throughout the Connection's tenure in the pool.
- Specified by:
onAcquire
in interfaceConnectionCustomizer
- Throws:
Exception
-
onDestroy
Description copied from interface:ConnectionCustomizer
Called immediately before a Connection is destroyed after being removed from the pool.- Specified by:
onDestroy
in interfaceConnectionCustomizer
- Throws:
Exception
-
onCheckOut
Description copied from interface:ConnectionCustomizer
Called immediately before a Connection is made available to a client upon checkout.- Specified by:
onCheckOut
in interfaceConnectionCustomizer
- Throws:
Exception
-
onCheckIn
Description copied from interface:ConnectionCustomizer
Called immediately after a Connection is checked in, prior to reincorporation into the pool.- Specified by:
onCheckIn
in interfaceConnectionCustomizer
- Throws:
Exception
-