Advertisement
Guest User

Untitled

a guest
May 24th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. try {
  2. getCompositeListener().beforeStep(stepExecution);
  3. open(stepExecution.getExecutionContext());
  4. afterOpen(stepExecution.getExecutionContext());
  5.  
  6. try {
  7. doExecute(stepExecution);
  8. }
  9. catch (RepeatException e) {
  10. throw e.getCause();
  11. }
  12.  
  13. beforeClose(stepExecution.getExecutionContext());
  14. exitStatus = ExitStatus.COMPLETED.and(stepExecution.getExitStatus());
  15.  
  16. // Check if someone is trying to stop us
  17. if (stepExecution.isTerminateOnly()) {
  18. throw new JobInterruptedException("JobExecution interrupted.");
  19. }
  20.  
  21. // Need to upgrade here not set, in case the execution was stopped
  22. stepExecution.upgradeStatus(BatchStatus.COMPLETED);
  23. logger.debug("Step execution success: id=" + stepExecution.getId());
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement