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

Inner bean behind BeanFactoryPostProcessor should be able to receive application events [SPR-14783] #19349

Closed
spring-projects-issues opened this issue Oct 6, 2016 · 1 comment

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 6, 2016

Pavel Mukhataev opened SPR-14783 and commented

Spring bean doesn't get subscribed to application events if inner bean is used as a property for bean that implements BeanFactoryPostProcessor.

BeanFactoryPostProcessor bean itself get subscribed to application events, while it's inner beans are not.

Source code to reproduce problem: https://github.com/mpashka/checkSpringInitialization


Affects: 4.3.3

Reference URL: https://github.com/mpashka/checkSpringInitialization

Issue Links:

  • #12513 Application event listeners not removed from listener registry on listener destroy
  • #10718 ApplicationListener callbacks to be supported for inner beans as well
  • #18317 Avoid scoped destruction callbacks in case of no post-processor actually applying
  • #18788 ApplicationListenerDetector should prevent serialization of its ApplicationContext reference
  • #19445 ApplicationListenerDetector should ignore non-managed bean instances
@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 28, 2016

Juergen Hoeller commented

Addressed through early registration of our ApplicationListenerDetector ahead of BeanFactoryPostProcessor initialization, subsequently re-registered after BeanPostProcessor initialization in order to pick up proxies etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants