Scheduled/JmsListenerAnnotationBeanPostProcessor needlessly scans every scoped instance [SPR-12189] #16803
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Jean-Baptiste Nizet opened SPR-12189 and commented
ScheduledAnnotationBeanPostProcessor scans the methods of all the beans created by Spring for
@Scheduled
annotations. But this also includes, in a web application, all the request- and session-scoped beans, created long after the context has been started and the tasks have been scheduled.It thus has two implications:
A flag could be set to true as soon as afterSingletonsInstantiated() has been called, and the postProcessAfterInitialization() method would do nothing if this flag is set.
Affects: 3.2.11, 4.0.7, 4.1 GA
Issue Links:
@Scheduled
no longer works in case of multiple proxied target classes implementing the same interfaceReferenced from: commits 58b22ce, 37da706, d2e8b7e
Backported to: 4.0.8, 3.2.12
The text was updated successfully, but these errors were encountered: