[ 
https://issues.apache.org/jira/browse/ARIES-1442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153062#comment-15153062
 ] 

ASF subversion and git services commented on ARIES-1442:
--------------------------------------------------------

Commit 1731141 from [[email protected]] in branch 'aries/trunk'
[ https://svn.apache.org/r1731141 ]

[ARIES-1443] After a restart the capabilities of a subsystem have changed (seem 
correct) before the restart they seem wrong

This issue affects only newly installing features. The Subsystem service is 
registered and added to the system repository before all of its capabilities 
have been computed. Because
features implicitly export everything, their capabilities must be derived from 
their content. This is currently done examining constituents and filtering them 
based on the
Subsystem-Content header. It must be done this way for persisted subsystems, 
which are unaffected by this issue.

Initially, I tried to fix the issue by looking for features in the INSTALLED 
state as part of the modifiedService method of the SystemRepository because by 
then the consituents have
been computed and all capabilities are available. Unfortunately, this will not 
work for newly installing features with 
apache-aries-provision-dependencies:=resolve and that remain
in the INSTALLING state.

Ultimately, the issue was fixed in BasicSubsystem by adding an additional path 
to both getCapabilities and getRequirements. Newly installing subsystems can be 
distinguished from
persisted subsystems by the presence of a SubsystemResource, which the former 
will have while the latter will not. If a SubsystemResource is present, the 
capabilities and
requirements can be computed from the content contained therein. This is 
available as the newly installing subsystem is being added to the system 
repository. Persisted subsystems
continue to function as before.

Note that this should also fix ARIES-1442.

> Subsystem impersonates bundles that are a constituent through sharing the 
> osgi.identity capability
> --------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-1442
>                 URL: https://issues.apache.org/jira/browse/ARIES-1442
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>    Affects Versions: subsystem-2.0.6, subsystem-2.0.8
>         Environment: karaf pax-exam
>            Reporter: Bas
>         Attachments: CapabilitiesDifferOnRestart.java.patch
>
>
> Feature subsystems should export all capabilities of its constituents. The 
> osgi.identity capability is also exported but I doubt it is supposed to.
> It might cause problems when using osgi.identity in the preferred-provider 
> header.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to