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 contextPriorityClassloading=false.

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

Reply via email to