I am trying to set some quartz properties at runtime.
Here is a part of my xml:
Code of ExampleBusinessObject:HTML Code:<bean id="exampleBusinessObject" class="nl.group2000.sca.examples.examplequartzjob.common.ExampleBusinessObject"> <property name="schedulerFactory" ref="scheduler" /> </bean> <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="cronTrigger" /> <ref bean="simpleTrigger" /> </list> </property> </bean>
The problem is the method setSchedulerFactory. From the xml I pass a SchedulerBeanFactory. However, upon execution I get:Code:private SchedulerFactoryBean schedulerFactory; public void setSchedulerFactory(SchedulerFactoryBean schedulerFactory) { System.out.println("inside setSchedulerFactoryBean"); this.schedulerFactory = schedulerFactory; props(); } private void props() { Properties props = new Properties(); props.setProperty("org.quartz.jobStore.class","org.quartz.impl.jdbcjobstore.JobStoreTX"); schedulerFactory.setQuartzProperties(props);
Cannot convert value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFac toryBean]
I do understand the problem but I need a SchedulerFactorybean to be able to call the setQuartzProperties. How can I achieve this?
Thnx in advance.
bado


Reply With Quote
