Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-214

Managed bean not given a @Named annotation in Non-Contextual injection test

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 1.0.4.Final
    • Tests
    • None

    Description

      The following test case:

      org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.InjectionIntoNonContextualComponentTest.testInjectionIntoJSFManagedBean

      verifies that a JSF managed bean can be a target for CDI injection.

      The .jsp in the test case (ManagedBeanTestPage.jsp) relies on an Expression Langage name ("farm") in order to locate this bean.

      The managed bean in question:

      org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.Farm

      does not include a @Named annotation.

      Section 2.5.3 of the CDI Specification states that:

      "If @Named is not declared by the bean, nor by its stereotypes, a bean has no EL name."

      Based on this line in the spec, it appears that this test may be in error. If the bean does not have an EL name, the bean cannot be located by the EL Resolver.

      If my interpretation of the spec is correct here, I request that this test be excluded.

      Attachments

        Activity

          People

            mkouba@redhat.com Martin Kouba
            bobnettleton Bob Nettleton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty