Github user rsmeral commented on a diff in the pull request:

    https://github.com/apache/deltaspike/pull/27#discussion_r28320133
  
    --- Diff: documentation/src/main/asciidoc/core.adoc ---
    @@ -123,6 +124,29 @@ fields.
     BeanProvider.injectFields(myObject);
     ------------------------------------
     
    +===== DependentProvider
    +
    +`DependentProvider` must be used instead of `BeanProvider` to obtain 
instances of dependent-scoped beans to allow for
    +their proper destruction.
    +
    +When obtaining contextual instances using `@Inject`, the normal-scoped 
ones get destroyed along with their associated
    +context. However, instances of dependent-scoped beans -- as implied by 
their name -- depend on the lifecycle of
    +the contextual instance which declares them and get destroyed along with 
this declaring bean's instance.
    +
    +However, if dependent-scoped instances are obtained programmatically using 
`DependentProvider`, there's no
    +"declaring bean" to speak of and they *must be destroyed manually*.
    --- End diff --
    
    Not 100% sure about this, can someone confirm?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to