|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wamblee.test.persistence.AbstractDatabase
public abstract class AbstractDatabase
Abstract database class providing the creation of the datasource, preventing duplicate starts of the same database, and checking for connection leaks when the database is stopped.
| Constructor Summary | |
|---|---|
protected |
AbstractDatabase()
Constructs the database. |
| Method Summary | |
|---|---|
protected void |
createDataSource()
This method must be called from the start method. |
protected abstract void |
doStart()
To be implemented by subclasses to start the database. |
protected abstract void |
doStop()
To be implemented by subclasses to stop the database. |
int |
getActiveConnections()
Gets the number of active connections from the pool. |
protected java.lang.String |
getProperty(java.lang.String aName)
|
javax.sql.DataSource |
start()
Starts the database. |
void |
stop()
Stops the database and tests for connection leaks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.wamblee.test.persistence.Database |
|---|
getExternalJdbcUrl, getJdbcUrl, getPassword, getUsername |
| Constructor Detail |
|---|
protected AbstractDatabase()
| Method Detail |
|---|
protected abstract void doStart()
protected abstract void doStop()
protected final void createDataSource()
public int getActiveConnections()
Database
getActiveConnections in interface Databasepublic final javax.sql.DataSource start()
start in interface Databasepublic final void stop()
IGNORE_CONNECTION_LEAK_PROPERTY
is set then the connection leaks are not checked.
stop in interface Databaseprotected java.lang.String getProperty(java.lang.String aName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||