Details

    • Type: Feature Request Feature Request
    • Status: Open Open (View Workflow)
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0
    • Fix Version/s: TBD
    • Component/s: Concepts
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      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.

        Issue Links

          Activity

          Hide
          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
          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
          Pete Muir
          added a comment -

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

          Show
          Pete Muir
          added a comment - This issue may be better considered as a way to let beans manage their own lifecycle.
          Hide
          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
          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
          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
          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
          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
          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:
              Pete Muir
              Reporter:
              Stuart Douglas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: