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

Bas commented on ARIES-1445:
----------------------------

The refresh will remove the bundle from memory and try to find a different 
bundle to resolve the dependency to bundle C.

To solve this issue the bundle should not be deleted. They are not necessary 
for the subsystem to function but are necessary to start a subsystem dependency 
bundle. 
Because they are not necessary from a subsystem point of view there is no 
administration of these pulled in bundles. So there is no usage count or 
anything like that which can be used to prevent deletion. But something like a 
reference count or a full administration of bundles that were installed as a 
consequence of a subsystem install could be created to solve this. But then 
where to store this administration to keep it working after a restart. 

> Bundles that are not direct dependencies of a subsystem can be removed while 
> still in use
> -----------------------------------------------------------------------------------------
>
>                 Key: ARIES-1445
>                 URL: https://issues.apache.org/jira/browse/ARIES-1445
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>    Affects Versions: subsystem-2.0.6, subsystem-2.0.8
>         Environment: karaf pax-exam
>            Reporter: Bas
>              Labels: test-patch
>         Attachments: UninstallFeatureRemovesReferencedBundle.java.patch
>
>
> Bundle A is a constituent of application subsystem S1
> Bundle A is a constituent of application subsystem S2
> Bundle A has a package import of b.package
> Bundle B exports b.package
> Bundle B imports c.package
> Bundle C exports c.package
> There is an obr repository with bundle b and c
> Bundle B and C are not constituents
> When installing S1 bundle B and C are added to the root subsystem to fullfill 
> the requirements of bundle A
> When installing S2 everything is still working.
> Start S1.
> Now we uninstall S1 and bundle C is removed. 
> refreshBundles
> Subsystem S2 won't start anymore because of that.
> The testcase uses different bundle ids.



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

Reply via email to