org.apache.avalon.excalibur.datasource
Class JdbcConnectionPool
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.pool.AbstractPool
org.apache.avalon.excalibur.pool.DefaultPool
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool
org.apache.avalon.excalibur.pool.HardResourceLimitingPool
org.apache.avalon.excalibur.datasource.JdbcConnectionPool
- All Implemented Interfaces:
- Runnable, Pool, Resizable, Disposable, Initializable, LogEnabled, ThreadSafe
public class JdbcConnectionPool
- extends HardResourceLimitingPool
- implements Runnable, Disposable, Initializable
The Pool implementation for JdbcConnections. It uses a background
thread to manage the number of SQL Connections.
- Since:
- 4.0
- Version:
- CVS $Revision: 1.5 $ $Date: 2004/04/02 11:08:12 $
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.avalon.framework.activity.Disposable |
dispose |
JdbcConnectionPool
public JdbcConnectionPool(JdbcConnectionFactory factory,
DefaultPoolController controller,
int min,
int max,
boolean autoCommit)
throws Exception
- Throws:
Exception
setTimeout
public void setTimeout(long timeout)
- Set the timeout in milliseconds for blocking when waiting for a
new connection. It defaults to -1. Any number below 1 means that there
is no blocking, and the Pool fails hard. Any number above 0 means we
will wait for that length of time before failing.
initialize
public void initialize()
- Specified by:
initialize
in interface Initializable
- Overrides:
initialize
in class HardResourceLimitingPool
newPoolable
protected final Poolable newPoolable()
throws Exception
- Overrides:
newPoolable
in class HardResourceLimitingPool
- Throws:
Exception
get
public Poolable get()
throws Exception
- Specified by:
get
in interface Pool
- Overrides:
get
in class DefaultPool
- Throws:
Exception
put
public void put(Poolable obj)
- Specified by:
put
in interface Pool
- Overrides:
put
in class DefaultPool
run
public void run()
- Specified by:
run
in interface Runnable
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.