|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.kernelpanic.dbmonster.connection.DBCPConnectionProvider
The connection provider which uses commons-dbcp. It uses the following properties to establish connection:
Constructor Summary | |
DBCPConnectionProvider()
Creates new SimpleConnectionProvider. |
|
DBCPConnectionProvider(String jdbcDriver,
String jdbcUrl,
Properties props)
Creates new DBCPConnectionProvider with properties (usefull for interbase). |
|
DBCPConnectionProvider(String jdbcDriver,
String jdbcUrl,
String jdbcUsername,
String jdbcPassword)
Creates new DBCPConnectionProvider with given connection info. |
Method Summary | |
Connection |
getConnection()
Returns a JDBC connection. |
void |
setLogger(Log log)
Sets the logger. |
void |
shutdown()
Shutdown this connection provider. |
void |
testConnection()
Tests a connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBCPConnectionProvider() throws Exception
Exception
- if driver class could not be found.public DBCPConnectionProvider(String jdbcDriver, String jdbcUrl, String jdbcUsername, String jdbcPassword) throws Exception
jdbcDriver
- JDBC driverjdbcUrl
- JDBC urljdbcUsername
- JDBC user namejdbcPassword
- JDBC password
Exception
- if the driver class could not be found.public DBCPConnectionProvider(String jdbcDriver, String jdbcUrl, Properties props) throws Exception
jdbcDriver
- JDBC driverjdbcUrl
- JDBC urlprops
- properties
Exception
- if driver class could not be found.Method Detail |
public final Connection getConnection() throws SQLException
ConnectionProvider
getConnection
in interface ConnectionProvider
SQLException
- if connection cannot be obtained.ConnectionProvider.getConnection()
public final void testConnection() throws SQLException
ConnectionProvider
testConnection
in interface ConnectionProvider
SQLException
- if connection could not be tested.ConnectionProvider.testConnection()
public final void setLogger(Log log)
setLogger
in interface LogEnabled
log
- a logger.public final void shutdown()
shutdown
in interface ConnectionProvider
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |