tried to integrate quartz and spring, as you suggested, but ran into two other problems:
1.) IncompatibleClassChangeError exception when using Quartz 2.x and spring 3.x. This is a known issue, but I did not find any solution for it.
2.) Injecting another spring bean into the Quarz job instance. I found some solutions, but no one works for me. I tried one with
<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="jobFactory"> <bean class="org.springframework.scheduling.quartz.SpringBeanJobFactory" /> </property> <property name="triggers"> ... </property> <property name="schedulerContextAsMap"> <map> <entry key="inputEndpoint" value-ref="my-endpoint" /> </map> </property> </bean>
to enter other beans into the task, but after adding this property to the SchedulerFactoryBean, the tasks are not executed (and I see no exception). Removing the "schedulerContextAsMap" property makes the job run again.
marc7
source share