[weld-issues] [JBoss JIRA] Commented: (CDITCK-214) Managed bean not given a @Named annotation in Non-Contextual injection test

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Jun 6 11:22:59 EDT 2011


    [ https://issues.jboss.org/browse/CDITCK-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606628#comment-12606628 ] 

Pete Muir commented on CDITCK-214:
----------------------------------

In this test the intent is that Farm is a JSF managed bean (not a CDI managed bean), and therefore @Named is not required. See http://svn.jboss.org/repos/weld/cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/faces-config.xml for how it is made a JSF managed bean.

> Managed bean not given a @Named annotation in Non-Contextual injection test
> ---------------------------------------------------------------------------
>
>                 Key: CDITCK-214
>                 URL: https://issues.jboss.org/browse/CDITCK-214
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Tests
>    Affects Versions: 1.0.4.Final
>            Reporter: Bob Nettleton
>
> 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.  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list