I'm working on a spring batch project in which a step has a reader (JDBC Cursor Item Reader), processor, writer, etc... There was an issue where when reading in a chunk there was a momentary issue with the database. More specifically, it threw an exception due to not being able to create a transaction (with "open" method of implemented JDBC Cursor Item Reader).
However, the odd thing is, that instead of failing the step or even the job it simply moved onto the next chunk where it was able to establish a connection and carried on. I'm aware of the skip/retry options (posted below) and will implement for the future. But I'm curious as to whether this is the default behavior or if something else is afoot?
<batch:tasklet>
<batch:chunk reader="myItemReader" writer="myItemWriter" commit-interval="20" retry-policy="myRetryPolicy"/>
</batch:tasklet>