if (_txm.getStatus() == Status.STATUS_MARKED_ROLLBACK) {
log.debug("UserTransaction marked for rollback only.");
successfulExecution = false;
}
} catch (SystemException e) {
throw new SchedulerException(
"JTAJobRunShell could not read UserTransaction status.", e);
}
if (successfulExecution) {
try {
if (__log.isDebugEnabled()) __log.debug("Commiting transaction.");
_txm.commit();
} catch (Exception nse) {
throw new SchedulerException(
"JTAJobRunShell could not commit UserTransaction.", nse);
}
} else {
try {
if (__log.isDebugEnabled()) __log.debug("Rollbacking transaction.");
_txm.rollback();
} catch (Exception nse) {
throw new SchedulerException(
"JTAJobRunShell could not rollback UserTransaction.",
nse);
}
}