org.apache.manifoldcf.core.database
Class ConnectionFactory.PoolManager

java.lang.Object
  extended by org.apache.manifoldcf.core.database.ConnectionFactory.PoolManager
Enclosing class:
ConnectionFactory

protected static class ConnectionFactory.PoolManager
extends java.lang.Object

This class abstracts from a connection pool, such that a static reference to an instance of this class will describe the entire body of connections. The finalizer for this class attempts to free all connections that are outstanding, so that class unloading, as it is practiced under tomcat 5.5, will not leave dangling connections around.


Method Summary
 com.bitmechanic.sql.ConnectionPoolManager ensurePoolExists(java.lang.String jdbcDriver)
           
protected  void finalize()
          Finalizer method should attempt to close open connections.
 void releaseAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ensurePoolExists

public com.bitmechanic.sql.ConnectionPoolManager ensurePoolExists(java.lang.String jdbcDriver)
                                                           throws ManifoldCFException
Throws:
ManifoldCFException

releaseAll

public void releaseAll()

finalize

protected void finalize()
                 throws java.lang.Throwable
Finalizer method should attempt to close open connections. This should get called when tomcat 5.5 unloads a web application. A shutdown thread will also be registered, which will attempt to do the same, but will be blocked from proceeding under Tomcat 5.5. Between the two, however, there's hope that the right things will take place.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable