title: jberet, one wildfly instance, multiple datasources: can I use more than one job-repository?
body: <p>We currently have a set of services each running in their respective wildfly 9.0 instance. Some of them have batch jobs implemented using jberet 1.2.0.</p>
  
  <p>Each wildfly instance has one datasource (jdbc, oracle) for the service and one job-repository for jberet defined. Currently the jberet tables are put into the database of the single datasoure of this wildfly instance.</p>
  
  <p>Now we are moving all the batch jobs into a separate wildfly instance to take the load generated by the batches away from the other wildfly instances.</p>
  
  <p>So now we have one standalone.xml with x datasources (one per service). </p>
  
  <p>What's the best practice to define the job-repository/-ies?</p>
  
  <ul>
  <li>one separate job-repository that points to a datasource that only contains jberet stuff (a new DB)</li>
  <li>one job-repository per service pointing to the datasource of that service (is that even possible? How? From looking at <a href="https://github.com/fcorneli/jberet-eap6/blob/master/eap6-batch/src/main/resources/schema/wildfly-batch_1_0.xsd" rel="nofollow noreferrer">https://github.com/fcorneli/jberet-eap6/blob/master/eap6-batch/src/main/resources/schema/wildfly-batch_1_0.xsd</a> I guess it is not possible/intended.)</li>
  <li>have the jberet data go into one of the existing DBs of one of the services (how do I choose which one? Load, size?)</li>
  </ul>