Skip navigation links

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

E17662-07


oracle.ucp
Interface ConnectionFactoryAdapter


public interface ConnectionFactoryAdapter

The connection factory adapter is responsible for creating and closing connections for a specific resource (such as, JDBC or JCA). When a connection is created, the connection factory adapter uses the information in the connection retrieval info object to create a connection. For example, if the resource is JDBC, the connection retrieval info object contains a user and password that the connection factory adapter uses to ask the JDBC resource for a connection.

See Also:
UniversalConnectionPool, ConnectionRetrievalInfo

Method Summary
 void closeConnection(java.lang.Object connection)
          Closes the given connection.
 java.lang.Object createConnection(ConnectionRetrievalInfo connectionRequestInfo)
          Creates a connection.
 UniversalPooledConnection createPooledConnection(java.lang.Object connection, ConnectionRetrievalInfo connectionRequestInfo)
          Creates a UniversalPooledConnection object.
 void setUniversalConnectionPool(UniversalConnectionPool connectionPool)
          Sets the connection pool that interacts with this connection factory adapter.

 

Method Detail

createConnection

java.lang.Object createConnection(ConnectionRetrievalInfo connectionRequestInfo)
                                  throws UniversalConnectionPoolException
Creates a connection.
Parameters:
connectionRequestInfo - The information to use to create the connection.
Returns:
A connection. null if a connection could not be created.
Throws:
UniversalConnectionPoolException - if an error occurs while creating the connection.

closeConnection

void closeConnection(java.lang.Object connection)
                     throws UniversalConnectionPoolException
Closes the given connection.
Parameters:
connection - The connection to close.
Throws:
UniversalConnectionPoolException - if an error occurs while closing the connection.

createPooledConnection

UniversalPooledConnection createPooledConnection(java.lang.Object connection,
                                                 ConnectionRetrievalInfo connectionRequestInfo)
                                                 throws UniversalConnectionPoolException
Creates a UniversalPooledConnection object.
Parameters:
connection - The physical connection that this pooled connection decorates.
connectionRequestInfo - The connection retrieval info object used to create the decorated connection.
Returns:
The created UniversalPooledConnection object.
Throws:
UniversalConnectionPoolException - if an error occurs while creating the UniversalPooledConnection object.

setUniversalConnectionPool

void setUniversalConnectionPool(UniversalConnectionPool connectionPool)
                                throws UniversalConnectionPoolException
Sets the connection pool that interacts with this connection factory adapter.
Parameters:
connectionPool - The connection pool that interacts with this connection factory adapter. Cannot be null.
Throws:
UniversalConnectionPoolException - if the connection pool is null.

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.