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

Martin Kouba (JIRA) issues at jboss.org
Fri Sep 19 03:09:03 EDT 2014

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

Martin Kouba commented on CDI-457:

[~meetoblivion] Well, I still don't understand why the new interface is needed. 

@UnManaged would be a new annotation indicating that the returned object is not contextual
IMO does not make sense, if you inject dependent SomeClass into some normal-scoped bean, it's not non-contextual.

Disposable object goes out of scope.
What does it mean? How would this work?

 I suspected that OWB didn't wrap them into contextuals, whereas weld seems to (at least in the 1.1.x line).
Weld returns a subclass if an interceptor or decorator is associated. Did you mean this by "wrapping into contextuals"?

> 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

More information about the cdi-dev mailing list