Announcement Announcement Module
No announcement yet.
Spring + Quartz on Tomcat issue Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring + Quartz on Tomcat issue


    I am using Spring for (among others) configuring Quartz for a scheduled task in a web application.
    Here is my configuration:

    <bean id="automatedArchivingAgentJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    	<property name="targetObject" ref="automatedArchivingAgent" />
    	<property name="targetMethod" value="run" />
    	<property name="concurrent" value="false" />
    <bean id="automatedArchivingAgentTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    	<property name="jobDetail" ref="automatedArchivingAgentJobDetail" />
    	<property name="cronExpression" value="0 0 0 ? * SAT" />
    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" destroy-method="destroy">
    	<property name="triggers">
    			<ref bean="automatedArchivingAgentTrigger" />
    	<property name="quartzProperties">
    			<prop key="org.quartz.threadPool.threadCount">1</prop>
    	<property name="waitForJobsToCompleteOnShutdown" value="true" />
    I am testing the application in Tomcat.
    The problem is that when stopping / restarting the server, I get a warning that says:

    SEVERE: The web application [/App] appears to have started a thread named [org.springframework.scheduling.quartz.SchedulerFac toryBean#0_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
    I read the SchedulerFactoryBean documentation and then searched the web, but couldn't find a fix for the problem.

    The steps I took:
    • Added the destroy-method="destroy" attribute to the SchedulerFactoryBean.
    • Set the "waitForJobsToCompleteOnShutdown" property to true.
    • Set "org.quartz.threadPool.threadCount" to 1 as I don't need multiple threads for my task.

    Unfortunately, none of those fixed the problem.

    I am using:
    Spring 3.0.5
    Quartz 1.6.3
    Tomcat 6.0.32

  • #2
    Any help?

    After several restarts, the server is not stopping anymore, it just waits, printing nothing.

    I would be glad to provide more information.