Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6152

Provide Require Capability Between Composite Subsystem and Bundle

    XMLWordPrintableJSON

Details

    • Important

    Description

      1 - I have a composite subsystem  "messagedisplay.esa" which has a bundle with a provide
      capability, the provide capability is mentioned in both the bundle manifest
      which is inside the bundle manifest and the subsystem manifest as well.

      2. I have a stand alone bundle "msgdispconsumer" which requires this capability and mentions this in standalone bundle manifest.mf file

      In case of system migrations, if the Bundle gets deployed before the ESA
      subsystem, the bundle does not start as expected and has to be manually
      started once the provide capability is deployed.

      However, if I mark the subsystem as feature, then, as soon as the subsystem
      is deployed, the standalone bundle also goes to active state, thus removing
      need for manual intervention.

      Provide Require capability does not seem to have the same effect for Composite Subsystem as it has for feature subsystem.

      Test Case 1: Deploy the Composite Subsystem i.e the attached messagedisplay.esa file and then start it and then deploy the msgdispconsumer bundle, the bundle auto-wires and starts.

      Test Case 2: Deploy the msgdispconsumer bundle, try and start it, it fails stating a required capability is missing, deploy the subsystem i.e. the messagedisplay.esa file now, the Subsystem installs but does not auto wire the bundle msgdispconsumer  is still in installed state, start the msgdispconsumer bundle, it starts and does not throw the capability missing error.

      Test Case 3: Open the .ESA file in winrar like tool, change the subsytem type from Subsystem-Type: "osgi.subsystem.composite" to "osgi.subsystem.feature".

      Exit the karaf console and restart to clear the cache.

      Deploy the msgdispconsumer bundle, try and start it, it fails stating a required capability is missing, deploy the subsystem i.e. the messagedisplay.esa file now, the consumer bundle msgdispconsumer also starts automatically even when the ESA subsytem is only in installed state. 

      Why does behavior in Test case 3 not work for test case 2 scenario, i.e. autowiring happens for feature subsystem  but  not for composite subsystem.

      Attachments

        1. messagedisplay.esa
          3 kB
          Sameer Gupta
        2. msgdispconsumer.jar
          3 kB
          Sameer Gupta

        Activity

          People

            Unassigned Unassigned
            netsameer Sameer Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified