logger.debug("Rollback for Error: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution); throw e; logger.debug("Rollback for RuntimeException: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution); throw e; logger.debug("Rollback for Exception: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution);
logger.debug("Rollback for Error: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution); throw e; logger.debug("Rollback for RuntimeException: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution); throw e; logger.debug("Rollback for Exception: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution);
logger.debug("Rollback for Error: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution); throw e; logger.debug("Rollback for RuntimeException: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution); throw e; logger.debug("Rollback for Exception: " + e.getClass().getName() + ": " + e.getMessage()); rollback(stepExecution);
@Override public void afterCompletion(int status) { try { if (status != TransactionSynchronization.STATUS_COMMITTED) { if (oldVersion != null) { // Wah! the commit failed. We need to rescue the step // execution data. copy(oldVersion, stepExecution); stepExecution.incrementRollbackCount(); } } if (status == TransactionSynchronization.STATUS_UNKNOWN) { logger.error("Rolling back with transaction in unknown state"); rollback(stepExecution); stepExecution.upgradeStatus(BatchStatus.UNKNOWN); stepExecution.setTerminateOnly(); } } finally { // Only release the lock if we acquired it, and release as late // as possible if (locked) { semaphore.release(); } locked = false; } }