开发者

Override Bundle classloader in OSGi?

开发者 https://www.devze.com 2023-01-23 14:02 出处:网络
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 classloade

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

精彩评论

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