My XML Step declaration
<step id="MongoDbLoadDataStep" next="checkStatusStep">
<tasklet>
<chunk reader="MongoReader" writer="MongoWriter" commit-interval="5"/>
</tasklet>
</step>
A reader has only one method read
and no chance to increase reads counter or to get access to Spring StepContribution
instance. So I need to find a way how to provide a mechanism that could allow me to increment step reads counter. In Tasklet
we have very convenient method:
RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)
But in XML there is only default Tasklet which is managed by Spring internals. Any ideas how can I do that?
PS
I can't modify XML Batch configuration