quality@glassfish.java.net

FW: Isolate properties files between two WARs in an EAR

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

Just copying from the glassfish user list, felt it was worth mentioning.
Never came across this, but surely I would find it annoying.
Although not mandated by the specs (so not a bug) this is expected behavior.

(Suppose you have 2 wars in you ear using log4j, but you want them to use
different settings?)

wim
-----Original Message-----
From: Sanjeeb.Sahoo_at_Sun.COM [mailto:Sanjeeb.Sahoo_at_Sun.COM] On Behalf Of
Sahoo
Sent: zaterdag 23 augustus 2008 4:49
To: users_at_glassfish.dev.java.net
Subject: Re: Isolate properties files between two WARs in an EAR

I don't think there is any way to achieve it in GlassFish. Even if you
achieve it, it's highly non-portable, as the spec does not mandate
classes/resources from one war to be isolated from another.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> 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
>
>

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