Renamed MSqlConnectionPool.getConnection() to getNewConnection().
authorMarco Zanon <info@marcozanon.com>
Wed, 28 Oct 2015 14:01:12 +0000 (14:01 +0000)
committerMarco Zanon <info@marcozanon.com>
Wed, 28 Oct 2015 14:01:12 +0000 (14:01 +0000)
4.x/src/java/com/marcozanon/macaco/logging/MLogDatabaseTable.java
4.x/src/java/com/marcozanon/macaco/sql/MSqlConnectionGenerator.java
4.x/src/java/com/marcozanon/macaco/sql/MSqlConnectionPool.java

index 5c4610b4254340ebc5d64fbea89837dd3558ac14..71d9f34e7b1709669c783e55a8350637f1badea8 100644 (file)
@@ -108,7 +108,7 @@ public class MLogDatabaseTable extends MLogTarget {
             }
             //
             if (null == this.getSqlConnectionReference()) {
-                this.sqlConnection = this.getSqlConnectionGeneratorReference().getConnection();
+                this.sqlConnection = this.getSqlConnectionGeneratorReference().getNewConnection();
             }
             //
             LinkedHashMap<String, Object> p = new LinkedHashMap<String, Object>();
index 79f0a676308e423fd7610d4f6e48bd091bc23321..0bf62273cc748d27f223057edc7cff9088c48982 100644 (file)
@@ -66,7 +66,7 @@ public class MSqlConnectionGenerator extends MObject {
 
     /* Generator. */
 
-    public MSqlConnection getConnection() throws MSqlConnectionFailureException {
+    public MSqlConnection getNewConnection() throws MSqlConnectionFailureException {
         return new MSqlConnection(this.getDriver(), this.getUrl(), this.getUsername(), this.getPassword());
     }
 
index 4a5e24f6f541677b4091fa61a4e23b6fb78bb81f..36c5be348c50ba08392afe5880d99b412334f47d 100644 (file)
@@ -61,7 +61,7 @@ public class MSqlConnectionPool extends MObject {
 
     protected void initializeConnectionPool() throws MSqlConnectionFailureException {
         for (int c = 0; c < this.getMinimumSize(); c++) {
-            MSqlConnection connection = this.getConnectionGenerator().getConnection();
+            MSqlConnection connection = this.getConnectionGenerator().getNewConnection();
             this.getConnectionPool().add(connection);
         }
     }
@@ -70,7 +70,7 @@ public class MSqlConnectionPool extends MObject {
         LinkedList<MSqlConnection> connectionPool = this.getConnectionPool();
         MSqlConnection connection = connectionPool.removeLast();
         if (this.getMinimumSize() > connectionPool.size()) {
-            connectionPool.add(this.getConnectionGenerator().getConnection());
+            connectionPool.add(this.getConnectionGenerator().getNewConnection());
         }
         return connection;
     }