Brett Meyer commented on Bug HHH-7910

Scott Marlow and I discussed a bit more today. With sole respect to Hibernate's Session, the issue is limited to 2 failure cases: the background thread times-out the Transaction and calls our afterCompletion during 1.) while the application thread is in the middle of a Session call (fetch, etc.) or 2.) while the application thread is not currently in the middle of any Session call.

As already mentioned, this will require us to check the flag on both method entry and exit.

The entry check should be able to simply call clear(), then continue processing.

What should happen on the exit check? Clear and attempt to "cleanly" return? Clear and throw a SessionException?

Unless I'm missing something, I understand Tom Jenkinson's point that the completion event can be initiated by remote servers, but that shouldn't affect us. The problem purely stemmed from attempting to clear the Session after a non-commit status was received. (Please correct me if I'm wrong.)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira