0
votes

I have a very simple spring batch which update one millon records from a table. As it is very simple I tried to implement only one Tasklet in which I update the table.

But I'd like to commit with a step of 10 records. Is it possible to do that in a tasklet or am I forced to use itemReader/ItemWriter with chunks ?

Thanks by advance.

1

1 Answers

1
votes

A tasklet is not designed to do that. A tasklet should be used to do a task that can be executed in one hit.

If you want to update your million records with transactions of 10 records (which I understand), the proper way to do this is to use a read-process-write step.