[
https://issues.apache.org/jira/browse/DELTASPIKE-425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Struberg resolved DELTASPIKE-425.
--------------------------------------
Resolution: Fixed
> DependentProvider#destroy() must not destroy NormalScoped instances
> -------------------------------------------------------------------
>
> Key: DELTASPIKE-425
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-425
> Project: DeltaSpike
> Issue Type: Improvement
> Components: Core
> Affects Versions: 0.5
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Fix For: 0.6
>
>
> Our DependentProvider is intended to hold information (the Bean, the
> contextual instance and the CreationalContext) of @Dependent scoped
> instances. This allows us to later invoke #destroy() which will properly
> cleanup this instance (mainly calling @PreDestroy if available).
> For NormalScoped instances we must not perform any action in destroy as
> NormalScoped beans always have their own lifecycle which we must not disrupt.
> Which means the DependentProvider#destroy() method must detect whether the
> provided instance is NormalScoped and skip any action in this case.
--
This message was sent by Atlassian JIRA
(v6.1#6144)