[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Change in TCCL when BundleActivator.start() is called


I've been looking into a problem with a user's application that was working ok on top of Equinox 3.4.2, but is now failing with a ClassNotFoundException when running on top of Equinox 3.5.

We have some code that, prior to starting a bundle, sets the Bundle's ClassLoader as the TCCL, and then restores the old TCCL once start has completed. This works as expected on 3.4.2. Running on 3.5, the Bundle's ClassLoader is overwritten by a ContextFinder instance as part of Equinox's start processing.

I've done some archaeology and I think I've tracked it back to the changes made under 258209:

"This patch also ensures the TCCL is set to the ContextFinder for each call to BundleActivator.start()."

I'm interested to learn about the reasoning behind this change. It strikes me as a little bit odd that ContextFinder is the TCCL as this is something of an Equinox implementation detail, where's the Bundle's ClassLoader is not. As far as I know, the OSGi spec is silent on what the TCCL should be when an activator is called so I realise that Equinox has some freedom in this area. That said, the change has broken an application that works fine on 3.4.2 so, in our case at least, we'd prefer that things were the way they were before.