|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.kernelpanic.dbmonster.connection.DBCPConnectionProvider
public class 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 |
setAutoCommit(boolean autoCommit)
Sets the autocommit flag for created 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 Connection getConnection()
throws SQLException
ConnectionProvider
getConnection in interface ConnectionProviderSQLException - if connection cannot be obtained.ConnectionProvider.getConnection()
public void testConnection()
throws SQLException
ConnectionProvider
testConnection in interface ConnectionProviderSQLException - if connection could not be tested.ConnectionProvider.testConnection()public void setLogger(Log log)
setLogger in interface LogEnabledlog - a logger.public void shutdown()
shutdown in interface ConnectionProviderpublic void setAutoCommit(boolean autoCommit)
ConnectionProvider
setAutoCommit in interface ConnectionProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||