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

Invalid beans should not be injectable into extensions

    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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pmuir Pete Muir
                  Reporter:
                  meetoblivion John Ament
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: