Spring 2.0.2
Quartz 1.6.0
Tomcat 5
JDK 1.4.2_11
I'm using Quartz in my web app. When I attempt to shutdown Tomcat, the Quartz threads don't shutdown. Here's my config:
<beans>
<bean name="logCacheStatisticsJob" class="org.springframework.scheduling.quartz.JobDe tailBean">
<property name="jobClass" value="com.metavante.its.services.scheduling.quart z.LogCacheStatisticsJob" />
<property name="jobDataAsMap">
<map>
<entry key="cacheRegistry">
<ref bean="cacheRegistry"/>
</entry>
</map>
</property>
</bean>
<bean id="cacheStatisticsCronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
<property name="jobDetail" ref="logCacheStatisticsJob" />
<!-- Every 2 minutes -->
<property name="cronExpression" value="0 0/2 * * * ?" />
<!-- Every 15 minutes -->
<!-- <property name="cronExpression" value="0 0,15,30,45 * * * ?" /> -->
</bean>
<bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean" destroy-method="destroy">
<property name="triggers">
<list>
<ref bean="cacheStatisticsCronTrigger" />
</list>
</property>
</bean>
</beans>
I looked at the source code for Spring's SchedulerFactoryBean and I see where the scheduler should be shutting down, but it's not happening.
/**
* Shut down the Quartz scheduler on bean factory shutdown,
* stopping all scheduled jobs.
*/
public void destroy() throws SchedulerException {
logger.info("Shutting down Quartz Scheduler");
this.scheduler.shutdown(this.waitForJobsToComplete OnShutdown);
}
Any ideas how I can fix this?


Reply With Quote
