提交 e583f216 编写于 作者: J Joram Barrez

Fix failing non-H2 db tests (part 2)

上级 589b959e
......@@ -86,7 +86,9 @@ public class CmmnDbSchemaManager implements DbSchemaManager {
// For most databases, this is not a problem as DDL statements are not transactional.
// However for some (e.g. sql server), this would remove all previous statements, which is not wanted,
// hence the extra commit here.
jdbcConnection.commit();
if (!jdbcConnection.getAutoCommit()) {
jdbcConnection.commit();
}
DatabaseConnection connection = new JdbcConnection(jdbcConnection);
Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
......
......@@ -65,7 +65,9 @@ public class ContentDbSchemaManager implements DbSchemaManager {
} else {
jdbcConnection = CommandContextUtil.getDbSqlSession(commandContext).getSqlSession().getConnection();
}
jdbcConnection.commit();
if (!jdbcConnection.getAutoCommit()) {
jdbcConnection.commit();
}
DatabaseConnection connection = new JdbcConnection(jdbcConnection);
Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
......
......@@ -75,7 +75,10 @@ public class DmnDbSchemaManager implements DbSchemaManager {
} else {
jdbcConnection = CommandContextUtil.getDbSqlSession(commandContext).getSqlSession().getConnection();
}
jdbcConnection.commit();
if (!jdbcConnection.getAutoCommit()) {
jdbcConnection.commit();
}
DatabaseConnection connection = new JdbcConnection(jdbcConnection);
Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
......
......@@ -66,7 +66,9 @@ public class FormDbSchemaManager implements DbSchemaManager {
} else {
jdbcConnection = CommandContextUtil.getDbSqlSession(commandContext).getSqlSession().getConnection();
}
jdbcConnection.commit();
if (!jdbcConnection.getAutoCommit()) {
jdbcConnection.commit();
}
DatabaseConnection connection = new JdbcConnection(jdbcConnection);
Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册