Re-order status update and listener execution

This commit is contained in:
dsyer
2008-06-13 10:21:28 +00:00
parent 125d245d95
commit ab7e4f814f

View File

@@ -166,11 +166,12 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
throw new UnexpectedJobExecutionException("Failed to initialize the step", e);
}
exitStatus = doExecute(stepExecution);
stepExecution.setStatus(BatchStatus.COMPLETED);
exitStatus = exitStatus.and(getCompositeListener().afterStep(stepExecution));
try {
getJobRepository().saveOrUpdateExecutionContext(stepExecution);
stepExecution.setStatus(BatchStatus.COMPLETED);
}
catch (Exception e) {
commitException = e;