X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=test%2Fenterprise%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Ftest%2Fpersistence%2FAbstractDatabase.java;h=11fda933ba14ac36a1913e47bb734c90c1d05d63;hb=83898516d61bfcd1f4e3a3ea79bb56f3877f4900;hp=df5cb75f44810f4a318f1de694f8bc2f3f384c4d;hpb=a1ab1a2e44c95cc10ad4c4d15420b49e3744d93b;p=utils diff --git a/test/enterprise/src/main/java/org/wamblee/test/persistence/AbstractDatabase.java b/test/enterprise/src/main/java/org/wamblee/test/persistence/AbstractDatabase.java index df5cb75f..11fda933 100644 --- a/test/enterprise/src/main/java/org/wamblee/test/persistence/AbstractDatabase.java +++ b/test/enterprise/src/main/java/org/wamblee/test/persistence/AbstractDatabase.java @@ -29,12 +29,12 @@ import org.apache.commons.dbcp.PoolingDataSource; import org.apache.commons.pool.impl.GenericObjectPool; /** - * 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. + * 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. * * @author Erik Brakkee - * + * */ public abstract class AbstractDatabase implements Database { @@ -56,19 +56,19 @@ public abstract class AbstractDatabase implements Database { private boolean started; /** - * Constructs the database. + * Constructs the database. */ protected AbstractDatabase() { started = false; } /** - * To be implemented by subclasses to start the database. + * To be implemented by subclasses to start the database. */ protected abstract void doStart(); /** - * To be implemented by subclasses to stop the database. + * To be implemented by subclasses to stop the database. */ protected abstract void doStop(); @@ -101,7 +101,7 @@ public abstract class AbstractDatabase implements Database { // / BELOW THIS LINE IS NOT OF INTEREST TO SUBCLASSES. /** - * Starts the database. + * Starts the database. */ public final DataSource start() { if (started) { @@ -113,9 +113,9 @@ public abstract class AbstractDatabase implements Database { } /** - * Stops the database and tests for connection leaks. - * In cast the system property with the name given by {@link #IGNORE_CONNECTION_LEAK_PROPERTY} - * is set then the connection leaks are not checked. + * Stops the database and tests for connection leaks. In cast the system + * property with the name given by {@link #IGNORE_CONNECTION_LEAK_PROPERTY} + * is set then the connection leaks are not checked. */ public final void stop() { if (!started) { @@ -127,8 +127,9 @@ public abstract class AbstractDatabase implements Database { String msg = "JDBC connection pool still has " + connectionPool.getNumActive() + " active connection(s), this is a potential resource leak in the code\n"; - // backdoor to ignore connection leaks. Use this system property only if you - // can safely ignore the connection leaks. + // backdoor to ignore connection leaks. Use this system property + // only if you + // can safely ignore the connection leaks. if (System.getProperty(IGNORE_CONNECTION_LEAK_PROPERTY) == null) { Assert.fail(msg); }