We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error
The ThreadLocalTxManager has this method:
ThreadLocalTxManager
@Override public <T> T txUnwrappedResult(UnitOfWorkCall<T> unit) throws Exception { begin(); try { T result = unit.call(); commit(); return result; } catch (Exception e) { rollback(); throw e; } }
Trouble is when unit throws an Error (for example: JUnit test with fail). The connection will not be released, there will be no commit or rollback.
unit
fail
commit
rollback
In my very case, next test after the one which was calling fail was hanging forever because of this.
I think we need a finally clause here.
finally
The text was updated successfully, but these errors were encountered:
ThreadLocalTxManager: never miss a rollback #5
ad553f0
No branches or pull requests
The
ThreadLocalTxManager
has this method:Trouble is when
unit
throws anError
(for example: JUnit test withfail
). The connection will not be released, there will be nocommit
orrollback
.In my very case, next test after the one which was calling
fail
was hanging forever because of this.I think we need a
finally
clause here.The text was updated successfully, but these errors were encountered: