|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.kernelpanic.dbmonster.connection.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 |
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 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 |