Automatic Uninstalling of Prerequisite Bundles

When a bundle with prerequisite SAT bundles is uninstalled, SAT can automatically uninstall the prerequisite SAT bundles if they do not have any other dependent bundles.

By default SAT bundles are not candidates for being automatically uninstalled. An SAT bundle indicates that it can be automatically uninstalled by overriding the BaseBundleActivator configuration parameter method isUninstallable() to answer true.

For example, consider the puzzle piece diagram:

At runtime the Customer bundle acquires the VendorService from either the Hotdog Vendor bundle or the Popcorn Vendor bundle. For the purpose of this example we shall assume that the Customer bundle acquires the Hotdog Vendor bundle's implementation of the VendorService.

When the Customer bundle is uninstalled SAT attempts to automatically uninstall its prerequisite bundles:

Having uninstalled the Customer bundle, the Popcorn Vendor bundle and Vendor Service bundles remain. When the Popcorn Vendor bundle is uninstalled SAT attempts to automatically uninstalls its prerequisite bundles:

SAT automatically uninstalls the Vendor Service bundle since it has no dependents.