Upayavira wrote:
But if that MyHost code is running within a bundle, surely it would use Felix's classloader?
Yes, I stated that.
What scenarios are there under which an app running in an OSGi container would _not_ use the Felix classloader? That is, without the Felix Classlaoder being somewhere in the classloader chain?
We are talking at cross purposes, I think. I all code to be loaded is inside of a bundle, then we will potentially get to intercept the class load call for URL.class, unless they do something like create their own class loader (which uses the system class loader as its parent by default) or just simply directly uses the system class loader.
However, I thought you were also referring to the generic case, where you have a host application that creates an instance of Felix...in that case there is nothing you can do.
No matter, there is still no way to guarantee that everyone uses your class loader even inside a bundle, because the system class loader is always accessible.
-> richard
