Interface SQLConnectionInterceptor

All Superinterfaces:
SQLInterceptor
All Known Implementing Classes:
SafeDelegatingSqlConnectionInterceptor

public interface SQLConnectionInterceptor extends SQLInterceptor
An interceptor that knows about when connections are taken from the underlying connection pool
  • Method Details

    • onConnectionTaken

      void onConnectionTaken(Connection connection, ConnectionPoolState connectionPoolState)
      Called when a connection is taken from the underlying pool
      Parameters:
      connection - the connection that has been borrowed
      connectionPoolState - info about the connection pool in at the time the connection was taken
    • onConnectionReplaced

      void onConnectionReplaced(Connection connection, ConnectionPoolState connectionPoolState)
      Called when a connection is returned to the underlying pool
      Parameters:
      connection - the connection that has been returned
      connectionPoolState - info about the connection pool in at the time the connection was taken