HHH-7910 Corrected thread checking logic
This commit is contained in:
parent
11287c2e02
commit
4d1ff8f718
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue