title: Spring Batch. How to limit the no of executions of a chunk
body: <p>I started to use spring batch very recently. Can any body tell me how to limit the no of execution of a chunk (i.e. invocation of ItemReader and ItemWrite) within a tasklet.</p>
  
  <p>I set the allow-start-if-complete="false", start-limit="1" in the tasklet. Then I set commit-interval="1" in the chunk. </p>
  
  <pre><code>&lt;batch:step id="mig-chain-data"&gt;
  &lt;batch:tasklet allow-start-if-complete="false" start-limit="1"&gt;
  &lt;batch:chunk commit-interval="1" reader="reader" writer="writer"&gt;&lt;/batch:chunk&gt;
  &lt;/batch:tasklet&gt;
  &lt;/batch:step&gt;
  </code></pre>
  
  <p>My expectation is to run the tasklet/chunk only once for every batch job execution. But the behavior was the chunk(reader and writer) gets invoked several times/infinite.</p>
  
  <p>Can anybody help me on this regards please.</p>