This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Mark Spritzler wrote:My question is why does it rollback at all. If you policy is to skip records when an error occurs, to me means, any error, skip and continue on where you left off. Not go back to the first record.
Maybe your configuration for skip or transactions is off. I don't know much more about Spring Batch.
Thanks for the input!!
Spring batch writes to database in chunk/batch -- like 100 records at a time... So in case of an exception, it does not know which item of the 100 resulted in exception... So for the skip policy to work, it rolls back and starts over writing each item at a time... So that the item where error occurred is caught...
My question is, once the item is found, the rest of the items should again be written off as a batch...... which is not happening........
Say there are 1000 records, and error occurred at 4th record.. so once the 4th item is found, the remaining 996 records should be written as a chunk instead of one at a time...
I don't know any configuration is available to make this possible or whether this behavior is missing from spring batch!!