According to the spring batch/retry documentation (http://docs.spring.io/spring-batch/reference/html/retry.html) in section 9.2 one can specify which exceptions you would like to retry or not retry on via setRetryableExceptions or setFatalExceptions when using the SimpleRetryPolicy. However, these methods are not defined in the current release (1.0.3) in GitHub https://github.com/spring-projects/spring-retry/blob/master/src/main/java/org/springframework/retry/RetryPolicy.java .
So, is this a documentation error? If not, then where are the methods located?
From the source code, it seems that only the retryable exceptions can be set via the constructor that takes a Map of exceptions. There doesn't appear to be a way to define the fatal exceptions.