org.apache.commons.dbcp
Class AbandonedObjectPool
java.lang.Object
org.apache.commons.pool.BaseObjectPool
org.apache.commons.pool.impl.GenericObjectPool
org.apache.commons.dbcp.AbandonedObjectPool
- All Implemented Interfaces:
- ObjectPool
Deprecated. This will be removed in a future version of 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.
- Version:
- $Revision: 1.16 $ $Date: 2004/05/01 12:42:19 $
Fields inherited from class org.apache.commons.pool.impl.GenericObjectPool |
DEFAULT_MAX_ACTIVE, DEFAULT_MAX_IDLE, DEFAULT_MAX_WAIT, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_MIN_IDLE, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_RETURN, DEFAULT_TEST_WHILE_IDLE, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, DEFAULT_WHEN_EXHAUSTED_ACTION, WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL, WHEN_EXHAUSTED_GROW |
Methods inherited from class org.apache.commons.pool.impl.GenericObjectPool |
addObject, clear, close, evict, getMaxActive, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getNumActive, getNumIdle, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTimeMillis, getTestOnBorrow, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, getWhenExhaustedAction, setConfig, setFactory, setMaxActive, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setWhenExhaustedAction, startEvictor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbandonedObjectPool
public AbandonedObjectPool(PoolableObjectFactory factory,
AbandonedConfig config)
- Deprecated.
- Create an ObjectPool which tracks db connections.
- Parameters:
PoolableObjectFactory
- factory used to create thisAbandonedConfig
- configuration for abandoned db connections
borrowObject
public Object borrowObject()
throws Exception
- Deprecated.
- Get a db connection from the pool.
If removeAbandoned=true, recovers db connections which
have been idle > removeAbandonedTimeout.
- Specified by:
borrowObject
in interface ObjectPool
- Overrides:
borrowObject
in class GenericObjectPool
- Returns:
- Object jdbc Connection
- Throws:
Exception
returnObject
public void returnObject(Object obj)
throws Exception
- Deprecated.
- Return a db connection to the pool.
- Specified by:
returnObject
in interface ObjectPool
- Overrides:
returnObject
in class GenericObjectPool
- Parameters:
Object
- db Connection to return
- Throws:
Exception
invalidateObject
public void invalidateObject(Object obj)
throws Exception
- Deprecated.
- Specified by:
invalidateObject
in interface ObjectPool
- Overrides:
invalidateObject
in class GenericObjectPool
- Throws:
Exception
Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.