synchronized (mutex) {
final AddOnStabilityLevel addonStabilityLevel = checkAddOnStabilityLevel(null);
final Map<String, Bundle> bundles = getUpgradableBundles(addonStabilityLevel);
boolean upgraded = false;
for (final Bundle bundle : bundles.values()) {
final BundleVersion bundleVersion = bundle.getLatestVersion();
final InstallOrUpgradeStatus status = installOrUpgradeAddOn(
bundleVersion, bundle.getSymbolicName(), false);
if (status.equals(InstallOrUpgradeStatus.SUCCESS)) {
LOGGER.info("Successfully upgraded: "
+ bundle.getSymbolicName() + " [version: "
+ bundleVersion.getVersion() + "]");
upgraded = true;
}
else if (status.equals(InstallOrUpgradeStatus.FAILED)) {
LOGGER.warning("Unable to upgrade: "
+ bundle.getSymbolicName() + " [version: "
+ bundleVersion.getVersion() + "]");
}
}
if (upgraded) {
LOGGER.warning("Please restart the Roo shell to complete the upgrade");
}