(no commit message)
[utils] / test / enterprise / src / main / java / org / wamblee / test / persistence / AbstractDatabase.java
index df5cb75f44810f4a318f1de694f8bc2f3f384c4d..11fda933ba14ac36a1913e47bb734c90c1d05d63 100644 (file)
@@ -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);
                 }