Fish & Chips Club 4.10.0.0

hirondelle.fish.test.doubles
Class FakeConnectionSrc

Object
  extended by ConnectionSrc
      extended by hirondelle.fish.test.doubles.FakeConnectionSrc
All Implemented Interfaces:
ConnectionSource

public final class FakeConnectionSrc
extends ConnectionSrc

Implementation of ConnectionSource suitable for testing.

The 'real' implementation uses JNDI lookup of items from a connection pool configured in the container. This implementation does not use JNDI. Instead, it simply creates a connection using DriverManager, each time one is needed. Other implementations are possible.

The mechanism for replacing the real ConnectionSource with this class uses an init-param in FakeServletConfig.


Field Summary
 
Fields inherited from class ConnectionSrc
ACCESS_CONTROL, DEFAULT, TRANSLATION
 
Constructor Summary
FakeConnectionSrc()
           
 
Method Summary
protected  Connection getConnectionByName(String aDbName)
          Fetch a connection using DriverManager.
 
Methods inherited from class ConnectionSrc
getConnection, getConnection, getConnectionString, getDatabaseNames, init
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeConnectionSrc

public FakeConnectionSrc()
Method Detail

getConnectionByName

protected Connection getConnectionByName(String aDbName)
                                  throws DAOException
Fetch a connection using DriverManager.

Overrides:
getConnectionByName in class ConnectionSrc
Throws:
DAOException

Fish & Chips Club 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26