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

Konrad Windszus commented on FELIX-6866:
----------------------------------------

Not sure whether this behaviour is intended. The javadoc of Bundle.uninstall 
(https://docs.osgi.org/javadoc/osgi.core/8.0.0/org/osgi/framework/Bundle.html#uninstall--)
 says:

{quote}If this bundle has exported any packages, the Framework must continue to 
make these packages available to their importing bundles until the 
FrameworkWiring.refreshBundles method has been called or the Framework is 
relaunched.{quote}



> Singletons not correctly reindexed after bundle uninstall (when BSN is still 
> used by another bundle)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-6866
>                 URL: https://issues.apache.org/jira/browse/FELIX-6866
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-7.0.5
>            Reporter: Konrad Windszus
>            Priority: Major
>
> I ran into the situation where I had two bundles with the same BSN deployed 
> in the same runtime.
> The {{StatefulResolver.m_singletons}} contained 
> {code}
> {com.adobe.acs.acs-aem-commons-bundle=[com.adobe.acs.acs-aem-commons-bundle 
> [686](R 686.0), com.adobe.acs.acs-aem-commons-bundle [697](R 697.0)]}
> {code}
> But even after uninstalling bundle 686 (via WebConsole UI) it still contains  
> both bundle revisions in {{StatefulResolver.m_singletons}}
> The logic inside 
> https://github.com/apache/felix-dev/blob/b47fa6abb20ff10dbd86574e4df68cd959da5c26/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java#L229
>  is not triggered for uninstalled bundles.
> The {{removeRevision(BundleRevision)}} is only called when bundle is closed 
> or refreshed, but not when being uninstalled.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to