原因為
Tomcat在shutdown做清理工作的時候,未等待quartz完成cleanShutdown !
即完成AP 關閉動作。
解決方法:
再執行schedule.shutdown();後,做等待。
public void contextDestroyed(ServletContextEvent sce) {
try {
//終止Quartz引擎
log.info("終止Quartz引擎");
Scheduler schedule = schedulerFactoryBean.getScheduler();
if (!schedule.isShutdown()) {
schedule.shutdown();
Thread.sleep(2 * 1000);
}
} catch (Exception ex) {
log.error("終止Quartz排程引擎失敗", ex);
}
}
tomcat-quartz appears to have started a thread named [startQuertz_Worker-1] but has failed to stop i
tomcat-quartz appears to have started a thread named [startQuertz_Worker-1] but has failed to stop i
沒有留言:
張貼留言