That's a very good question and I think you're right about reducing the chunk size to 1.
However, what I want to achieve is to read chunks of data from the database while treating them individually in terms of rollback.
Actually, after having posted this thread, I found something, but I am not sure if this is the right way.
I added the following attribute to the tasklet and the job does exactly what I want it to do.
Code:
<batch:transaction-attributes propagation="NOT_SUPPORTED"/>
I really need your opinions about that.
Regards