[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Change in TCCL when BundleActivator.start() is called
- From: Thomas Watson <tjwatson@xxxxxxxxxx>
- Date: Mon, 24 Aug 2009 09:40:25 -0500
- Delivered-to: email@example.com
The reasoning was to make the TCCL consistent regardless of what thread was starting a bundle. We were finding scenarios where the thread starting the bundle did not have the ContextFinder set properly. Could you open a bug to discuss this more. I would like to understand your scenario more. Perhaps we can come up with a solution that can solve both issues. Or we could at least provide you with an option to disable TCCL setting in the framework.
Andy Wilkinson ---08/21/2009 08:29:10 AM---Hi,
Andy Wilkinson <andy.wilkinson@xxxxxxxxxxxxxxxx>
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
08/21/2009 08:29 AM
[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.
equinox-dev mailing list