During development a SPRING based scheduler in a tomcat container, I always get this logoutput at undeploy webapp or shutdown server:
Apr 28, 2010 4:21:33 PM
Imho this is an issue of the quartz scheduler. I filed a bug https://jira.terracotta.org/jira/browse/QTZ-192. As a workaround the sleep() solution suggested by Colin Peters works for me. To not trigger the shutdown twice one could also add the sleep to Spring's SchedulerFactoryBean:
import org.quartz.SchedulerException;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
public class SchedulerFactoryBeanWithShutdownDelay extends SchedulerFactoryBean{
@Override
public void destroy() throws SchedulerException {
super.destroy();
// TODO: Ugly workaround for https://jira.terracotta.org/jira/browse/QTZ-192
try {
Thread.sleep( 1000 );
} catch( InterruptedException e ) {
throw new RuntimeException( e );
}
}
}