Results 1 to 3 of 3

Thread: external directive in Bundle-Classpath

  1. #1
    Join Date
    Nov 2008
    Posts
    232

    Default 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. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    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!
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Sep 2008
    Posts
    26

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •