Skip navigation links

Oracle® Universal Connection Pool for JDBC Java API Reference
12c Release 1 (12.1)

E17662-07


oracle.ucp.jdbc
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 Summary
 void initialize(java.sql.Connection connection)
          Initialize the given connection.

 

Method Detail

initialize

void initialize(java.sql.Connection connection)
                throws java.sql.SQLException
Initialize the given connection.
Parameters:
connection - The connection to initialize.
Throws:
java.sql.SQLException

Skip navigation links

Oracle® Universal Connection Pool for JDBC Java API Reference
12c Release 1 (12.1)

E17662-07


Copyright © 2007, 2013, Oracle and/or its affiliates. All rights reserved.