Results 1 to 3 of 3

Thread: Spring, Quartz and Contexts

  1. #1

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default

    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

  3. #3

    Default Quartz and COntexts.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •