As part of my Spring Batch process, I have created a class that watches for new files to arrive, stores their names in a database (if they're not already there), and passes that file name in the JobParameters to a job.
I want to use Quartz to schedule looking for new files, and am having a problem with the schedulerContextAsMap in the SchedulerFactoryBean.
If I use the map to inject a string, all is well; my problems start when I also use it to inject a DAO. Here is the ScheduleFactoryBean config:
Both properties get injected, but when a method is called on the dao in the execute() method, nothing (apparently) happens and the job quits.Code:<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="jobFactory" ref="jobFactory" /> <property name="schedulerContextAsMap"> <map> <entry key="message" value-ref="message" /> <entry key="trackingDao" value-ref="cdrTrackingDao" /> </map> </property> <property name="jobDetails"> <list> <ref bean="myJobDetail" /> </list> </property> <property name="triggers"> <list> <ref bean="simpleTrigger" /> </list> </property> </bean>
Is there anything I need to do with the DAO bean itself to make it more "valid"?
Brian


Reply With Quote
