org.deegree.io
Class DBPool
java.lang.Object
java.util.TimerTask
org.deegree.framework.util.ObjectPool
org.deegree.io.DBPool
- All Implemented Interfaces:
- java.lang.Runnable
public class DBPool
- extends ObjectPool
class to manage a pool of database connections.
- Since:
- 2.0
- Version:
- $Revision: 21456 $, 1.0. $Revision: 21456 $, $Date: 2009-12-15 15:17:33 +0100 (Di, 15 Dez 2009) $
- Author:
- Andreas Poth, last edited by: $Author: aschmitz $
Constructor Summary |
DBPool(java.lang.String driver,
java.lang.String database,
java.util.Properties properties)
initialize pool for defined connection parameters |
DBPool(java.lang.String driver,
java.lang.String database,
java.lang.String user,
java.lang.String password)
initialize pool for defined connection parameters |
Method Summary |
java.lang.Object |
acquireObject()
get an object from the object pool |
void |
onObjectKill(java.lang.Object o)
will be called when the object is removed from the pool |
Methods inherited from class org.deegree.framework.util.ObjectPool |
clear, getInstance, getMaxInstances, getMaxLifeTime, getMaxUsageTime, getUpdateInterval, releaseObject, run, setMaxInstances, setMaxLifeTime, setMaxUsageTime, setUpdateInterval, toString |
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DBPool
public DBPool(java.lang.String driver,
java.lang.String database,
java.lang.String user,
java.lang.String password)
- initialize pool for defined connection parameters
- Parameters:
driver
- database
- user
- password
-
DBPool
public DBPool(java.lang.String driver,
java.lang.String database,
java.util.Properties properties)
- initialize pool for defined connection parameters
- Parameters:
driver
- database
- properties
-
acquireObject
public java.lang.Object acquireObject()
throws DBPoolException
- get an object from the object pool
- Returns:
- the object
- Throws:
DBPoolException
onObjectKill
public void onObjectKill(java.lang.Object o)
- will be called when the object is removed from the pool
- Specified by:
onObjectKill
in class ObjectPool
- Parameters:
o
-
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org