HHH-7910 Corrected thread checking logic

This commit is contained in:
Brett Meyer 2013-03-14 11:57:32 -04:00
parent 11287c2e02
commit 4d1ff8f718
1 changed files with 5 additions and 4 deletions

View File

@ -127,10 +127,8 @@ public class SynchronizationCallbackCoordinatorImpl implements SynchronizationCa
}
public void afterCompletion(int status) {
if ( !settings.isJtaTrackByThread() || isRegistrationThread() ) {
doAfterCompletion( status );
}
else if ( JtaStatusHelper.isRollback( status ) ) {
if ( settings.isJtaTrackByThread() && !isRegistrationThread()
&& JtaStatusHelper.isRollback( status ) ) {
// The transaction was rolled back by another thread -- not the
// original application. Examples of this include a JTA transaction
// timeout getting cleaned up by a reaper thread. If this happens,
@ -140,6 +138,9 @@ public class SynchronizationCallbackCoordinatorImpl implements SynchronizationCa
LOG.warnv( "Transaction afterCompletion called by a background thread! Delaying action until the original thread can handle it. [status={0}]", status );
delayedCompletionHandlingStatus = status;
}
else {
doAfterCompletion( status );
}
}
public void pulse() {