diff --git a/citydb-database/src/main/java/org/citydb/database/DatabaseManager.java b/citydb-database/src/main/java/org/citydb/database/DatabaseManager.java index 34f7fce7..c1c4f61e 100644 --- a/citydb-database/src/main/java/org/citydb/database/DatabaseManager.java +++ b/citydb-database/src/main/java/org/citydb/database/DatabaseManager.java @@ -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() diff --git a/citydb-database/src/main/java/org/citydb/database/Pool.java b/citydb-database/src/main/java/org/citydb/database/Pool.java index 2c841542..1a20676e 100644 --- a/citydb-database/src/main/java/org/citydb/database/Pool.java +++ b/citydb-database/src/main/java/org/citydb/database/Pool.java @@ -46,6 +46,6 @@ public Connection getConnection(boolean autoCommit) throws SQLException { } public Connection getConnection() throws SQLException { - return getConnection(true); + return getConnection(false); } }