title: How to get JobExecutionContext from a Partitioner
body: <p>I have a InitTasklet that runs before an Master/Slave with partitioner strategy. In this initial tasklet I access the database and get a list with ids and put into context:</p>
  
  <pre><code>chunkContext.getStepContext().getStepExecution().getJobExecution()
  .getExecutionContext().put("listaBancos", lista);
  </code></pre>
  
  <p>I need to access this list in my Partitioner</p>
  
  <p>I tried this way with no success: the method beforeJob is never executed. </p>
  
  <pre><code>public class BancoPartitioner extends JobExecutionListenerSupport ...
  
  @Override
  public void beforeJob(JobExecution jobExecution) {
      this.context = jobExecution.getExecutionContext();
      super.beforeJob(jobExecution);
  </code></pre>
  
  <p>}</p>
  
  <p>I tried to autowired the stepExecution this way:
      @Value("#{stepExecution}")
      private StepExecution stepExecution;</p>
  
  <p>but I get an exception:</p>
  
  <pre><code>Error creating bean with name 'bancoPartitioner': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.batch.core.StepExecution .....stepExecution; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'stepExecution' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext'.
  </code></pre>
  
  <p>Is there any way to access the Execution context from a Partitioner? </p>