Difference between Batch Status and Exit Status in Spring Batch

Sravan Kumar picture Sravan Kumar · Dec 9, 2013 · Viewed 11.6k times · Source

Difference between Batch Status and Exit Status in Spring Batch

Answer

Vidya picture Vidya · Dec 9, 2013

From the Spring Batch documentation:

A BatchStatus object that indicates the status of the execution. While running, it's BatchStatus.STARTED, if it fails, it's BatchStatus.FAILED, and if it finishes successfully, it's BatchStatus.COMPLETED

The ExitStatus indicating the result of the run. It is most important because it contains an exit code that will be returned to the caller.

For more on the difference, see the section 5.3.2.1. Batch Status vs. Exit Status. You will find the explanation is quite good.