You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So a bit of a story here but essentially the change in #204 (a revert of an earlier change) broke the support for using Ebean with connections using AutoCommit = true.
In Autocommit mode ... the AutoCommitJdbcTransaction should be used and that overrides the performCommit() and performRollback() methods. It however relies on the connection actually being in autocommit mode and the change in #204 broke that.
This fix pulls out the protected checkAutoCommit() method in JdbcTransaction and allows AutoCommitJdbcTransaction to override that to do nothing ... and hence leave the underlying connection in autocommit mode.
There is a test for this scenario but unfortunately the test was broken (at least it was a case of 2 wrongs getting the correct assert). The test is now more explicit and better asserts that autocommit is used and that commits happen automatically.
The text was updated successfully, but these errors were encountered:
So a bit of a story here but essentially the change in #204 (a revert of an earlier change) broke the support for using Ebean with connections using AutoCommit = true.
In Autocommit mode ... the AutoCommitJdbcTransaction should be used and that overrides the performCommit() and performRollback() methods. It however relies on the connection actually being in autocommit mode and the change in #204 broke that.
This fix pulls out the protected checkAutoCommit() method in JdbcTransaction and allows AutoCommitJdbcTransaction to override that to do nothing ... and hence leave the underlying connection in autocommit mode.
There is a test for this scenario but unfortunately the test was broken (at least it was a case of 2 wrongs getting the correct assert). The test is now more explicit and better asserts that autocommit is used and that commits happen automatically.
The text was updated successfully, but these errors were encountered: