com.wiley.posa3.resourcelifecyclemanager
Class ConnectionPool

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

public class ConnectionPool
extends java.lang.Object
implements Pool

The ConnectionPool class implements the Pooling pattern by providing an implementation of the Pool interface.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

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

Method Detail

release

public void release(Resource resource)
Release a managed resource (that is, a connection) to the pool.

Specified by:
release in interface Pool
Parameters:
resource - the resource (connection) to put into the pool

acquire

public Resource acquire()
Acquire a managed resource (that is, a connection) from the pool.

Specified by:
acquire in interface Pool
Returns:
ManagedResource the resource (connection) to acquire from the pool


Copyright 2004 John Wiley and Sons. All Rights Reserved.