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

ScheduledAnnotationBeanPostProcessor should unregister tasks on destruction of individual beans [SPR-12216] #16830

Closed
spring-projects-issues opened this issue Sep 17, 2014 · 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

spring-projects-issues commented Sep 17, 2014

Juergen Hoeller opened SPR-12216 and commented

At this point, ScheduledAnnotationBeanPostProcessor cancels all tasks on shutdown of the entire application context. While this is generally fine for the typical singleton bean case, @Scheduled may also be placed on non-singleton beans which we should track for individual unregistration on destruction of each such individual bean.

This is a follow-up to #16803.


Issue Links:

Referenced from: commits ab478d1

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

As of 4.3 RC2, ScheduledAnnotationBeanPostProcessor features a revised registration mechanism capable of tracking individual bean instances, both on creation for beans of any scope and on destruction of each individual bean. In other words, @Scheduled works on any Spring-managed bean now, not just on non-lazy singleton beans anymore.

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