title: Define an in-memory JobRepository
body: <p>I'm testing Spring Batch using Spring boot. My need is to define jobs working on an Oracle Database but I don't want to save jobs and steps states inside this DB.
  I've read in the documentation I can use a in-memory repository with the MapJobRepositoryFactoryBean.</p>
  
  <p>Then, I've implemented this bean:</p>
  
  <pre><code>@Bean
      public JobRepository jobRepository() {
          MapJobRepositoryFactoryBean factoryBean = new MapJobRepositoryFactoryBean(new ResourcelessTransactionManager());
          try {
              JobRepository jobRepository = factoryBean.getObject();
              return jobRepository;
          } catch (Exception e) {
              e.printStackTrace();
              return null;
          }
      }
  </code></pre>
  
  <p>But when my job starts, the first thing Spring Batch does is to create the table in the Oracle DB and continues to use the Oracle datasource. It's like my JobRepository definition isn't taken account. </p>
  
  <p>What did I miss ?</p>
  
  <p><strong>EDIT</strong>: I'm using Spring Boot 1.5.3 and Spring Batch 3.0.7</p>