Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-04

oracle.adf.model.connection.pool
Class ConnectionPool

java.lang.Object
  extended by oracle.adf.model.connection.pool.ConnectionPool

public class ConnectionPool
extends java.lang.Object

ConnectionPool manages a pool of connections in a system.

When a client does a look up for a connection against the Connection Architecture The Factory that is resposible for creating the connection instances first checks the pool to see if the requested connection already exists. If yes the connection is recycled from the pool

In any case the client is always guarenteed to have a unique instance of the a connection. The instance could be a recycled instance from a pool or a new instance. This is opaque to the client

Since:
10.1.3

Constructor Summary
ConnectionPool()
          Create a ConnectionPool instance of a default size
 
Method Summary
 java.lang.Object allocate(java.lang.Object poolKey)
          Allocate a connection instance from this pool.
 void put(java.lang.Object poolKey, java.lang.Object connection, boolean used)
          Put an Object into the Pool for the first time so that it can be allocated and recycled for subsequent client requests.
 void release(java.lang.Object connection)
          Release a connection back to the pool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPool

public ConnectionPool()
Create a ConnectionPool instance of a default size

Since:
10.1.3
Method Detail

put

public void put(java.lang.Object poolKey,
                java.lang.Object connection,
                boolean used)
         throws java.lang.Exception
Put an Object into the Pool for the first time so that it can be allocated and recycled for subsequent client requests.

Parameters:
poolKey - The Key associated with the connection instance
connection - The Connection instance to be added to the pool.
Throws:
Exception - If the connection could be added to the pool.
java.lang.Exception

allocate

public java.lang.Object allocate(java.lang.Object poolKey)
                          throws java.lang.Exception
Allocate a connection instance from this pool.

Parameters:
poolKey - The Key associated with the connection to be allocated.
Returns:
The Connection Object requested. A null instance is returned if no connection instance can be found.
Throws:
java.lang.Exception

release

public void release(java.lang.Object connection)
             throws java.lang.Exception
Release a connection back to the pool

Parameters:
connection - The connection instance to be released back to the pool.
Throws:
java.lang.Exception

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-04

Copyright © 1997, 2010, Oracle. All rights reserved.