org.nanocontainer.persistence.jdbc
Class DBCPDataSource
java.lang.Object
org.nanocontainer.persistence.jdbc.AbstractDataSource
org.nanocontainer.persistence.jdbc.DBCPDataSource
- All Implemented Interfaces:
- DataSource, org.picocontainer.Startable
public class DBCPDataSource
- extends AbstractDataSource
- implements org.picocontainer.Startable
Commons-DBCP DataSource component implementation. It has failover support.
- Author:
- Juze Peleteiro
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBCPDataSource
public DBCPDataSource(String driver,
String connectionURL,
String username,
String password)
- Parameters:
driver - The driver classname.connectionURL - The connection url.username - The connection username.password - The connection password.
DBCPDataSource
public DBCPDataSource(String driver,
String connectionURL,
String username,
String password,
ExceptionHandler jdbcExceptionHandler)
- Parameters:
driver - The driver classname.connectionURL - The connection url.username - The connection username.password - The connection password.jdbcExceptionHandler - The ExceptionHandler component instance.
DBCPDataSource
public DBCPDataSource(Properties properties)
- Parameters:
properties - DBCP properties. See at @{link http://jakarta.apache.org/commons/dbcp/configuration.html}
DBCPDataSource
public DBCPDataSource(Properties properties,
ExceptionHandler jdbcExceptionHandler)
- Parameters:
properties - DBCP properties. See at @{link http://jakarta.apache.org/commons/dbcp/configuration.html}jdbcExceptionHandler - The ExceptionHandler component instance.
getDelegatedDataSource
protected DataSource getDelegatedDataSource()
throws Exception
- Specified by:
getDelegatedDataSource in class AbstractDataSource
- Throws:
Exception- See Also:
AbstractDataSource.getDelegatedDataSource()
invalidateDelegatedDataSource
protected void invalidateDelegatedDataSource()
throws Exception
- Specified by:
invalidateDelegatedDataSource in class AbstractDataSource
- Throws:
Exception- See Also:
AbstractDataSource.invalidateDelegatedDataSource()
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.