Skip to content

Quartz SchedulerFactoryBean delayed start [SPR-6382] #11048

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions