geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Kleineikenscheidt" <ste...@kleineikenscheidt.de>
Subject RE: XBean Classloader Issues
Date Thu, 10 Aug 2006 06:02:08 GMT

Hi Guillaume,

i have openend a Jira issue and attached a patch

answers inline...

-Stefan




-- 
Stefan Kleineikenscheidt           tel. +49 (711) 99 33 035
Rosenbergstr. 58                   mob. +49 (172) 130 54 77
70176 Stuttgart (GERMANY)       stefan@kleineikenscheidt.de

________________________________________
From: Guillaume Nodet [mailto:gnodet@gmail.com] 
Sent: Thursday, August 10, 2006 2:40 AM
To: user@geronimo.apache.org
Subject: Re: XBean Classloader Issues


On 8/9/06, Stefan Kleineikenscheidt <stefan@kleineikenscheidt.de> wrote:


Hi all,

i'm trying to embed XBean in an existing system, which classloader doesn't
return sensible values when calling

Do you mean xbean class loaders, or your system classloaders ?

SK >>>>>>>  My system's classloaders.


  cl.getImplementationVersion();  or

Do you mean  java.lang.Package.getImplementationVersion () ? 

SK >>>>>>> Yes.


  cl.getResourceAsStream(name);


#1 results in a NPE thrown by Spring, when calling
SpringVersion.getVersion();

I guess you have problems when using xbean application context, which now
call
   XBeanHelper.createBeanDefinitionReader 
which uses SpringVersion.getVersion, right ?

SK >>>>>>> Exactly.


#2 results in XBean not finding the property files, which contain the custom

mappings.

As I can't change the classloader easily, I have created a simple solution
which lets XBean read a system property *after* everything else has failed.
The system property points to a directory, where XBean can load the property

files plus an additional xbean.properties file, which contains a property
"spring.version".

What do you think about this solution?  Should I open an issue for that and
attach my patch?

Yes, please. 

Thanks for feedback,
-Stefan



--
Stefan Kleineikenscheidt           tel. +49 (711) 99 33 035 
Rosenbergstr. 58                   mob. +49 (172) 130 54 77
70176 Stuttgart (GERMANY)       stefan@kleineikenscheidt.de





-- 
Cheers,
Guillaume Nodet 


Mime
View raw message