I am working on a Spring batch application where I have used RetryTemplate
with SimpleRetryPolicy
.
In this application, ItemProcessor
You can define transactional-attributes
to a given step. (https://docs.spring.io/spring-batch/trunk/reference/htmlsingle/#transactionAttributes)
Transaction attributes can be used to control the isolation, propagation, and timeout settings.
If you're using Java configuration check https://stackoverflow.com/a/23921558/1942642.