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:
    ConnectionLabelingCallback, PoolDataSource
    • Method Detail

      • initialize

        void initialize​(java.sql.Connection connection)
                 throws java.sql.SQLException
        Initialize the given connection.
        connection - The connection to initialize.
        java.sql.SQLException - in case of inability to initialize