diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsConnection.java b/src/main/java/com/gamingmesh/jobs/dao/JobsConnection.java index 0ddab673..7baad482 100644 --- a/src/main/java/com/gamingmesh/jobs/dao/JobsConnection.java +++ b/src/main/java/com/gamingmesh/jobs/dao/JobsConnection.java @@ -51,7 +51,13 @@ public class JobsConnection { } public synchronized void commit() throws SQLException { - conn.commit(); + if (conn.getAutoCommit()) { + conn.setAutoCommit(false); + conn.commit(); + conn.setAutoCommit(true); + } else { + conn.commit(); + } } public synchronized DatabaseMetaData getMetaData() throws SQLException {