String messageString =
"Managed bean with Transactional annotation and TxType of REQUIRES_NEW " +
"encountered exception during begin " +
exception;
_logger.log(java.util.logging.Level.INFO, CDI_JTA_MBREQNEWBT, exception);
throw new TransactionalException(messageString, exception);
}
Object proceed = null;
try {
proceed = proceed(ctx);
} finally {
try {
getTransactionManager().commit();
} catch (Exception exception) {
String messageString =
"Managed bean with Transactional annotation and TxType of REQUIRES_NEW " +
"encountered exception during commit " +
exception;
_logger.log(java.util.logging.Level.INFO, CDI_JTA_MBREQNEWCT, exception);
throw new TransactionalException(messageString, exception);
}
if (suspendedTransaction != null) {
try {
getTransactionManager().resume(suspendedTransaction);
} catch (Exception exception) {
String messageString =
"Managed bean with Transactional annotation and TxType of REQUIRED " +
"encountered exception during resume " +
exception;
_logger.log(java.util.logging.Level.INFO, CDI_JTA_MBREQNEWRT, exception);
throw new TransactionalException(messageString, exception);
}
}
}
return proceed;