[jboss-jira] [JBoss JIRA] Updated: (JBAS-8098) Annotation scanning not working for JSF

Stan Silvert (JIRA) jira-events at lists.jboss.org
Fri Jun 11 10:56:38 EDT 2010


     [ https://jira.jboss.org/browse/JBAS-8098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Silvert updated JBAS-8098:
-------------------------------

    Attachment: annotest-webinflib.jar
                jbosstest-jsf.war


jbosstest-jsf.war comes from the AS testsuite.  It has an annotated bean in WEB-INF/classes.  You can run it from testsuite with build one-test -Dtest=org.jboss.test.web.test.JSFIntegrationUnitTestCase.  You will see one failure on the annotated bean used to test bean validation integration.

annotest-webinflib.war is the same WAR except that it tests the fourth JSF anno-scanning requirement.  The classes are in a jar that sits in WEB-INF/lib.

Either WAR can be executed from the browser like this:
http://localhost:8080/jbosstest-jsf/beanvalidation.jsf
http://localhost:8080/annotest-webinflib/beanvalidation.jsf

You will get an exception because the annotated managed bean was never registered with JSF.  Both of these WARs work in earlier AS milestones.

> Annotation scanning not working for JSF
> ---------------------------------------
>
>                 Key: JBAS-8098
>                 URL: https://jira.jboss.org/browse/JBAS-8098
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JSF
>    Affects Versions: 6.0.0.M4
>            Reporter: Stan Silvert
>            Assignee: Ales Justin
>            Priority: Blocker
>             Fix For: 6.0.0.M4
>
>         Attachments: annotest-webinflib.jar, jbosstest-jsf.war
>
>
> The JBossAnnotationProvider is now integrated so that JSF can take advantage of the new annotation scanning.  However, it doesn't find any annotations.  I've verified that it is called, but it seems to have no effect.
> For reference, here are the requirements from the JSF spec.  I think the first two requirements are taken care of by the JSF impl, but we need to confirm that.  I'm attaching WARs to test the second two.
> 11.5.1 Requirements for scanning of classes for annotations
> ■ If the <faces-config> element in the WEB-INF/faces-config.xml file
> contains metadata-complete attribute whose value is "true", the implementation must not perform annotation
> scanning on any classes except for those classes provided by the implementation itself. Otherwise, continue as
> follows.
> ■ If the runtime discovers a conflict between an entry in the Application Configuration Resources and an annotation, the
> entry in the Application Configuration Resources takes precedence.
> ■ All classes in WEB-INF/classes must be scanned.
> ■ For every jar in the application's WEB-INF/lib directory, if the jar contains a "META-INF/faces-config.xml"
> file or a file that matches the regular expression ".*\.faces-config.xml" (even an empty one), all classes in
> that jar must be scanned.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-jira mailing list