-2

It's possible to use "checkpoint" into "itemReader" and "itemWriter".

If I define a commit each 10 items, the batch reads 10 items and calls the "itemWriter" code. Now, if the "itemWriter" fails (rollback on database), I have:

  • checkinfo for "itemReader" = 10
  • checkinfo for "itemWriter" = 0

So, when I restart the batch, I would like that it restarts with the 1st item and not the 11th.

How can I do that? I think that the "checkpoint infos" are not identical for "itemReader" and "itemWriter".

Scott Kurz
  • 4,985
  • 1
  • 18
  • 40
mikael
  • 1
  • 1
  • impossible to understand, what software product do You use, what code, and what exactly is an error – Jacek Cz Aug 16 '17 at 14:54

1 Answers1

0

If I'm interpreting your question correctly, the answer is that the rollback of the chunk transaction will also cause the update of the reader checkpoint to rollback.

So on restart, the reader will again be (re)positioned at the 1st item.

Scott Kurz
  • 4,985
  • 1
  • 18
  • 40