What is the difference between getAllFailureExceptions() and getFailureExceptions() methods of Spring Batch JobExecution class? What is the right one to use for a generic JobExecutionListener that logs job exceptions to a DB?
From what I gathered, a job is just a collection of steps. So then shouldn’t getting the failure exceptions always involve getting all the failure exceptions from the steps?
Take a look at the source, it looks like the difference is it includes the failure exceptions of the StepExecutions
spring-batch/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java