deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.io
Class DBPool

java.lang.Object
  extended by java.util.TimerTask
      extended by org.deegree.framework.util.ObjectPool
          extended by org.deegree.io.DBPool
All Implemented Interfaces:
Runnable

public class DBPool
extends ObjectPool

class to manage a pool of database connections.

Since:
2.0
Version:
$Revision: 21455 $, 1.0. $Revision: 21455 $, $Date: 2009-12-15 15:14:47 +0100 (Di, 15. Dez 2009) $
Author:
Andreas Poth, last edited by: $Author: aschmitz $

Field Summary
 
Fields inherited from class org.deegree.framework.util.ObjectPool
available, existingInstances, in_use, startLifeTime, startUsageTime
 
Constructor Summary
DBPool(String driver, String database, Properties properties)
          initialize pool for defined connection parameters
DBPool(String driver, String database, String user, String password)
          initialize pool for defined connection parameters
 
Method Summary
 Object acquireObject()
          get an object from the object pool
 void onObjectKill(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
 

Constructor Detail

DBPool

public DBPool(String driver,
              String database,
              String user,
              String password)
initialize pool for defined connection parameters

Parameters:
driver -
database -
user -
password -

DBPool

public DBPool(String driver,
              String database,
              Properties properties)
initialize pool for defined connection parameters

Parameters:
driver -
database -
properties -
Method Detail

acquireObject

public Object acquireObject()
                     throws DBPoolException
get an object from the object pool

Returns:
the object
Throws:
DBPoolException

onObjectKill

public void onObjectKill(Object o)
will be called when the object is removed from the pool

Specified by:
onObjectKill in class ObjectPool
Parameters:
o -

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org