org.apache.commons.dbcp
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.
Constructor and Description |
---|
AbandonedObjectPool(PoolableObjectFactory factory,
AbandonedConfig config)
Create an ObjectPool which tracks db connections.
|
Modifier and Type | Method and Description |
---|---|
Object |
borrowObject()
Get a db connection from the pool.
|
void |
invalidateObject(Object obj)
Invalidates an object from the pool.
|
void |
returnObject(Object obj)
Return a db connection to the pool.
|
public AbandonedObjectPool(PoolableObjectFactory factory, AbandonedConfig config)
factory
- PoolableObjectFactory used to create thisconfig
- configuration for abandoned db connectionspublic Object borrowObject() throws Exception
Exception
- if an exception occurs retrieving a
connection from the poolpublic void invalidateObject(Object obj) throws Exception
obj
- object to be returnedException
- if an exception occurs invalidating the objectCopyright © 2001-2004 Apache Software Foundation. Documenation generated August 6 2013.