Closed spring-projects-issues closed 20 years ago
Juergen Hoeller commented
The SchedulerFactoryBean itself is not meant to be accessed directly. Rather, when you refer to it via a bean reference, it will return the Quartz Scheduler that it built - because it is a FactoryBean.
\
Scheduler scheduler = (Scheduler) ctx.getBean("scheduler)
Of course, this also works via bean references: \ will return a Scheduler object.
Use that org.quartz.Scheduler instance to register further jobs and triggers; that's what I'm doing myself regularly. SchedulerFactoryBean itself doesn't need to know about those.
Juergen
Juergen Hoeller commented
Considered as resolved: available by accessing the created Scheduler rather than the SchedulerFactoryBean itself.
Juergen
Hugues L opened SPR-196 and commented
This is a minor adition to the SchedulerFactoryBean class. For the sake of our project, we need to register programatically Quartz triggers, calendars and jobDetails to an existing scheduler.
As we maintain a central scheduler with Spring, wrapped in a Spring managed SchedulerFactoryBean instance, we are proposing a patch to add individual triggers, calendars and jobDetails to the ones managed by SchedulerFactoryBean.
Maybe we are not using the correct way of doing things (maybe we should not use SchedulerFactoryBean?), but as we want to leverage all the benefits of Spring, this what we thought we could use.
Thanks for reviewing, and congratulations for the nice framework,
Hugues.
I copy the aded code below :
Affects: 1.0.2