Interface SQLConnectionInterceptor
- All Superinterfaces:
SQLInterceptor
- All Known Implementing Classes:
SafeDelegatingSqlConnectionInterceptor
An interceptor that knows about when connections are taken from the underlying connection pool
-
Method Summary
Modifier and TypeMethodDescriptionvoidonConnectionReplaced(Connection connection, ConnectionPoolState connectionPoolState) Called when a connection is returned to the underlying poolvoidonConnectionTaken(Connection connection, ConnectionPoolState connectionPoolState) Called when a connection is taken from the underlying poolMethods inherited from interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
afterSuccessfulExecution, afterSuccessfulExecution, beforeExecution, beforeExecution, onException, onException
-
Method Details
-
onConnectionTaken
Called when a connection is taken from the underlying pool- Parameters:
connection- the connection that has been borrowedconnectionPoolState- info about the connection pool in at the time the connection was taken
-
onConnectionReplaced
Called when a connection is returned to the underlying pool- Parameters:
connection- the connection that has been returnedconnectionPoolState- info about the connection pool in at the time the connection was taken
-