7 Replies Latest reply on Feb 2, 2011 12:20 PM by Stan Silvert

    WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?

    alexmcchessers Newbie

      Hi there.  I wonder if anyone can help with this problem.


      I am developing an application using MyFaces 2.0, which may be deployed on JBoss, Tomcat, or some other app server.  Our beans are within jar files and we'd like to use annotation discovery to locate them.  Because we need to bundle MyFaces with the application, within web.xml we have org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL set to "true".


      Unfortunately, none of our beans are being picked up.  The .jars do contain their own "faces-config.xml" within META-INF, and metadata-complete is set to "false", so it SHOULD be scanning them.  Also, if I deploy to Tomcat 6, it finds them successfully.  At first I thought that this could be a problem with MyFaces, so I temporarily switched it to Mojarra, and started to see ZipException errors in the log.


      This pointed me towards the following defect from an earlier Milestone build: https://issues.jboss.org/browse/JBAS-8024


      That defect appears to have been fixed by implementing a new annotation scanner.


      Now, if I remove the MyFaces jars from my application, set JSF_CONFIG_NAME to "MyFaces-2.0", and set WAR_BUNDLES_JSF_IMPL to "false", things start working correctly in JBoss.  So it appears to me that, for annotation discovery to work correctly in JBoss 6, your app has to use a built-in JSF implementation.  I would be ok with that, but if I include myfaces jars in the webapp to allow them to be picked up when deployed on Tomcat, it seems to always use those instead, and fails, regardless of what WAR_BUNDLES_JSF_IMPL is set to.  I'd rather not have to produce multiple deployments with different jars in web-inf/lib if I can help it.  Is this a defect?  Is 6.0 ignoring WAR_BUNDLES_JSF_IMPL and always looking for a bundled implementation, only falling back on the built-in version if it's not found?  Or am I missing something?  Can I force my bundled JSF implementation to use the JBoss annotation scanner?


      Any help would be greatly appreciated.