mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +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 {
|
||||
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