I configure quartz scheduler using Spring SchedulerFactoryBean like this:
Note the autoStartup = false, I want to start up the scheduler manually by calling the Scheduler.Code:<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="someTrigger" /> </list> </property> <property name="jobFactory" ref="jobFactory" /> <property name="schedulerContextAsMap"> <map> <entry key="somService" value-ref="somService" /> </map> </property> <property name="dataSource" ref="dataSource" /> <property name="transactionManager" ref="transactionManager" /> <property name="autoStartup" value="false" /> </bean>
How do I get handle to the created scheduler? I want to inject into some other bean, where I trigger the scheduler to start.
SchedulerFactoryBean implements FactoryBean, and method public Object getObject() { return this.scheduler; }, so this is somehow related to the answer I guess.


Reply With Quote
