-
1. Re: WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?
ssilvert Feb 1, 2011 2:01 PM (in response to alexmcchessers)When you use WAR_BUNDLES_JSF_IMPL you are completely on your own to hook up things like annotation scanning. So you need to add the things to your WAR that JBoss otherwise would add automatically. Namely, you need to put a copy of jboss-faces.jar in your WEB-INF/lib. Then you need to put this in web.xml or a web-fragment.xml:
<listener> <listener-class>org.jboss.web.jsf.integration.config.JBossMyFaces20ServletContextListener</listener-class> </listener>
That should do it, but I've never actually tried it that way. Please let me know how it turns out.
Stan
-
2. WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?
alexmcchessers Feb 1, 2011 3:51 PM (in response to ssilvert)Hi Stan. Thanks for the suggestion, but unfortunately it hasn't helped. At first the webapp was failing to deploy, since WAR_BUNDLES_JSF_IMPL was set to true, and JBoss wasn't exposing its MyFaces implementation and the context listener to it. Setting it to false got it to see the listener and deploy the webapp, but it's still not finding my beans.
Alex
-
3. WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?
ssilvert Feb 1, 2011 3:58 PM (in response to alexmcchessers)It sounds like you didn't put jboss-faces.jar into your WEB-INF/lib. If WAR_BUNDLES_JSF_IMPL is set to true then jboss-faces.jar won't be in the classpath. So you have to get it into the classpath yourself by manually putting a copy in your deployment.
Stan
-
4. WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?
alexmcchessers Feb 1, 2011 4:23 PM (in response to ssilvert)I've manually added jboss-faces.jar, and the webapp correctly deploys with WAR_BUNDLES_JSF_IMPL set to true, but still my beans are not being picked up.
In any case, it's looking as though I'm going to have to have separate webapps for Tomcat and JBoss, unless I give up on having it auto-discover beans.
-
5. WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?
ssilvert Feb 1, 2011 6:34 PM (in response to alexmcchessers)What version of MyFaces are you using? AS6 is using 2.0.1 right now. The specific version might make a difference.
Stan
-
6. WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?
alexmcchessers Feb 2, 2011 11:31 AM (in response to ssilvert)Ah-ha! I was using MyFaces 2.0.2, but dropping back to 2.0.1 seems to have fixed it. In fact, it seems that I no longer have to include JBossMyFaces20ServletContextListener nor the jboss-myfaces jar. Presumably the correct annotation scanner is picked up automatically providing the correct version of MyFaces is provided.
Thanks for your help.
-
7. Re: WAR_BUNDLES_JSF_IMPL ignored on JBoss 6.0?
ssilvert Feb 2, 2011 12:20 PM (in response to alexmcchessers)Thanks for the info. It will help me going forward.
I think you'll still need JBossMyFaces20ServletContextListener if you want bean validation to work properly. It might also be needed for JSP-based apps.
Stan