org.logicalcobwebs.proxool
Class ConnectionPoolManager

java.lang.Object
  extended by org.logicalcobwebs.proxool.ConnectionPoolManager

 class ConnectionPoolManager
extends java.lang.Object

Version:
$Revision: 1.15 $, $Date: 2003/03/11 14:51:51 $
Author:
billhorsman, $Author: billhorsman $ (current maintainer)

Field Summary
private static ConnectionPoolManager connectionPoolManager
           
private  java.util.Map connectionPoolMap
           
private  java.util.Set connectionPools
           
private static java.lang.Object LOCK
           
private static Log LOG
           
 
Constructor Summary
private ConnectionPoolManager()
           
 
Method Summary
protected  ConnectionPool createConnectionPool(ConnectionPoolDefinition connectionPoolDefinition)
           
protected  ConnectionPool getConnectionPool(java.lang.String alias)
          Get the pool by the alias
 java.lang.String[] getConnectionPoolNames()
           
protected  ConnectionPool[] getConnectionPools()
           
static ConnectionPoolManager getInstance()
           
protected  java.lang.String getKnownPools(java.lang.String alias)
          Convenient method for outputing a message explaining that a pool couldn't be found and listing the ones that could be found.
protected  boolean isPoolExists(java.lang.String alias)
          Whether the pool is already registered
protected  void removeConnectionPool(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCK

private static final java.lang.Object LOCK

connectionPoolMap

private java.util.Map connectionPoolMap

connectionPools

private java.util.Set connectionPools

connectionPoolManager

private static ConnectionPoolManager connectionPoolManager

LOG

private static final Log LOG
Constructor Detail

ConnectionPoolManager

private ConnectionPoolManager()
Method Detail

getInstance

public static ConnectionPoolManager getInstance()

getConnectionPool

protected ConnectionPool getConnectionPool(java.lang.String alias)
                                    throws ProxoolException
Get the pool by the alias

Parameters:
alias - identifies the pool
Returns:
the pool
Throws:
ProxoolException - if it couldn't be found

getKnownPools

protected java.lang.String getKnownPools(java.lang.String alias)
Convenient method for outputing a message explaining that a pool couldn't be found and listing the ones that could be found.

Parameters:
alias - identifies the pool
Returns:
a description of the wht the pool couldn't be found

isPoolExists

protected boolean isPoolExists(java.lang.String alias)
Whether the pool is already registered

Parameters:
alias - how we identify the pool
Returns:
true if it already exists, else false

getConnectionPools

protected ConnectionPool[] getConnectionPools()
Returns:
an array of the connection pools

createConnectionPool

protected ConnectionPool createConnectionPool(ConnectionPoolDefinition connectionPoolDefinition)
                                       throws ProxoolException
Throws:
ProxoolException

removeConnectionPool

protected void removeConnectionPool(java.lang.String name)

getConnectionPoolNames

public java.lang.String[] getConnectionPoolNames()