I am creating my first Saga (I started using axon a month ago) along with Quartz scheduler for firing events in the future.
I am asking you fellow axonners if anyone had already created / used mongodb as a store for Quartz ? If it is the case could you please share the config and relevant code concerning that?
Thanks Allard I am trying it right now … How should I register the the Mongo store for QuartzEventScheduler ? I have added the dependency in the classpath and added the quartz.properties but even though It is using RAMJobStore instead of using MongoDBJobStore may be I should set the store in via SchedulerFactoryBean ?
Inc ase you use Spring and the QuartzEventSchedulerFactoryBean, you have to have a bean of type Scheduler in your context. It’s probably easiest to use Spring’s SchedulerFactoryBean for this.
you probably need to explicitly reference the configuration file in your SchedulerFactoryBean.
Note that it’s a FactoryBean, so you shouldn’t (have to) inject it as a dependency directly in your EventScheduler bean configuration. Instead, pass the Scheduler as a parameter in that method. Spring will resolve the dependency through the SchedulerFactoryBean.