You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2010/06/09 22:57:16 UTC

[jira] Resolved: (FELIX-2358) Hot undeployment of features does not uninstall all bundles

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

Guillaume Nodet resolved FELIX-2358.
------------------------------------

         Assignee: Guillaume Nodet
    Fix Version/s: karaf-1.6.2
       Resolution: Fixed

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	karaf/deployer/features/src/main/java/org/apache/felix/karaf/deployer/features/FeatureDeploymentListener.java
Committed r953156

Only bundles listed in the feature will be uninstalled.  Bundles from dependant features won't be removed (unless they are also in the same xml descriptor).

> Hot undeployment of features does not uninstall all bundles
> -----------------------------------------------------------
>
>                 Key: FELIX-2358
>                 URL: https://issues.apache.org/jira/browse/FELIX-2358
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0, karaf 1.6.0
>         Environment: Tested on a Windows XP box, with FUSE ESB 4.2 running Felix as Osgi framework
>            Reporter: Thomas Demande
>            Assignee: Guillaume Nodet
>             Fix For: karaf-1.6.2
>
>         Attachments: dummy-feature.xml
>
>
> When deploying features _via_ the drop-in mechanism (using the {{FeatureDeploymentListener}}), it also installs needed bundles, as required.
> But when the feature file is removed from the deploy directory, some problems may occur, the most important being that bundles installed by the feature (only) will not be uninstalled.
> An exception is thrown when trying to access the feature bundle entries when not permitted, resulting in an exception, 
> I think this is related to what's said in the revision 909487 comment (http://svn.apache.org/viewvc?view=revision&revision=909487).
> That snippet of the class
> 142 } else if (bundleEvent.getType() == BundleEvent.UNINSTALLED) {
> 143 	try {
> 144 	Enumeration featuresUrlEnumeration = bundle.findEntries("/META-INF/" + FEATURE_PATH + "/", "*.xml", false); 
> will always throw an exception as the findEntries has to throw an IllegalStateException if the bundle in uninstalled.
> Therefore, the call to "featuresService.uninstallFeature(f.getName(), f.getVersion()); " is never reached, and bundled participating in that feature are not uninstalled.
> It's worth noting that in some cases everything is correctly removed, but that seems to happen only if Karaf has been restarted after the first drop-in of the feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.