felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Demande (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-2358) Hot undeployment of features does not uninstall all bundles
Date Wed, 26 May 2010 12:53:33 GMT
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.6.0, karaf-1.4.0
         Environment: Tested on a Windows XP box, with FUSE ESB 4.2 running Felix as Osgi
            Reporter: Thomas Demande

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.

View raw message