geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: [v1.1.1] Classloader problem
Date Wed, 22 Aug 2007 15:50:15 GMT

On Aug 22, 2007, at 1:59 AM, Damien Barthe wrote:

> Hello,
> thanks for the tip.
> I try to put the spring lib and the spring app into the /lib  
> directory of
> the EAR. I also try to "install" these JAR in Geronimo (it put the  
> lib in
> the "repository")...and unfortunately the 2 webapps continue to have a
> different instance of the Service...
> (NB : I use geronimo v1.1.1 . Perhaps it's not possible with this  
> version. I
> try with the v2 but I've some problem in the deployement of the EAR)

The lib directory in ear definitely only works with geronimo 2.  If  
you try with geronimo 2.0.1 what goes wrong?

If you need to stick with g 1.1.1 then I believe if you put the lib  
jars in the repository and add them as dependencies in geronimo- 
application.xml to the ear's environement (NOT both of the web-app  
environments) the classes should be loaded in the ear classloader and  
you should get only one copy of spring.

david jencks

> Damien Barthe.
> djencks wrote:
>> The blog author assumes that all web apps in an ear share the same
>> classloader, which is not true in geronimo.
>> I think if you put your spring app in the ear at lib/spring-app.jar
>> then you will only get one copy.  If you are including spring in your
>> ear it should go there also, although you might try using the copy of
>> spring we include first.
>> hope this helps
>> david jencks
>> On Aug 17, 2007, at 6:13 AM, Damien Barthe wrote:
>>> Hi there,
>>> in order to test a kind of tutorial from Spring Tips (
>>> application-context.html
>>> here ) I deploy the given EAR on Geronimo 1.1.1 and test it.
>>> The tip demonstrate how to use shared Application Context between
>>> applications. In the EAR there is 2 webApps (web1 & web2) and one
>>> "normal"
>>> application using spring. The webapps uses a bean in the third
>>> application
>>> and normaly they uses the same instance of it.
>>> But in Geronimo the instance is different, and after  
>>> investigation the
>>> classloader seems to be different too.
>>> So I try to deploy the same EAR in JBoss and it works as intented
>>> (both
>>> webapps uses the same instance of the bean). Idem in Glassfish.
>>> As I use Geronimo in my projects and want to keep it I've searched a
>>> solution to avoid this problem. But I've found anything.
>>> Does anyone have an idea? :-D
>>> Thx,
>>> Barthe Damien.
>>> P.s : if you want precision or something else, tell me.
>>> P.s2: if you want to test the EAR, download it
>>> there
>>> -- 
>>> View this message in context:
>>> Classloader-problem--tf4285594s134.html#a12199330
>>> Sent from the Apache Geronimo - Users mailing list archive at
> -- 
> View this message in context: 
> Classloader-problem-tf4285594s134.html#a12270701
> Sent from the Apache Geronimo - Users mailing list archive at  

View raw message