This content has been marked as final.
Show 4 replies
-
1. Re: Seam2.2.0GA facesMessages.addFromResourceBundle() doesn't work with JBoss5.1.0GA
wangliyu Jan 21, 2010 2:40 PM (in response to wangliyu)This is only happened when I tried to use faceMessages in the EJB. seems the JBoss5.1 classloader has different behaviours than JBoss4.2.x?
Really need helps. -
2. Re: Seam2.2.0GA facesMessages.addFromResourceBundle() doesn't work with JBoss5.1.0GA
wangliyu Jan 21, 2010 5:33 PM (in response to wangliyu)I have tested JBoss4.2.3GA, JBoss5.0.1GA, JBoss5.1.0GA, JBoss6.0M1, if put the messages_*.properties in the .war/WEB-INF/classes/ folder, it only works with JBoss4.2.
It seems the JBoss class loader caused the problem, basicly JBoss5 up, the war class loader is different with ejb's class loader (event if you put in the jboss-app.xml and tell it to use the same class loader).
So here is a work around:
split the messages into 2 parts, all the messages that will be used in the EJB has to packaged in a jar file (in my case, called app-shared-messages.jar, and put the messages in the root of that jars), put the jars into your .ear/lib folder.
now add the resources file into the components.xml (suppose your message file name is application-ejb-messages_en.properties):
<core:resource-loader>
<core:bundle-names>
<value>application-ejb-messages</value>
</core:bundle-names>
</core:resource-loader>
It's ugly, but it works on all the server, no need any tricks.
<I'm sure next time if I hit the wall it will be harder> -
3. Re: Seam2.2.0GA facesMessages.addFromResourceBundle() doesn't work with JBoss5.1.0GA
master2q Apr 8, 2010 6:24 PM (in response to wangliyu)Why don't you just put messages_en.properties into either jar or ear file? -
4. Re: Seam2.2.0GA facesMessages.addFromResourceBundle() doesn't work with JBoss5.1.0GA
chris.simons Apr 8, 2010 7:43 PM (in response to wangliyu)I think you're supposed to use StatusMessages now.