Announcement Announcement Module
Collapse
No announcement yet.
Scheduler and Service Layer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X