mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Lets switch autocommit when commiting in case its in true state
This commit is contained in:
parent
9efaa425f2
commit
8e7a959f39
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user