- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
Description
Nick Allen opened SPR-16249 and commented
If we call destroySingleton it calls destroyBean which remove it's dependency from dependentBeanMap. Then if we call getBean which create that singleton again, dependency won't be added back to dependentBeanMap (Because it should have been added in AutowiredAnnotationBeanPostProcessor.inject but it won't call registerDependentBeans if it is cached).
Solution: Remove metadataCache of bean in injectionMetadataCache when that bean get destroyed.
Affects: 4.3.10
Issue Links:
- BeanDefinition-aware BeanPostProcessors should clear cache in case of bean definition reset [SPR-17126] #21663 BeanDefinition-aware BeanPostProcessors should clear cache in case of bean definition reset
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement