org.nanocontainer.persistence.jdbc
Class FailoverDataSourceConnection
java.lang.Object
org.nanocontainer.persistence.jdbc.AbstractConnection
org.nanocontainer.persistence.jdbc.FailoverDataSourceConnection
- All Implemented Interfaces:
- Connection, org.picocontainer.Startable
public class FailoverDataSourceConnection
- extends AbstractConnection
- implements org.picocontainer.Startable
Connection component implementation which obtains a connection instance using a injected datasource. It has failover
support.
- Author:
- Juze Peleteiro
| Methods inherited from class org.nanocontainer.persistence.jdbc.AbstractConnection |
clearWarnings, close, commit, createStatement, createStatement, createStatement, getAutoCommit, getCatalog, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, handleException, isClosed, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FailoverDataSourceConnection
public FailoverDataSourceConnection(DataSource dataSource)
- Parameters:
dataSource - The DataSource instance where connections will be requested.
FailoverDataSourceConnection
public FailoverDataSourceConnection(DataSource dataSource,
ExceptionHandler exceptionHandler)
- Parameters:
dataSource - The DataSource instance where connections will be requested.jdbcExceptionHandler - The ExceptionHandler component instance.
getDelegatedConnection
protected Connection getDelegatedConnection()
throws SQLException
- Specified by:
getDelegatedConnection in class AbstractConnection
- Throws:
SQLException- See Also:
AbstractConnection.getDelegatedConnection()
invalidateDelegatedConnection
protected void invalidateDelegatedConnection()
- Specified by:
invalidateDelegatedConnection in class AbstractConnection
- See Also:
AbstractConnection.invalidateDelegatedConnection()
start
public void start()
- Specified by:
start in interface org.picocontainer.Startable
- See Also:
Startable.start()
stop
public void stop()
- Specified by:
stop in interface org.picocontainer.Startable
- See Also:
Startable.stop()
Copyright 2003-2003-2006 Codehaus. All Rights Reserved.