org.apache.commons.dbcp
Class AbandonedObjectPool
GenericObjectPool
org.apache.commons.dbcp.AbandonedObjectPool
public class AbandonedObjectPool
extends GenericObjectPool
An implementation of a Jakarta-Commons ObjectPool which
tracks JDBC connections and can recover abandoned db connections.
If logAbandoned=true, a stack trace will be printed for any
abandoned db connections recovered.
$Revision: 482015 $ $Date: 2006-12-03 19:22:09 -0700 (Sun, 03 Dec 2006) $
AbandonedObjectPool
public AbandonedObjectPool(PoolableObjectFactory factory,
AbandonedConfig config)
Create an ObjectPool which tracks db connections.
factory
- PoolableObjectFactory used to create thisconfig
- configuration for abandoned db connections
borrowObject
public Object borrowObject()
throws Exception
Get a db connection from the pool.
If removeAbandoned=true, recovers db connections which
have been idle > removeAbandonedTimeout and
getNumActive() > getMaxActive() - 3 and
getNumIdle() <322
invalidateObject
public void invalidateObject(Object obj)
throws Exception
Invalidates an object from the pool.
obj
- object to be returned
returnObject
public void returnObject(Object obj)
throws Exception
Return a db connection to the pool.
obj
- db Connection to return
Copyright © 2001-2004 Apache Software Foundation. Documenation generated June 19 2007.