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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 1.0.4.Final
    • Fix Version/s: None
    • Component/s: Tests
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mkouba Martin Kouba
                Reporter:
                bobnettleton Bob Nettleton
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: