You can also try to wrap the Bundle into a ClassLoader, delegating methods ...
Something like :
http://websvn.ow2.org/filedetails.php?repname=jonas&path=%2Fsandbox%2Fsauthieg%2Fjndi-osgi%2Fjonas-osgi-toolkit%2Fsrc%2Fmain%2Fjava%2Forg%2Fow2%2Fjonas%2Fosgi%2Ftoolkit%2FBundleClassLoaderAdapter.java

in any case, once you give your ClassLoader to someone else, you may have memory/lifecycle issues if that thirdparty keep a reference to the ClassLoader.

--G

Le 28/10/2010 16:41, Alasdair Nottingham a écrit :
That does not help me because I have a Bundle, not a Class in the bundle.

I have a fall back if I can't find it, but the fallback has lifecycle
and memory overhead issues I would like to not have to deal with.

On 28 October 2010 15:34, Guillaume Sauthier
<[email protected]>  wrote:
Hi Alasdair

There is no direct API to do that.
But you can use a class loaded by this bundle and then call
Class.getClassLoader()

Cheers
--Guillaume

Le 28/10/2010 16:32, Alasdair Nottingham a écrit :
Hi,

I'm sure that asking this question will get me shot, but here goes. I
have a Bundle and I would like to get hold of the ClassLoader that
felix holds for the bundle.

Is it possible to do this for Felix?

Thanks
Alasdair




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to