You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Sameer Gupta (JIRA)" <ji...@apache.org> on 2019/02/12 09:53:00 UTC

[jira] [Updated] (KARAF-6152) Provide Require Capability Between Composite Subsystem and Bundle

     [ https://issues.apache.org/jira/browse/KARAF-6152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sameer Gupta updated KARAF-6152:
--------------------------------
    Description: 
1 - I have a composite subsystem 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 which requires this capability and mentions 
 this in standalone bundle manifest.

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, the 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 the 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 starts but does not auto wire and start the msgdispconsumer bundle, try and start the test bundle now and it works.

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

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 starts and the test bundle also starts automatically.

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.

  was:
1 - I have a composite subsystem 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 which requires this capability and mentions 
this in standalone bundle manifest. 

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, the 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 the start it and then deploy the test bundle, the bundle auto-wires and starts.

Test Case 2: Deploy the test 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 starts but does not auto wire and start the test bundle, try and start the test bundle now and it works.

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

Deploy the test 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 starts and the test bundle also starts automatically.

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.


> Provide Require Capability Between Composite Subsystem and Bundle 
> ------------------------------------------------------------------
>
>                 Key: KARAF-6152
>                 URL: https://issues.apache.org/jira/browse/KARAF-6152
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>            Reporter: Sameer Gupta
>            Priority: Critical
>              Labels: aries, aries,require-bundle, capabilities, felix, karaf, osgi
>         Attachments: messagedisplay.esa, msgdispconsumer.jar
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 1 - I have a composite subsystem 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 which requires this capability and mentions 
>  this in standalone bundle manifest.
> 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, the 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 the 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 starts but does not auto wire and start the msgdispconsumer bundle, try and start the test bundle now and it works.
> Test Case 3: Open the .ESA file in winrar like tool, change the subsytem type from Subsystem-Type: osgi.subsystem.composite to Subsystem-Type: osgi.subsystem.feature.
> 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 starts and the test bundle also starts automatically.
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)