Announcement Announcement Module
No announcement yet.
Migrating to new version of Quartz Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Migrating to new version of Quartz

    We are currently using quartz 1.4.3 in our application. We configure jobs and schedulers through spring. We are planning to migrate to Quartz 1.5.0. But spring java doc says its fully compatible with quartz 1.3 and 1.4.
    Anybody integrated spring 1.2.3 with quartz 1.5.0?. Any issues if we migrate to quartz 1.5.0?.

    thanks in advance,

  • #2
    1.5 was not release at the time the javadoc was made so writing about comapatibility with 1.5.0 would have been a bit hard...
    See the changelog of 1.5.0 - apparently the database structure has changed a bit. If you don't depend on this the migration would be straight forward.
    Spring handles the way Quartz is configured so it should not be any problem on it's side.


    • #3
      quartz 1.5 JobFactory

      I'm a newbie to Spring, so sorry if this question looks stupid.

      Quartz 1.5 brings a new feature (providing JobFactory) which allows for IoC container to be used for job instantiation. Since Quartz 1.5 was release later then latest Spring release, I guess there is no built-in support for providing JobFactory thru SchedulerFactoryBean.

      What is best way to do it then?
      Quartz Scheduler instance should be obtained and setJobFactory(JobFactory factory) method must be called where Spring based factory may be provided.

      Has someone solved this already?



      • #4

        I've create s SpringJobFactory that can now take a Spring bean as the job. The key is that you must specify the bean name as a param in the JobDataMap. No more QuartzJobBeans, I just use simple spring beans as the job (so I can actually use aop, and wrap my jobs in hibernate, which was key for me).

        I extended SchedulerFactoryBean to add a jobFactory property and over-ride startScheduler, so that if there is a set jobFactory, then it is set just prior to starting the scheduler.

        finally, I exented SimpletriggerBean and CronTriggerBean to allow for very simple creating of spring bean jobs. I can post the code if anyone has an interest.


        • #5
          code for new quartz

          Originally posted by maulinpshah
          I can post the code if anyone has an interest.
          Yes please post the code. Thank you.