Class FailoverDataSource

java.lang.Object
com.adaptris.jdbc.connection.FailoverDataSource
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource

public class FailoverDataSource extends Object implements DataSource
Datasource that has a connection capable of failover to an alternate database.

Because of we want to failover to an alternate database, the implementation of getConnection(String username, String password) simply discards the username and password and relies on the configuration that was supplied when constructing this class. This is the desired behaviour.

The underlying pool implementation is a org.apache.commons.pool.impl.GenericObjectPool. The default size of the pool is 10 with a wait time of 20seconds. If the pool is exhausted, then a NoSuchElementException will be thrown after the wait time.

See Also: