org.apache.avalon.excalibur.datasource
Class JdbcConnectionPool

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--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:
Component, Disposable, Initializable, Loggable, Pool, Resizable, java.lang.Runnable, ThreadSafe

public class JdbcConnectionPool
extends HardResourceLimitingPool
implements java.lang.Runnable, Disposable, Initializable

The Pool implementation for JdbcConnections. It uses a background thread to manage the number of SQL Connections.

Version:
CVS $Revision: 1.6 $ $Date: 2001/06/01 21:09:24 $
Author:
Berin Loritsch

Fields inherited from class org.apache.avalon.excalibur.pool.DefaultPool
m_controller, m_disposed, m_max, m_min
 
Fields inherited from class org.apache.avalon.excalibur.pool.AbstractPool
DEFAULT_POOL_SIZE, m_active, m_factory, m_initialized, m_mutex, m_ready
 
Constructor Summary
JdbcConnectionPool(JdbcConnectionFactory factory, DefaultPoolController controller, int min, int max, boolean autoCommit)
           
 
Method Summary
 Poolable get()
           
 void initialize()
          Initialialize the component.
protected  Poolable newPoolable()
          This is the method to override when you need to enforce creational policies.
 void run()
           
 
Methods inherited from class org.apache.avalon.excalibur.pool.SoftResourceLimitingPool
grow, shrink
 
Methods inherited from class org.apache.avalon.excalibur.pool.DefaultPool
dispose, put
 
Methods inherited from class org.apache.avalon.excalibur.pool.AbstractPool
removePoolable, size
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, 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
 

Constructor Detail

JdbcConnectionPool

public JdbcConnectionPool(JdbcConnectionFactory factory,
                          DefaultPoolController controller,
                          int min,
                          int max,
                          boolean autoCommit)
                   throws java.lang.Exception
Method Detail

initialize

public void initialize()
Description copied from interface: Initializable
Initialialize the component. Initialization includes allocating any resources required throughout the components lifecycle.
Specified by:
initialize in interface Initializable
Overrides:
initialize in class HardResourceLimitingPool
Following copied from interface: org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception - if an error occurs

newPoolable

protected final Poolable newPoolable()
                              throws java.lang.Exception
Description copied from class: AbstractPool
This is the method to override when you need to enforce creational policies.
Overrides:
newPoolable in class HardResourceLimitingPool

get

public Poolable get()
             throws java.lang.Exception
Overrides:
get in class DefaultPool

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.