felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: Question about class loading and SCR (see FELIX-624)
Date Mon, 07 Jul 2008 14:53:11 GMT
Stuart McCulloch wrote:
> 
> looking at the current code that trawls the super-classes, I believe the
> problem could be solved by changing 'DependencyManager.java:734'
> so a ClassNotFoundException will drop down to the exhaustive search
> of declared methods (this code would need to be refactored out, so it
> can be called from multiple catch blocks)
> 
> re-writing that whole function might reveal more optimizations though :)
> 
Yes, I took a much simpler approach which should be alright: I use the 
bundle which exports the service for loading the class. This classloader 
has already loaded the class as the bundle is exporting this service. 
And this class should be the same which should be used for the 
bind/unbind method as otherwise class cast exceptions would occur.

A quick test of our hugh application massivly using SCR did not reveal 
any problems.

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Mime
View raw message