Java Reference
In-Depth Information
<tasklet>
<chunk reader="customerItemReader" writer="outputWriter"
commit-interval="10"/>
<listeners>
<listener ref="emptyFileFailer"/>
</listeners>
</tasklet>
</step>
By running a job with this step configured, instead of your job ending with the status COMPLETED
if no input was found, the job will fail, allowing you to obtain the expected input and rerun the job.
Summary
Reading and writing take up the vast majority of a batch process and as such, is one of the most
important pieces of the Spring Batch framework. In this chapter, you took a thorough (but not
exhaustive) look at the ItemReader options within the framework. Now that you can read in an item, you
need to be able to do something with it. ItemProcessors, which make things happen, are covered in the
next chapter.
 
Search WWH ::




Custom Search