Details

      Description

      @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 InjectionPoint.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            pmuir Pete Muir added a comment -

            This may be required by JSR-351, to easily provide injection of attributes, which are scoped to the calling context.

            Show
            pmuir Pete Muir added a comment - This may be required by JSR-351, to easily provide injection of attributes, which are scoped to the calling context.
            Hide
            pmuir Pete Muir added a comment -

            This issue may be better considered as a way to let beans manage their own lifecycle.

            Show
            pmuir Pete Muir added a comment - This issue may be better considered as a way to let beans manage their own lifecycle.
            Hide
            pmuir Pete Muir added a comment -

            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 SPI.

            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.

            Show
            pmuir Pete Muir added a comment - 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 SPI. 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.
            Hide
            pmuir Pete Muir added a comment -

            This is now covered by the pull request for CDI-139 https://github.com/jboss/cdi/pull/100 - please review!

            Show
            pmuir Pete Muir added a comment - This is now covered by the pull request for CDI-139 https://github.com/jboss/cdi/pull/100 - please review!
            Hide
            pmuir Pete Muir added a comment -

            I;'m going to leave this open, but defer it for now, as we don't quite have support for a pull based state management yet (right now, something needs to evict the current state).

            Show
            pmuir Pete Muir added a comment - I;'m going to leave this open, but defer it for now, as we don't quite have support for a pull based state management yet (right now, something needs to evict the current state).

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                swd847 Stuart Douglas
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Development