Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quartz SchedulerFactoryBean delayed start [SPR-6382] #11048

Closed
spring-projects-issues opened this issue Nov 18, 2009 · 1 comment
Closed

Quartz SchedulerFactoryBean delayed start [SPR-6382] #11048

spring-projects-issues opened this issue Nov 18, 2009 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Good idea. That temporary startup thread is marked as daemon now.

Juergen

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 RC3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants