users@glassfish.java.net

Re: Help: Two deployed wars use different version of a .jar

From: Sahoo <Sahoo_at_Sun.COM>
Date: Wed, 20 May 2009 23:37:20 +0530

Yes, each deployed app has its own class loader. As long as you don't
have any dependent class placed in a library jar in one of glassfish lib
directories like glassfish/lib or domain/lib, each application class
will be loaded separately. I can't believe we have a bug like what you
described.

Sahoo

glassfish_at_javadesktop.org wrote:
> Hi,
>
> I'm trying to get two versions of a Java EE5 web application running on GlassFish 2.1 at the same time. One of them is bundled into an EAR which contains an ejb-jar, war, and a bunch of .jar files. The newer version is just a war file, and it contains a newer version of one .jar dependency.
>
> When I use the original version of our application, it runs fine. When I use the new version of our application it gets an exception because it is loading classes from the old .jar file (in the EAR) instead of from the new .jar file inside of itself (war, separate from the old version's EAR).
>
> I thought each deployed application gets its own ClassLoader meaning this should not be a problem?
>
>
> Thanks,
> Ryan
> [Message sent by forum member 'rdelaplante' (rdelaplante)]
>
> http://forums.java.net/jive/thread.jspa?messageID=347036
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>