Results 1 to 2 of 2

Thread: Scheduler and Service Layer

  1. #1

    Default Scheduler and Service Layer

    hi,

    i need to manage the scheduler from my service layer in order to add, remove / modify jobs which are define in the applicationContexte.xml file.

    How to pass a ref of the scheduler to my manager ?

    Thanks,

    Fabien

  2. #2
    Join Date
    Aug 2004
    Location
    Roeselare, Belgium
    Posts
    16

    Default

    You probably have something like this in your XML:

    Code:
    <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    The SchedulerFactoryBean implements the FactoryBean interface, which means that instead of returning an instance of that class, it creates new objects.

    So you can just use
    Code:
    context.getBean&#40;"scheduler"&#41;
    The returned instance will be of type StdSchedulerFactory, unless you specify another one with the property schedulerFactoryClass.

Posting Permissions

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