OSGi class loading

1,745 views
1,555 views

Published on

talking about class loading of OSGi

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,745
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
43
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • OSGi class loading

    1. 1. OSGi Class Loading
    2. 2. Overall Search Order1. java.*, delegates to parent, if parent can not find it, fails2. if in boot delegation list, delegates to parent3. if import, delegates to exporting bundle class loader, if not found, fails4. if Required-Bundle, delegates to the required bundles’ class loaders, depth-first5. Bundle-Classpath6. fragments7. if DynamicImport-Package, delegates to exporting bundle class loader8. equinox will try to apply buddy policy
    3. 3. r4.core.pdfFigure 3.13
    4. 4. ClassNotFoundException• if defined in Import-Package/Required-Bundle/DynamicImport- Package - where is the bundle exporting it - if no such a bundle exporting it, should we consider o.o.f.system.packages.extra• if loading dynamically using for example Class.forName() - make sure what is the class loader used to load this class - thread context class loader - bundle class loader - have we defined in o.o.f.bootdelegation - what is the type of o.o.f.bundle.parent: boot, app, ext, or framework
    5. 5. References• of course OSGi specification• http://codescale.wordpress.com/2009/05/22/ basics-about-osgi-classloading/• http://www.jfokus.se/jfokus09/slides/salong4/ OSGiClassloading.pdf• org.eclipse.osgi.internal.loader.BundleLoader in equinox does most of the tricks• someone helps me find equivalent in felix?

    ×