Quartz SchedulerFactoryBean delayed start [SPR-6382] #11048
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Nickolay Mazurkin opened SPR-6382 and commented
I've created Quartz scheduler with SchedulerFactoryBean factory. To start scheduler automatically I've set "autoStartup" property to "true" and "startupDelay" property to "120" seconds (exact duration has no sense here). Application starts properly and then scheduler starts in 120 seconds after factory has been created in context.
So, everything works fine. But now imagine the following situation.
Right after the application successfully start I decide to shutdown it. This could be required for some reasons. This situation is typical when developing.
So Tomcat has been shutdowned. Context has been destroyed. But SchedulerFactoryBean's thread is still sleeping and waiting while specified timeout ends. The JVM is waiting for this thread and can not be closed. And after timeout ends the Quartz scheduler starts in destroyed context.
My idea is to set "daemon flag" in SchedulerFactoryBean's waiting thread - this will prevent JVM from waiting this useless thread.
Affects: 3.0 RC1
Referenced from: commits 08f9f8b
The text was updated successfully, but these errors were encountered: