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

Invalid beans should not be injectable into extensions

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Minor Minor
    • 1.1.PRD
    • 1.0, 1.1.EDR
    • Portable Extensions
    • None

      Currently, you can inject beans that may not be ready yet into the extension's call back methods. As an example, I can inject something application scoped like this in to an extension, but it should really be throwing a definition exception (or similar):

      public void handleABD(@Observes AfterBeanDiscovery abd, MyApplicationScopedBean masb) {

      }

      Pete had noted that really the only safe thing to inject, other than the observed call back, is the bean manager.

              pmuiratbleepbleep Pete Muir (Inactive)
              meetoblivion_jira John Ament (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: