Pete Muir commented on CDI-89:
From the CDI 1.1 EG meeting, 19th Sept
Some beans want to manage their own lifecycle, and explicitly destroy an instance.
We discussed adding a destroy() method to an interface which extends Context, which custom
contexts need to implement in order to support removing arbitrary instances. This forms an
We discussed that there should be an SPI for this, and proposed sharing a solution with
CDI-139. We ran over all the possibilities we could come up with for identifying the bean
to be destroyed, and discussed that either you get passed a dependent scoped instance or a
proxy. In both cases, you can destroy the instance from just this info.
Add @Unwraps from Seam Solder
Project: CDI Specification Issues
Issue Type: Feature Request
Affects Versions: 1.0
Reporter: Stuart Douglas
Fix For: 1.1 (Proposed)
@Unwraps allows for an essentially stateless scope for producer methods and fields.
At injection time a dependent scoped proxy is injected into the injection point. When a
methods is invoked on this proxy it calls the corresponding @Unwraps methods to get the
instance to invoke the method on.
Because the proxy is @Dependent scoped, the @Unwraps method can inject the corresponding
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira