Use system bundle update to restart framework is an extension bundle is
refreshed. (FELIX-33)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@808934 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 1516d86..7f79433 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -27,7 +27,6 @@
import org.apache.felix.framework.cache.*;
import org.apache.felix.framework.ext.SecurityProvider;
import org.apache.felix.framework.searchpolicy.*;
-import org.apache.felix.framework.ModuleImpl.ModuleClassLoader;
import org.apache.felix.framework.ServiceRegistry.ServiceRegistryCallbacks;
import org.apache.felix.framework.util.*;
import org.apache.felix.framework.util.manifestparser.*;
@@ -3389,12 +3388,6 @@
}
}
- if (restart)
- {
-// TODO: Extension Bundle - We need a way to restart the framework
- m_logger.log(Logger.LOG_WARNING, "Framework restart not implemented.");
- }
-
// Remove any targeted bundles from the uninstalled bundles
// array, since they will be removed from the system after
// the refresh.
@@ -3438,6 +3431,18 @@
}
}
}
+
+ if (restart)
+ {
+ try
+ {
+ update();
+ }
+ catch (BundleException ex)
+ {
+ m_logger.log(Logger.LOG_ERROR, "Framework restart error.", ex);
+ }
+ }
}
finally
{