Announcement Announcement Module
Collapse
No announcement yet.
Spring, Quartz and Contexts Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring, Quartz and Contexts

    Hi,

    We are using quartz but have a different persistence system for our Job Store, and in fact have written a new Job Store for Quartz. This Job Store needs access to the Application Context to find its peers.

    The problem is that the quartz scheduler loads the job store (via its own configuration), and hides it within the scheduler. i.e. there is no access to the job store singleton.

    Is there a way that a singleton (i.e. our job store) that is not managed by the spring container can find the Application Context ?

    Best Rgds, Peter Haig

  • #2
    I'm looking at the source code of Quartz and Spring.

    It see that you can implement your own SchedulerFactory, maybe best here to override StdSchedulerFactory. You override that part where JobStore is initialized and replace it with your own JobStore, which can already be Spring bean wired (also implementing ApplicationContextAware - so you get your wanted app. context).

    And for Spring's SchedulerFactoryBean, I see it takes schedulerFactory class:
    SchedulerFactory schedulerFactory = (SchedulerFactory) BeanUtils.instantiateClass(this.schedulerFactoryCl ass);
    So you can easily initialize your own (mentioned on top) factory.

    This is just my quick look, I hope it helps.

    Rgds, Ales

    Comment


    • #3
      Quartz and COntexts.

      Thanks...I'll look into it...peter h.

      Comment

      Working...
      X