[cdi-dev] [JBoss JIRA] (CDI-457) Add a disposable interface

Martin Kouba (JIRA) issues at jboss.org
Fri Sep 5 03:29:01 EDT 2014


    [ https://issues.jboss.org/browse/CDI-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999202#comment-12999202 ] 

Martin Kouba commented on CDI-457:
----------------------------------

Please be more specific. By default, a dependent bean is bound to the lifecycle of the object it's injected into - in this case, it's needed as long as the object is. For producers, initializers and producers we have {{@TransientReference}}. There is also {{Instance.destroy()}} method. Etc. ...

> Add a disposable interface
> --------------------------
>
>                 Key: CDI-457
>                 URL: https://issues.jboss.org/browse/CDI-457
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Contexts
>            Reporter: John Ament
>            Assignee: John Ament
>
> Currently for Dependent scoped beans, there's no way for the container to be aware when it's no longer needed.
> I suggest that we somehow wrap dependent beans in a Disposable wrapper to be notified when it's not needed any longer.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the cdi-dev mailing list