|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtools.jpool.system.PoolManager
PoolManager Class This class represent the collection of pools. With the methods defined in this class you can access each existing pool based upon the xml configuration file. On creation of this object all the pools are created and held into a map. The necessary actions are also taken like registering of the jdbc driver(s) needed in order to work with the database(s).
$Id: PoolManager.java,v 1.1 2003/10/15 15:37:31 stfndln Exp $
Constructor Summary | |
PoolManager(java.util.Vector _configs)
Construct the manager class based upon the configuration object created through the xml file. |
Method Summary | |
protected void |
deregisterDriver(java.lang.String _driver)
Deregisters a given driver. |
Pool |
getPool(java.lang.String _name)
Retrieves the pool object in order to access the database connections by it's given name as specified in the xml configuration file. |
protected void |
initialize(java.util.Vector _configs)
Initializes the manager class by creating all the pools as defined in the xml configuration file. |
protected boolean |
isRegistered(java.lang.String _driver)
Checks if a given jdbc driver is already registered or not |
protected void |
registerDriver(java.lang.String _driver)
Registers a driver as specified in the configuration object(s). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PoolManager(java.util.Vector _configs)
_configs
- The configuration objects read from the xml configuration fileMethod Detail |
protected void initialize(java.util.Vector _configs) throws java.lang.Exception
_configs
- The configuration objects as defined by the xml file
java.lang.Exception
- thrown when failed to initialize the pool managerprotected void registerDriver(java.lang.String _driver) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.sql.SQLException
_driver
- The jdbc driver to register
java.lang.ClassNotFoundException
- thrown when the jdbc driver class was not found
java.lang.IllegalAccessException
- thrown when an illegal access occures
java.lang.InstantiationException
- thrown on problem of instantiating of the driver
java.sql.SQLException
- thrown when a sql error occurs on registration of the driverprotected void deregisterDriver(java.lang.String _driver) throws java.sql.SQLException
_driver
- The jdbc driver to deregister
java.sql.SQLException
- thrown when an error occured on the deregistering of the driverprotected boolean isRegistered(java.lang.String _driver)
_driver
- The jdbc driver to check
public Pool getPool(java.lang.String _name)
_name
- The name of the database from which you want to retrieve the pool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |