Since threads inherit their CCL, you can easily create your own TCCL by creating your own Felix launcher thats sets the TCCL of the main thread to be whatever you want, Felix will end up using that since we don't change it...at least that is my understanding.

If someone creates this, please post it to a JIRA issue so we can all debate whether it would be worthwhile to include it or not.

I am not personally against it, but I would have to see the proposed solution.

-> richard

Saminda Abeyruwan wrote:
Hi All,

Thank you for your help to clarify the TCCL issue. I really appreciate this.

Would Felix  provide an extension point to set the TCCL we wanted to use.
(ex: instance of ContextFinder). Since the  classloader delegation is handle
within the framework, I am wondering is it possible to change the default
behaviour as wanted.

Thank you!

Saminda



there's also the "ContextFinder" classloader implementation from the
Equinox project, which you can set as your TCCL and it will try to find
the right classloader based on the current call stack - although like the
bytecode weaving solution, it's not 100% foolproof...

note the OSGi specification does not mandate a specific TCCL setting





Reply via email to