Fixed a bug which prevented connections to be reinitialized.
authorMarco Zanon <info@marcozanon.com>
Fri, 13 Apr 2018 16:05:35 +0000 (16:05 +0000)
committerMarco Zanon <info@marcozanon.com>
Fri, 13 Apr 2018 16:05:35 +0000 (16:05 +0000)
6.x/src/java/com/marcozanon/macaco/database/MDatabaseConnection.java

index b84ad8a3f33d512a5412fea2420b9744f5ed20b0..c8f102ae6c18b244a900ed3f3d4cc1159b543fdb 100644 (file)
@@ -96,7 +96,7 @@ public class MDatabaseConnection extends MObject {
 
     protected void check() throws MDatabaseConnectionFailureException {
         try {
-            this.getConnection().prepareStatement("/* ping */ SELECT 1", PreparedStatement.RETURN_GENERATED_KEYS);
+            this.getConnection().createStatement().executeQuery("/* ping */ SELECT 1");
         }
         catch (SQLException exception) {
             this.initialize();