users@glassfish.java.net

Re: Isolate properties files between two WARs in an EAR

From: Sahoo <Sahoo_at_Sun.COM>
Date: Sat, 23 Aug 2008 08:18:32 +0530

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
>
>