hirondelle.fish.test.doubles
Class FakeConnectionSrc
Object
ConnectionSrc
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
.
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FakeConnectionSrc
public FakeConnectionSrc()
getConnectionByName
protected Connection getConnectionByName(String aDbName)
throws DAOException
- Fetch a connection using DriverManager.
- Overrides:
getConnectionByName
in class ConnectionSrc
- Throws:
DAOException
Copyright Hirondelle Systems - Generated 2013Oct19.12.26