Reading http://www.quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigJobStoreCMT.html it says that JTA transactions are supported with JobStoreCMT
Is it possible to configure quartz to run with JPA transaction manager? If not I assume Atomikos or Bitronix should be used with spring to enable JTA?
Basically I want quartz scheduler to roll back if the exception is thrown e.g.
@Transactional
public void scheduleJob(QuartzJobData quartzJobData) throws Exception {
SimpleTrigger trigger = (SimpleTrigger) newTrigger()
.withIdentity(name, group)
...
.build();
scheduler.scheduleJob(trigger);
throw new Exception("my exception");
// after exception I'd expect quartz to roll back
}
Note that I don't have any problems with running transactions in quartz jobs themselves. I only have problems with quartz scheduler not rolling back as shown in code example above.