geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Re: Geronimo 2.2 + Spring
Date Wed, 14 Sep 2011 14:49:49 GMT
Hmm, I just tried it locally, and find the same issue with you, will have a
close look at the codes. Please check my comments below, hope it helps.

2011/9/14 Ghetolay <ghetolay@gmail.com>

> Hi, I deleted the j2ee-server and j2ee-security dependency, I don't
> remember
> why I had added them.
> I'm gonna make a small resume of my initial problem because I talked about
> several problem.
>
> For the jta-datasource and multiple roles I was just asking if something
> was
> wrong in my plan.xml file. I'll try to solve them by myself and if I don't
> succeed I'll create a new post about it.
>
> My Real problem here is the spring dependency(aop error) wich I solve by
> adding the <hiden-classe> element to my plan.xml. What I understood is :
> The problem come from cxf wich is my parent classloader and shouldn't be
> when there isn't web service in the project.
>
> I checked everything in my project to see where it could come from then I
> created a new project. My new project was very simple it contains only a
> web.xml and a plan.xml described here :
>
>
> <web-app xmlns:...>
>  <display-name>Test</display-name>
>  <welcome-file-list>
>    <welcome-file>index.html</welcome-file>
>  </welcome-file-list>
> </web-app>
>
> <web:web-app xmlns:...>
>    <dep:environment>
>        <dep:moduleId>
>            <dep:groupId>default</dep:groupId>
>            <dep:artifactId>Test</dep:artifactId>
>             <dep:version>1.0</dep:version>
>            <dep:type>car</dep:type>
>         </dep:moduleId>
>    </dep:environment>
>    <web:context-root>/Test</web:context-root>
> </web:web-app>
>
>
> I was not expecting this project to work because I don't even created the
> index.html file.
> After that I searched about my project in the classloader view and cxf was
> in the parent tree.
> Obviously there isn't any web service in this project.
>
> My project work fine (at least for now) with the hidden-classe element.
> So I have 2 simple question :
> - Is it really a problem to do not use spring from geronimo and to use the
> one included in my project ?
>
     It is not a problem to do this. And actually, there are many similar
requests for other components, e.g. users would like to use the component of
the specified version, while Geronimo uses another version internally.


> It's a small waste of space because I have to duplicate the jar.
>

   If there are more than one applications deployed in Geronimo, and all of
them require same version spring library. One solution is to deploy those
jar files in the repository, and dependency in your application. If you feel
not convenient for many dependencies (I know there are many jar files), you
could simply defined a sharedlib gbean in your application deployment plan
and place all those jar files in one folder.The both solutions above will
share jar files among many applications, not share classes.


> - What are the real consequences to have cxf in my classloader tree ? Is it
> essential ?
>

   The best scenario is that, if no web service is used in the target
application, cxf should not be added as a dependency, as it would make the
class searching more efficient. But it should not hurt your application, the
only problem I saw is like spring components issue you found, some
unexpected classes are in the parent classloaders of the deployed
application.


>
> If both the answer are no I think I'll stop wasting time with that and keep
> working with spring classes hidden from geronimo and use mine.
>
> Important not to be forgotten : Thks a lot :)
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Geronimo-2-2-Spring-tp3313502p3335922.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan

Mime
View raw message