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 |
|---|---|
java.lang.Object |
borrowObject()
Get a db connection from the pool.
|
void |
invalidateObject(java.lang.Object obj)
Invalidates an object from the pool.
|
void |
returnObject(java.lang.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 java.lang.Object borrowObject()
throws java.lang.Exception
java.lang.Exception - if an exception occurs retrieving a
connection from the poolpublic void invalidateObject(java.lang.Object obj)
throws java.lang.Exception
obj - object to be returnedjava.lang.Exception - if an exception occurs invalidating the objectpublic void returnObject(java.lang.Object obj)
throws java.lang.Exception
obj - db Connection to returnjava.lang.Exception - if an exception occurs returning the connection
to the poolCopyright © 2001-2004 Apache Software Foundation. Documenation generated September 23 2013.