Hi,
Supposing I am using JpaPagingItemReader to read from a database. I have implemented chunk based processing like shown below.
In case this job failed in the middle and I need to resume it and I want to pick up where it left off. How does it know where to begin? Is it based on the COMMIT_COUNT field of the BATCH_STEP_EXECUTION table?
Also what if someone deleted some rows, will that throw off JpaPagingItemReader? If so then is there another Item Reader in the Spring batch aresenal that can handle this?
Thanks,
Jahan
Code:<job id="loadAdviceJob" xmlns="http://www.springframework.org/schema/batch"> <step id="loadHeaderStep" > <tasklet transaction-manager="jpaTransactionManager"> <chunk reader="AdviceHeaderReader" processor="AdviceHeaderProcessor" writer="AdviceHeaderWriter" commit-interval="10" /> <bean id="AdviceHeaderReader" class="org.springframework.batch.item.database.JpaPagingItemReader"> <property name="entityManagerFactory" ref="AS400entityManagerFactory" /> <property name="queryString" value="select a from Advphy01 a " />


Reply With Quote