title: Get current resource name using MultiResourceItemReader Spring batch
body: <p>I am using <code>MultiResourceItemReader</code> in Spring Batch for reading multiple XML files and I want to get current resource.Here is my configuration:</p>
  
  <pre><code>public class MultiFileResourcePartitioner extends MultiResourceItemReader&lt;MyObject&gt; {
      @Override
      public void update(final ExecutionContext pExecutionContext) throws ItemStreamException {
          super.update(pExecutionContext);
          if (getCurrentResource() != null &amp;&amp; getCurrentResource().getFilename() != null) {
              System.out.println("update:" + getCurrentResource().getFilename());
          }
      }
  }
  </code></pre>
  
  <p>And my reader:</p>
  
  <pre><code>&lt;bean id="myMultiSourceReader"
     class="mypackage.MultiFileResourcePartitioner"&gt;
     &lt;property name="resources" value="file:${input.directory}/*.xml" /&gt;
  
  &lt;/bean&gt;
  </code></pre>
  
  <p>The code above read XML files correctly but the method <code>getCurrentResources()</code> return null.
  By debugging, the batch enter to update method</p>
  
  <p>Please help!</p>