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:
- org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.excalibur.pool.Pool, org.apache.avalon.excalibur.pool.Resizable, java.lang.Runnable, org.apache.avalon.framework.thread.ThreadSafe
- public class JdbcConnectionPool
- extends org.apache.avalon.excalibur.pool.HardResourceLimitingPool
- implements java.lang.Runnable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.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
Fields inherited from class org.apache.avalon.excalibur.pool.DefaultPool |
m_controller, m_disposed, m_max, m_min, m_quickFail |
Fields inherited from class org.apache.avalon.excalibur.pool.AbstractPool |
DEFAULT_POOL_SIZE, m_active, m_factory, m_initialized, m_mutex, m_ready |
Method Summary |
org.apache.avalon.excalibur.pool.Poolable |
get()
|
void |
initialize()
|
protected org.apache.avalon.excalibur.pool.Poolable |
newPoolable()
|
void |
put(org.apache.avalon.excalibur.pool.Poolable obj)
|
void |
run()
|
void |
setTimeout(long timeout)
Set the timeout in milliseconds for blocking when waiting for a
new connection. |
Methods inherited from class org.apache.avalon.excalibur.pool.HardResourceLimitingPool |
internalGrow |
Methods inherited from class org.apache.avalon.excalibur.pool.SoftResourceLimitingPool |
grow, shrink |
Methods inherited from class org.apache.avalon.excalibur.pool.DefaultPool |
dispose |
Methods inherited from class org.apache.avalon.excalibur.pool.AbstractPool |
internalShrink, lock, removePoolable, size, unlock |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
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,
org.apache.avalon.excalibur.pool.DefaultPoolController controller,
int min,
int max,
boolean autoCommit)
throws java.lang.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 org.apache.avalon.framework.activity.Initializable
newPoolable
protected final org.apache.avalon.excalibur.pool.Poolable newPoolable()
throws java.lang.Exception
- Throws:
java.lang.Exception
get
public org.apache.avalon.excalibur.pool.Poolable get()
throws java.lang.Exception
- Specified by:
get
in interface org.apache.avalon.excalibur.pool.Pool
- Throws:
java.lang.Exception
put
public void put(org.apache.avalon.excalibur.pool.Poolable obj)
- Specified by:
put
in interface org.apache.avalon.excalibur.pool.Pool
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.