Announcement Announcement Module
Collapse
No announcement yet.
external directive in Bundle-Classpath Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • external directive in Bundle-Classpath

    does external directive load the jar in the bundles classpath
    Like if two bundle have externals to same jar will they load them seperately

  • #2
    I wouldn't recommend using external: in Bundle-Classpath. It's Equinox-specific and therefore isn't governed by the OSGi standard. There's no guarantee that it'll work in dm Server or that, if it works now, that it will continue to work in the future. Also, as the jar file is outside of a bundle, it's excluded from OSGi's lifecycle management. If anyone changed, moved, or deleted the jar file, you get all sorts of unexpected and unpleasant problems.

    Now, to answer your question. The contents of the Jar will be loaded multiple times: once for each bundle which references it, using the bundle's classloader. I really wouldn't recommend using it though!

    Comment


    • #3
      Originally posted by Andy Wilkinson View Post
      I wouldn't recommend using external: in Bundle-Classpath. It's Equinox-specific and therefore isn't governed by the OSGi standard. There's no guarantee that it'll work in dm Server or that, if it works now, that it will continue to work in the future. Also, as the jar file is outside of a bundle, it's excluded from OSGi's lifecycle management. If anyone changed, moved, or deleted the jar file, you get all sorts of unexpected and unpleasant problems.

      Now, to answer your question. The contents of the Jar will be loaded multiple times: once for each bundle which references it, using the bundle's classloader. I really wouldn't recommend using it though!
      We're also facing the same problem.

      We'll integrate some existing legacy and complex library into our own OSGi powered project. This is the fastest and easiest way to us.

      Comment

      Working...
      X