Menu

Multiple bundles working together

Help
2008-12-17
2013-04-23
  • Jan Pannecoeck

    Jan Pannecoeck - 2008-12-17

    Hello everyone,

    I'm new to Concierge OSGi, but since I'm working with embedded devices, Concierge is, I asume, one of the best choices as OSGi Platform. But I'm testing it now and I would like to have to bundles chairing information. I've tried this with:

    Bundle1: has an interface ITestInterface and also exports the package (in MANIFEST) where the interface is located.
    Bundle2: has a class TestInterface implementing the ITestInterface interface. I've added the Bundle1 in the "Required Bundles" in the manifest file.

    But when I try to run this, I get an error that the ITestInterface isn't know by Bundle2. I'm running this all in Eclipse (I've installed everything for Concierge with Eclipse).

    I've also tried just exporting both bundles as Concierge Bundles, and used a xargs.init file (first loading Bundle1 and then Bundle2) and launching Concierge OSGi with: java -jar  conconcierge-1.0.0.RC3.jar. But that isn't working neither.

    So my (quite stupid) questing is, how do I get two bundles working together?

    I've used OSGi before, but the Equinox version, and at that moment I didn't had this problem...

    All help would be great!

     
    • Jan S. Rellermeyer

      Hi,

      RequireBundle is an R4 feature and not supported by Concierge. Use a "ImportPackage" instead.
      (Well, arguably, RequireBundle should not even be used on an R4 framework :-))

      Cheers,

      Jan.

       
    • Jan Pannecoeck

      Jan Pannecoeck - 2008-12-17

      Hello,

      Since you also responded to my email, and due to that response, I could solve the problem, this is what's causing me the problem:

      When you use the "Exported Packages" tool in Eclipse to add the packages that should be exported, the CTE tool adds an "Provide-Package" line to the manifest.mf file. But this should be an "Export-Package" line instead!

      Thanks for the great advice and the really fast respond!

      Jan

       
    • Jan Pannecoeck

      Jan Pannecoeck - 2008-12-17

      Hello,

      Since you also responded to my email, and due to that response, I could solve the problem, this is what's causing me the problem:

      When you use the "Exported Packages" tool in Eclipse to add the packages that should be exported, the CTE tool adds an "Provide-Package" line to the manifest.mf file. But this should be an "Export-Package" line instead!

      Thanks for the great advice and the really fast respond!

      Jan

       
    • Jan Pannecoeck

      Jan Pannecoeck - 2008-12-22

      I've got multiple bundles working together now, but I still have a question about this.

      Now I do have the Imported and Export packages in the manifest file working properly. But to get everything working fine, I still needed to include the other projects (from the imported packages) into the OSGi Bundle Classpath. Is this normal? I didn't had this when I was working with Equinox OSGi so that's why I'm wondering why this is necessary...

      Could anyone give me some information about this?

      Kind regards,
      Jan Pannecoeck

       

Log in to post a comment.