Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-165

Support lifecycle events for non-builtin contexts

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1.PRD
    • Component/s: Contexts
    • Labels:
      None
    • Affects:
      Release Notes

      Description

      The original idea was to extend the API for context implementations to be able to notify the container of a context initialization / destruction. Based on this notification, the container would then notify the application by firing @Initialized(X) / @Destroyed(X) Object (where X is the scope annotation of the context - see CDI-86).

      I don't think this double-notification approach is a good idea anymore. Instead, the specification should simply mention that the extensions providing an implementation of Context are encouraged to fire a @Initialized(X) event when the context is initialized and @Destroyed(X) event when the context is destroyed (again, see CDI-86 for details). Extensions are free to choose a payload that makes most sense for the given context (e.g. UIViewRoot instance for @ViewScoped) or Object otherwise.

        Attachments

          Activity

            People

            Assignee:
            pmuiratbleepbleep Pete Muir
            Reporter:
            rhn-engineering-jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: