geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: One classloader for different WAR-files
Date Wed, 22 Mar 2006 08:08:03 GMT

On Mar 21, 2006, at 10:36 PM, Ilya Platonov wrote:

> I have some WAR-files that use common libraries. Is there any way  
> to force them to use same Classloader for this libraries?
> Right now I see two variants to do it
> 1) To put wars in one ear file.

If you put the libraries in the *.war/WEB-INF/lib, this will not get  
the libraries in the same classloader.  If you put them in the ear  
somewhere and use manifest classpaths in the wars to pick them up,  
they still won't be in the same classloader: each will get into the  
appropriate web app classloader.
> 2) Put common libraries into geronimo libraries repository.
I think that's a good idea because it makes your web apps smaller,  
but it wont get the jars into the same classloader: each web app will  
load the jar in its own classloader.  I would do this anyway, in  
combination with:

3) You could make one web app the parent of the other and use  

For (2) or (3) you will need geronimo plans: for (2), to add the  
dependencies to the web app, for (3) to specify the "other" web app  
as a parent/import.

Hope this helps
david jencks

> But I'm not sure this is going to work. Is there any special  
> configuration I should use for this variants? Is there any other  
> variant to do this?
> Thanks

View raw message