com.jfw.database
Class ConnectionPoolProxy

java.lang.Object
  extended by com.jfw.database.ConnectionPoolProxy

public final class ConnectionPoolProxy
extends java.lang.Object

Distribute connection pools.
Connection pools are managed by class ConnectionPool.


Constructor Summary
ConnectionPoolProxy()
           
 
Method Summary
static boolean exit()
          Execute the ConnectionPool.exit() of all opened connection pools.
static ConnectionPool get(java.lang.String poolName)
          Get a connection pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPoolProxy

public ConnectionPoolProxy()
Method Detail

get

public static ConnectionPool get(java.lang.String poolName)
                          throws java.lang.Exception
Get a connection pool.
If the requested connection pool not exist in connectionPools then the method create(java.lang.String) is called for istantiate one.

Parameters:
poolName - the connection pool name as defined in key db_resources_names of file jfw.properties.
Returns:
a ConnectionPool object.
Throws:
java.lang.Exception

exit

public static boolean exit()
Execute the ConnectionPool.exit() of all opened connection pools.

Returns:
true if no error occur during close, false in other case.