-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Description
Kenny MacLeod opened SPR-6660 and commented
Having recently encountered an obscure bug where a bean definition had both scope="prototype" and destroy-method specified, I'd like to suggest that when the bean scope is "prototype", the bean definition is not allowed to also specify destroy-method, since it will never be invoked.
Ideally, this would also apply to @PreDestroy-annotated bean classes, throwing an exception when the bean definition is parsed, but that might be a step too far.
Affects: 3.0 GA
Issue Links:
- Support DisposableBean on prototype and @Configurable beans using weak references [SPR-9391] #14027 Support DisposableBean on prototype and
@Configurablebeans using weak references
1 votes, 2 watchers
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement