X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fstat%2Fcollector%2FStatDB.java;h=c2dd29a1b154d51d9b314abbcc63e676c762ae9a;hb=1e8254e6a48302dd3e47e1f68cc51f6a6b9c33db;hp=56ce9c13cb85299e83856c53703969e2b1c34367;hpb=18ab5ac43d48a62414e7d6e6e4d96e250e1ea923;p=jabaws.git diff --git a/webservices/compbio/stat/collector/StatDB.java b/webservices/compbio/stat/collector/StatDB.java index 56ce9c1..c2dd29a 100644 --- a/webservices/compbio/stat/collector/StatDB.java +++ b/webservices/compbio/stat/collector/StatDB.java @@ -105,7 +105,7 @@ public class StatDB { + "isCollected SMALLINT NOT NULL, " + "isClusterJob SMALLINT NOT NULL)"; // We create a table... - System.out.println(create); + log.debug(create); s.execute(create); s.close(); conn.close(); @@ -153,6 +153,7 @@ public class StatDB { pstm.executeUpdate(); } conn.commit(); + conn.setAutoCommit(true); pstm.close(); } @@ -310,8 +311,7 @@ public class StatDB { conn.close(); } } catch (SQLException e) { - System.err.println("Database commit failed with " - + e.getLocalizedMessage()); + log.warn("Database commit failed with " + e.getLocalizedMessage()); } boolean gotSQLExc = false; try { @@ -322,9 +322,9 @@ public class StatDB { } } if (!gotSQLExc) { - System.err.println("Database did not shut down normally"); + log.warn("Database did not shut down normally"); } else { - System.out.println("Database shut down normally"); + log.info("Database shut down normally"); } } public static void main(String[] args) throws SQLException {