[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Equinox Declarative Services : Context Class Loader

Hi Neil,

Thanks for the quick reply. See my comments below.


On Tue, Mar 31, 2009 at 4:49 PM, Neil Bartlett <njbartlett@xxxxxxxxx> wrote:
The question is, what did you expect instead of null?

When services or callbacks are invoked this context class loader is not null. It is the same in all the threads before using Declarative Services. So I expected the same.



The OSGi spec does not specify what the thread context classloader
(TCCL) should be when services or callbacks are invoked, therefore
components should not rely on it being set to anything in particular.
You can of course set the TCCL explicitly at the start of your
activate method. 


The reason for this, incidentally, is that TCCLs are intended to
support the concept of a global "application", and they are not really
a good fit with the classloading model in OSGi.

I also agree with this point. As you have mentioned the problem is with the legacy libraries. They heavily depend on TCCL.


Thanks
Sameera