Make Jetty restart when OSGi configuration is not cleaned up.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / DeployConfig.java
index 4a75f519d0782e2077ea3ae968ff1413ef2cf7dd..8bdf00ceb7ea9a818b74bb198d02237971b6f2de 100644 (file)
@@ -153,6 +153,9 @@ class DeployConfig implements ConfigurationListener {
                        tryGettyJetty: while (tryCount > 0) {
                                try {
                                        JettyConfigurator.startServer(KernelConstants.DEFAULT_JETTY_SERVER, webServerConfig);
+                                       // Explicitly starts Jetty OSGi HTTP bundle, so that it gets triggered if OSGi
+                                       // configuration is not cleaned
+                                       FrameworkUtil.getBundle(JettyConfigurator.class).start();
                                        break tryGettyJetty;
                                } catch (IllegalStateException e) {
                                        // Jetty may not be ready