com.wiley.posa3.pooling
Class ConnectionPool

java.lang.Object
  extended bycom.wiley.posa3.pooling.ConnectionPool
All Implemented Interfaces:
Pool

public class ConnectionPool
extends java.lang.Object
implements Pool

ConnectionPool is a concrete implementation of the Pool interface and provides a pool of connecton objects. When a user tries to acquire a connection, the connection object would be fetched from the ConnectionPool. Similarly, when the user releases the connection, it would be returned back to the collection.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Constructor Summary
ConnectionPool()
           
 
Method Summary
 Resource acquire()
          Acquire a connection from the pool.
 void release(Resource resource)
          Release the 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()
Method Detail

acquire

public Resource acquire()
Acquire a connection from the pool.

Specified by:
acquire in interface Pool
Returns:
Resource a connection from the pool.

release

public void release(Resource resource)
Release the connection back to the pool.

Specified by:
release in interface Pool
Parameters:
resource - the connection that should be put back in the pool.


Copyright 2004 John Wiley and Sons. All Rights Reserved.