-
1. Re: Correct structure for multiple war's in an ear?
sandy_brydon Mar 13, 2008 10:54 PM (in response to gothmog)there are a couple of good topics in the JBoss forums which discuss possible causes of this:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002370#4002370
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024392#4026872 -
2. Re: Correct structure for multiple war's in an ear?
greko.gregory.tanneau.gmail.com Mar 27, 2008 3:31 PM (in response to gothmog)Hi all !
I've had the same problem, deploying two WARs inside my EAR deployment unit :
15:05:19,312 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.expressions 15:05:19,312 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.userPrincipal 15:05:19,328 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale 15:05:19,328 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.bpm.businessProcess 15:05:19,328 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.parameters 15:05:19,328 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.security.identity 15:05:19,328 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale 15:05:19,343 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.isUserInRole 15:05:19,343 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.manager 15:05:19,343 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider 15:05:19,343 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.transaction.synchronizations 15:05:19,343 INFO [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.resourceLoader 15:05:19,375 INFO [org.jboss.seam.Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
I've read the two links above, but I can't find a solution.
I use Seam 2.0.1.GA along side JBoss 4.2.1.GA.
My deployment unit structure is the following :
APP.EAR + META-INF/ - application.xml - jboss-app.xml + lib/ - jboss-el.jar - ... + APP.JAR/ + com/my/classes/ + META-INF/ - ejb-jar.xml - persistence.xml - seam.properties + APPONE.WAR/ + web-content/ + WEB-INF/ + classes/ + lib/ - commons-beanutils.jar - commons-digester.jar - jboss-seam-ioc.jar - jboss-seam-mail.jar - jboss-seam-pdf.jar - jboss-seam-remoting.jar - jboss-seam-ui.jar - jsf-facelets.jar - components.xml - faces-config.xml - pages.xml - web.xml + APPTWO.WAR/ (idem)
Given that, my problem is that my resource manager is only working fine for one of my two webapps.
What am I doing wrong ?
Is there a better way to do this ?Thanks !
-
3. Re: Correct structure for multiple war's in an ear?
greko.gregory.tanneau.gmail.com Mar 27, 2008 5:47 PM (in response to gothmog)Actually the logs quoted before are not the problem.
The problem comes from :
WARN [org.jboss.seam.jsf.SeamPhaseListener] There should only be one Seam phase listener per application
... when APPRWO.WAR is deployed.
Then, I set up my two home pages like the following :
APPONE's and APPTWO's home.xhtml :
Welcome to <h:outputText value="#{messages['appName']}" />
APPONE/home.seam responds
Welcome to APPONE
according to my resource bundle ;APPTWO/home.seam responds (too)
Welcome to APPONE
whereas it should be APPTWO...And vice versa if I load APPTWO first. The first accessed webapp holds all resources ...
Any idea ?
-
4. Re: Correct structure for multiple war's in an ear?
greko.gregory.tanneau.gmail.com Mar 27, 2008 6:50 PM (in response to gothmog)Still investigating :)
It appears that Seam's ResourceLoader loads bundles at webmodule startup.
When I start APPONE the first time :
[org.jboss.seam.core.ResourceLoader] loaded resource bundle: messages_appone [org.jboss.seam.core.ResourceLoader] resource bundle missing: home
Then, I start APPTWO
[org.jboss.seam.core.ResourceLoader] resource bundle missing: home
There,
messages_apptwo
should've been loaded (I guess/wish).Cf. JIRA JBSEAM-2364
Is there a way to tell Seam's ResourceLoader to load bundles once per session, not at startup (or something like that) ?
-
5. Re: Correct structure for multiple war's in an ear?
greko.gregory.tanneau.gmail.com Mar 28, 2008 3:11 PM (in response to gothmog)It seems weird that nobody has had this problem, isn't it ? :)
Having two WAR module inside a EAR unit is a quite reasonable scenario.
But in that configuration, the Seam ResourceLoader behaves as if there were only one WAR : it loads bundles it finds when the first webapp is started ; then when the second webapp is started, it assumes budles are already loaded : there should be one ResourceLoader per WAR module.
Should I create a JIRA ? Can someone just tell me what to do ?
-
6. Re: Correct structure for multiple war's in an ear?
pmuir Mar 29, 2008 6:44 PM (in response to gothmog)I agree, it's not clear what is going wrong/on here - file a JIRA, and we can at least document better.
-
7. Re: Correct structure for multiple war's in an ear?
greko.gregory.tanneau.gmail.com Mar 31, 2008 10:42 AM (in response to gothmog) -
8. Re: Correct structure for multiple war's in an ear?
pmuir Mar 31, 2008 11:47 AM (in response to gothmog)That JIRA is a feature request for being able to merge messages.properties of the same name from different modules, what you are asking is different, so I suggest a new JIRA.
-
10. Re: Correct structure for multiple war's in an ear?
gav_on_rails Apr 14, 2008 4:54 PM (in response to gothmog)Hi Gregory, are you saying here that your second war is identical to the first? If not, could you please provide the war listing for the second war. Thanks.