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

Invalid beans should not be injectable into extensions

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: