Apr 29th, 2011, 02:37 PM
Stop retry in chunk processing
The following is the use case for my batch. Read from the database, process the item by calling a web service, update the item in the database using item writer. I am returning the exception in the processor when the processing fails. The problem is it retries the chunk from element 0 again and that is causing my successfully processed items being reprocessed. In this case, it is a web service and hence cannot be rollback. Here is the snippet of the configuration in my job.
<batch:step id="loadData" parent="simpleStep">
<batch:chunk reader="sourceReader" processor="cbrItemProcessor"
<batch:stream ref="badItemWriter" />
<batch:listener ref="baseSkipListener" />
<batch:listener ref="dataCopyMailListener" />
<batch:next on="COMPLETED" to="filePurge" />
<batch:end on="FAILED" />
I did set the retry-limit=0 and still the retry couldnt be avoided. Could someone please help me on this?