Class ConnectionTracker

java.lang.Object
org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker

public class ConnectionTracker extends Object
A class to track information about Connections that come from the connection pool. It also will invoke SQLConnectionInterceptors with information about the Connection as it is used.
  • Constructor Details

    • ConnectionTracker

      public ConnectionTracker()
    • ConnectionTracker

      public ConnectionTracker(ConnectionPoolInfo connectionPoolInfo)
      This allows you to have static information about the underlying connection pool.
      Parameters:
      connectionPoolInfo - the static information about the connection pool
  • Method Details

    • trackConnection

      public Connection trackConnection(String helperName, Callable<Connection> getConnectionCall)
      Called to track the connection as it is pulled from the underlying connection pool.
      Parameters:
      helperName - the OfBiz helper name
      getConnectionCall - a callable that returns a connection
      Returns:
      the connection that was returned by the callable