Skip to content

Commit

Permalink
set autoCommit to false by default
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Jul 19, 2024
1 parent e95c69e commit 42b9ea8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public void connect(ConnectionDetails connectionDetails, DatabaseAdapterManager
connection.getDatabase()));

properties.setInitialSize(0);
properties.setDefaultAutoCommit(true);
properties.setDefaultAutoCommit(false);
properties.setRollbackOnReturn(true);

dataSource = new DataSource(properties);
dataSource.setLoginTimeout(connection.getPoolOptions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public Connection getConnection(boolean autoCommit) throws SQLException {
}

public Connection getConnection() throws SQLException {
return getConnection(true);
return getConnection(false);
}
}

0 comments on commit 42b9ea8

Please sign in to comment.