deegree 2.5 (2011/06/29 09:44 build-8-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:
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 $

Field Summary
 
Fields inherited from class org.deegree.framework.util.ObjectPool
available, existingInstances, in_use, startLifeTime, startUsageTime
 
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
 

Constructor Detail

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 -
Method Detail

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 -

deegree 2.5 (2011/06/29 09:44 build-8-official)

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