logger.debug("Registering after-completion synchronization with existing JTA transaction");
try {
doRegisterAfterCompletionWithJtaTransaction(txObject, synchronizations);
}
catch (SystemException ex) {
throw new TransactionSystemException("JTA failure on registerSynchronization", ex);
}
catch (Exception ex) {
// Note: JBoss throws plain RuntimeException with RollbackException as cause.
if (ex instanceof RollbackException || ex.getCause() instanceof RollbackException) {
logger.debug("Participating in existing JTA transaction that has been marked for rollback: " +