title: Using JobStoreCMT in Quartz - preventing automatic commit
body: <p>I'm trying to use a JDBC Job Store in Quartz with the following code:</p>
  
  <pre><code>DateTime dt = new DateTime().plusHours(2);
  
  JobDetail jobDetail = new JobDetail(identifier, "group", TestJob.class);
  SimpleTrigger trigger = new SimpleTrigger(identifier, dt.toDate());
  
  trigger.setJobName(identifier);
  trigger.setJobGroup("group");
  
  quartzScheduler.addJob(jobDetail, true);
  quartzScheduler.scheduleJob(trigger);
  </code></pre>
  
  <p>And am configuring the scheduler as follows:</p>
  
  <pre><code>&lt;bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false"&gt;
  &lt;property name="autoStartup" value="true" /&gt;
  &lt;property name="waitForJobsToCompleteOnShutdown" value="false" /&gt;
  &lt;property name="dataSource" ref="schedulerDataSource" /&gt;
  &lt;property name="nonTransactionalDataSource" ref="nonTXdataSource" /&gt;
  &lt;property name="quartzProperties"&gt;
      &lt;props&gt;
          &lt;!--Job Store --&gt;
          &lt;prop key="org.quartz.jobStore.driverDelegateClass"&gt;
              org.quartz.impl.jdbcjobstore.StdJDBCDelegate
          &lt;/prop&gt;
  
          &lt;prop key="org.quartz.jobStore.class"&gt;
              org.quartz.impl.jdbcjobstore.JobStoreCMT
          &lt;/prop&gt;
          &lt;prop key="org.quartz.jobStore.tablePrefix"&gt;QRTZ_&lt;/prop&gt;
      &lt;/props&gt;
  &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The <code>schedulerDataSource</code> is a standard JNDI data source, the <code>nonTXdataSource</code> is configured via a simple <code>org.springframework.jdbc.datasource.DriverManagerDataSource</code> I have specified the job store class to be: o<code>rg.quartz.impl.jdbcjobstore.JobStoreCMT</code> and was hoping that the code:</p>
  
  <pre><code>quartzScheduler.addJob(jobDetail, true);
  quartzScheduler.scheduleJob(trigger);
  </code></pre>
  
  <p>would not commit the job to the database when the each method is called. Basically when I call addJob the job is immediately saved to the database, the scheduleJob method causes the trigger information to be immediately saved in the database as well, but this tends to happen over two separate transactions already. </p>
  
  <p>There is a fair bit of subsequent logic in the code that needs to be committed to the database together with the scheduled jobs in one transactions, however no matter what I try the jobs are committed by the scheduler to the database as soon as they methods are called. I tried in various environments Testing/Tomcat/Glassfish and various configurations of data sources but to no avail. </p>
  
  <p>Can somebody point me into the direction of where I am going wrong?</p>
  
  <p>Thank you. </p>