开发者

Override Bundle classloader in OSGi?

Is this possible somehow?

I mean for my own bundle?

Thank you Misha

p.s. More specifically, I am interesting in having a class within my bundle (well, within a fragment) return my custom classloader from a call to

MyClass.class.getClassLoader()

rather than the bundle's???

Thank you very much

Yours Misha

p.s. Some helpful links I've found that don't seem to answer this question :(

http://shylendrabhat.com/blog/2009/11/21/class-loader-architecture-comparison-java-j2ee-and-osgi/

http://codescale.wordpress.com/2009/05/22/basics-about-osgi-classloadin开发者_运维知识库g/


If you're using Equinox as your OSGi implementation, I think you can have a look the classloader hook.

You can check out the code of Equinox Transforms to see how to contribute your hook.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜