May 28th, 2008, 05:26 PM
how to avoid item to be processed more than once?
I have a scenario where the items to be processed will be selected from a database, but I still can't figure out how to stop an item to be processed more than once. flat files will be created from this table a few times a day so I guess each row will have to be flagged so it wont be processed again, but when and how in the spring batch process can this be done? Or if there is another way to avoid this ?
May 28th, 2008, 06:41 PM
Either you have to be able to segregate the records so you can select them separately, or you have to put a 'process indicator' on the records when you write them out. Usually this just entails an update call on the original record from within your ItemWriter.