我有一个带有以下 grails-app/conf/QuartzConfig.groovy
的 Grails 应用程序:
quartz {
autoStartup = true
jdbcStore = false
waitForJobsToCompleteOnShutdown = false
exposeSchedulerInRepository = false
interruptJobsOnShutdown = true
props {
scheduler.skipUpdateCheck = true
}
}
然而,每次我关闭 Tomcat 时,都会有一个进程挂起,我必须将其杀死。根据上面的配置文件,这不应该发生。我应该使用其他属性来实现此目的吗?
此外,在 Tomcat 启动时,我看到 10 行(对于 10 个 Quartz 线程):
SEVERE: The web application [/test] appears to have started a thread named [DefaultQuartzScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
上面也没有随着config文件中的属性变化,貌似跟挂机过程有关。任何帮助将不胜感激。
最佳答案
使用最新版本的 Quartz 插件。我们在一天前发布了它。
关于tomcat - Tomcat 上的 Grails 和 Quartz : how to gracefully shutdown,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19784692/