title: Spring Batch - late binding of commit interval not working with skip policy
body: <p>I'm trying to use the late binding on the commit-interval attribute of a chunk.</p>
  
  <p>When the chunk doesn't contain a skip-policy or retry-policy, it works fine but as soon as a skip-policy is added (or even a retry-policy), the commit-interval is not taken into account and the batch works as if the commit-interval is set to 1. The weird thing is, when the commit-interval is hard coded, it works fine...</p>
  
  <p>So this configuration works fine : </p>
  
  <pre><code>&lt;chunk reader="multiAccuseReceptionItemReader" 
                     processor="enrichissementPrescriptionItemProcessor"
                     writer="prescriptionItemWriter" 
                     commit-interval="#{jobExecutionContext['commits']}"&gt;
  </code></pre>
  
  <p>This one works fine also :</p>
  
  <pre><code>&lt;chunk reader="multiAccuseReceptionItemReader" 
                     processor="enrichissementPrescriptionItemProcessor"
                     writer="prescriptionItemWriter"
                     skip-policy="skipPolicy"
                     commit-interval="3"&gt;
  </code></pre>
  
  <p>But this one doesn't take into account the commit-interval and set it to 1 : </p>
  
  <pre><code>&lt;chunk reader="multiAccuseReceptionItemReader" 
                     processor="enrichissementPrescriptionItemProcessor"
                     writer="prescriptionItemWriter"
                     skip-policy="skipPolicy"
                     commit-interval="#{jobExecutionContext['commits']}"&gt;
  </code></pre>
  
  <p>I tried to use completion-policy with the simpleCompletionPolicy instead of the commit-interval, but it's even worse : when there is a skip-policy or a retry-policy, the chunkSize is not taken into account, even if it is hard coded. Without any skip-policy or retry-policy the chunkSize is taken into account (hard coded or late binding).</p>
  
  <p>I'm using Spring Batch 2.2.0 (and can't change).</p>
  
  <p>Why this behavior?
  How can I dynamically set the commit-interval with a skip-policy and a retry-policy?</p>