fedora.server.storage
Class ConnectionPoolManagerImpl
java.lang.Object
fedora.server.Parameterized
fedora.server.Pluggable
fedora.server.Module
fedora.server.storage.ConnectionPoolManagerImpl
- All Implemented Interfaces:
- Constants, ConnectionPoolManager
public class ConnectionPoolManagerImpl
- extends Module
- implements ConnectionPoolManager
Implements ConnectionPoolManager to facilitate obtaining
database connection pools.
This class initializes the connection pools specified by parameters in
the Fedora fedora.fcfg configuration file. The Fedora server
must be instantiated in order for this class to function properly.
- Version:
- $Id: ConnectionPoolManagerImpl.java 5304 2006-12-05 11:47:52Z cwilper $
- Author:
- rlw@virginia.edu
| Fields inherited from interface fedora.common.Constants |
ACTION, BDEF, BMECH, DATASTREAM, DC, DISSEMINATOR, ENVIRONMENT, FEDORA, FEDORA_HOME, FEDORA_SYSTEM_DEF_PID, FEDORA_SYSTEM_DEF_URI, HTTP_REQUEST, MODEL, OBJECT, RDF, RECOVERY, RELS_EXT, RESOURCE, SUBJECT, TUCANA, VIEW, XSD |
|
Constructor Summary |
ConnectionPoolManagerImpl(java.util.Map moduleParameters,
Server server,
java.lang.String role)
Constructs a new ConnectionPoolManagerImpl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionPoolManagerImpl
public ConnectionPoolManagerImpl(java.util.Map moduleParameters,
Server server,
java.lang.String role)
throws ModuleInitializationException
Constructs a new ConnectionPoolManagerImpl
- Parameters:
moduleParameters - The name/value pair map of module parameters.server - The server instance.role - The module role name.
- Throws:
ModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
initModule
public void initModule()
throws ModuleInitializationException
- Initializes the Module based on configuration parameters. The
implementation of this method is dependent on the schema used to define
the parameter names for the role of
fedora.server.storage.ConnectionPoolManager.
- Overrides:
initModule in class Module
- Throws:
ModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
getPool
public ConnectionPool getPool(java.lang.String poolName)
throws ConnectionPoolNotFoundException
Gets a named connection pool.
- Specified by:
getPool in interface ConnectionPoolManager
- Parameters:
poolName - The name of the connection pool.
- Returns:
- The named connection pool.
- Throws:
ConnectionPoolNotFoundException - If the specified connection pool
cannot be found.
getPool
public ConnectionPool getPool()
throws ConnectionPoolNotFoundException
Gets the default Connection Pool. This method overrides
getPool(String poolName).
- Specified by:
getPool in interface ConnectionPoolManager
- Returns:
- The default connection pool.
- Throws:
ConnectionPoolNotFoundException - If the default connection pool
cannot be found.