Reputation: 27
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.
Upvotes: 0
Views: 1568
Reputation: 118
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.
Upvotes: 1