|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.kernelpanic.dbmonster.connection.SimpleConnectionProvider
public class SimpleConnectionProvider
The most simple connection provider. It uses the following properies to establish connection:
| Constructor Summary | |
|---|---|
SimpleConnectionProvider()
Creates new SimpleConnectionProvider. |
|
SimpleConnectionProvider(String jdbcDriver,
String jdbcUrl,
Properties props)
Creates new SimpleConnectionProvider with properties (usefull for interbase). |
|
SimpleConnectionProvider(String jdbcDriver,
String jdbcUrl,
String jdbcUsername,
String jdbcPassword)
Creates new SimpleConnectionProvider 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 SimpleConnectionProvider()
throws ClassNotFoundException
ClassNotFoundException - if driver class could not be found.
public SimpleConnectionProvider(String jdbcDriver,
String jdbcUrl,
String jdbcUsername,
String jdbcPassword)
throws ClassNotFoundException
jdbcDriver - JDBC driverjdbcUrl - JDBC urljdbcUsername - JDBC user namejdbcPassword - JDBC password
ClassNotFoundException - if the driver class could not be found.
public SimpleConnectionProvider(String jdbcDriver,
String jdbcUrl,
Properties props)
throws ClassNotFoundException
jdbcDriver - JDBC driverjdbcUrl - JDBC urlprops - properties
ClassNotFoundException - 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 | |||||||||