Interface ConnectionInitializationCallback


public interface ConnectionInitializationCallback
This callback allows applications and frameworks to initialize connections retrieved from Universal Connection Pool using common actions, before the connections are put to use. The initialization actions vary and could include simple method calls making local state changes within the application, or database operations that require round trips over the network. For example, configuring user roles, NLS language setting, transaction isolation level, and invoking stored procedures. This callback is registered on an oracle.ucp.jdbc.PoolDataSource. It is executed at every connection checkout from the pool, as well as at each successful reconnect during failover. It is recommended that applications use connection labeling (including connection labeling callback) when pooling stateful connections. If both connection labeling callback and this callback are registered on the same connection pool instance, this callback is ignored and the connection labeling callback is used for connection initializations and reinitializations.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(Connection connection)
    Initialize the given connection.
  • Method Details

    • initialize

      void initialize(Connection connection) throws SQLException
      Initialize the given connection.
      Parameters:
      connection - The connection to initialize.
      Throws:
      SQLException - in case of inability to initialize