users@glassfish.java.net

RE: Isolate properties files between two WARs in an EAR

From: Wim Verreycken <wim_at_pizzastop.be>
Date: Sat, 23 Aug 2008 18:06:33 +0200

Maybe here's an idea/example for a workaround ?

http://osdir.com/ml/jakarta.turbine.jcs.devel/2003-09/msg00000.html

Wim

-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: vrijdag 22 augustus 2008 23:07
To: users_at_glassfish.dev.java.net
Subject: Isolate properties files between two WARs in an EAR

Hi!

I am using glassfish v2 and have an EAR application with two WARs inside. I
put all the jars common to both in the EAR root level and only the specific
jars inside each WAR WEB-INF/lib.

I have a library (displaytag.jar) in the two WARs and the configuration of
displaytag is made by a properties file. Because each of the WARs have
different configurations, I put a displaytag.properties file in each
WEB-INF/classes and a displaytag.jar in each WEB-INF/lib.

The problem is that when one application loads the displaytag.properties,
the other uses the same properties, ignoring its own properties file. Is
there a way to solve this problem without using the class-loader
delegate="false" configuration in sun-web.xml?

If I use class-loader delegate="false" my application begin to have problems
with ClassCastExceptions. In this case, should I put all the jars, its
dependencies and resources (xml, properties files) in the same classloader?

Thanks!
[Message sent by forum member 'renato_rka' (renato_rka)]

http://forums.java.net/jive/thread.jspa?messageID=294915

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net