com.bristle.javalib.sql
Class DummyConnectionPool

java.lang.Object
  extended by com.bristle.javalib.sql.ConnectionPool
      extended by com.bristle.javalib.sql.DummyConnectionPool

public class DummyConnectionPool
extends ConnectionPool

This implements dummy ConnectionPool for testing purposes.

Usage:
Assumptions:
Effects:
Anticipated Changes:
Notes:
Implementation Notes:
Portability Issues:
Revision History:
   $Log$


Nested Class Summary
 
Nested classes/interfaces inherited from class com.bristle.javalib.sql.ConnectionPool
ConnectionPool.DBConfig, ConnectionPool.SimpleDBConfig, ConnectionPool.Tester
 
Constructor Summary
DummyConnectionPool(String strDBDriverClassName)
           
DummyConnectionPool(String strDBDriverClassName, int intMaxTimesToUse)
           
 
Method Summary
protected  void init(String strDBDriverClassName)
          Common method to be called from all constructors.
protected  Connection makeNewConnection(ConnectionPool.DBConfig objConfig)
          Make a new connection.
 
Methods inherited from class com.bristle.javalib.sql.ConnectionPool
clear, clearAvailable, clearIdle, getAvailableConnectionCount, getConnection, getConnectionCount, getMaxIdleMillisecs, getMaxTimesToUse, getSingleton, returnConnection, returnConnection, setMaxIdleMillisecs, setMaxTimesToUse, setSingleton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyConnectionPool

public DummyConnectionPool(String strDBDriverClassName)
                    throws ClassNotFoundException,
                           InstantiationException,
                           IllegalAccessException
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

DummyConnectionPool

public DummyConnectionPool(String strDBDriverClassName,
                           int intMaxTimesToUse)
                    throws ClassNotFoundException,
                           InstantiationException,
                           IllegalAccessException
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
Method Detail

init

protected void init(String strDBDriverClassName)
             throws ClassNotFoundException
Description copied from class: ConnectionPool
Common method to be called from all constructors.

Overrides:
init in class ConnectionPool
Parameters:
strDBDriverClassName - Name of the database JDBC driver class. Example: oracle.jdbc.driver.OracleDriver
Throws:
ClassNotFoundException - When driver class not installed.

makeNewConnection

protected Connection makeNewConnection(ConnectionPool.DBConfig objConfig)
                                throws SQLException
Description copied from class: ConnectionPool
Make a new connection.

Overrides:
makeNewConnection in class ConnectionPool
Parameters:
objConfig - Configuration data needed to connect to the database.
Returns:
Database connection.
Throws:
SQLException - When unable to connect to the database.