[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: am_84  XML
Profile for am_84 -> Messages posted by am_84 [1]
Author Message
Hello,

I am using 2.2.0 version of quartz scheduler along with SPRING 3.2.0_RELEASE, tomcat7 and jdk7.

I can see my cron running correctly but when i shutdown tomcat, the threads are not getting destroyed causing tomcat to never shutdown and throwing the following memory leak error.

SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-4] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-7] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/temp] appears to have started a thread named [QuartzScheduler_Worker-9] but has failed to stop it. This is very likely to create a memory leak.
Sep 03, 2013 10:43:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

I followed the steps documented at following but it didn't help. Please advise on how to proceed ?
http://quartz-scheduler.org/documentation/quartz-2.2.x/cookbook/ServletInitScheduler

My bean config is as following:

@Bean
public JobDetailFactoryBean tempJob() {
final JobDetailFactoryBean tempFactory = new JobDetailFactoryBean();
tempFactory.setJobClass(ActivityNotificationMetricsJob.class);
tempFactory.setName("TEMP_JOB_NAME");
tempFactory.setDurability(true);
final Map<String, Job> jobData = new HashMap<String, Job>();
jobData.put("tempTask", tempTask());
tempFactory.setJobDataAsMap(jobData);
tempFactory.afterPropertiesSet();
return tempFactory;
}

@Bean
public SimpleTriggerFactoryBean tempSimpleTrigger() throws ParseException {
final SimpleTriggerFactoryBean tempSimpleTriggerFactory = new SimpleTriggerFactoryBean();
tempSimpleTriggerFactory.setName("TEMP_TRIGGER_NAME");
tempSimpleTriggerFactory.setJobDetail(tempJob().getObject());
tempSimpleTriggerFactory.setStartDelay(5 * 1000);
tempSimpleTriggerFactory.setRepeatInterval(5 * 1000);
tempSimpleTriggerFactory.afterPropertiesSet();
return tempSimpleTriggerFactory;
}

@Bean
public SchedulerFactoryBean tempSchedulerFactory() throws Exception {
final SchedulerFactoryBean tempSchedulerFactory = new SchedulerFactoryBean();
tempSchedulerFactory.setJobDetails(new JobDetail[] { tempJob()
.getObject() });
tempSchedulerFactory.setTriggers(new Trigger[] { tempSimpleTrigger()
.getObject() });
tempSchedulerFactory.afterPropertiesSet();
return tempSchedulerFactory;
}


Thanks,
Amar
 
Profile for am_84 -> Messages posted by am_84 [1]
Go to:   
Powered by JForum 2.1.7 © JForum Team