Automatically remove old Jetty configs.
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 21 Oct 2019 14:52:26 +0000 (16:52 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 21 Oct 2019 14:52:26 +0000 (16:52 +0200)
org.argeo.cms/src/org/argeo/cms/internal/kernel/DeployConfig.java

index ffb79b202b7eb0390cdec879068ab449d7a9e1ce..41b064c9c0daee89a83b5ffafe271ce0409491d1 100644 (file)
@@ -128,9 +128,18 @@ class DeployConfig implements ConfigurationListener {
 //                     webServerConfig.put("customizer.class", "org.argeo.equinox.jetty.CmsJettyCustomizer");
 //                     putFactoryDeployConfig(KernelConstants.JETTY_FACTORY_PID, webServerConfig);
 //             }
+               LdapName defaultHttpServiceDn = serviceDn(KernelConstants.JETTY_FACTORY_PID, NodeConstants.DEFAULT);
+               if (deployConfigs.containsKey(defaultHttpServiceDn)) {
+                       // remove old default configs since we have now to start Jetty servlet bridge
+                       // indirectly
+                       deployConfigs.remove(defaultHttpServiceDn);
+               }
+
+               // SAVE
                save();
+               //
 
-               // Explicitly configure Jetty so that the default server is not started by the
+               // Explicitly configures Jetty so that the default server is not started by the
                // activator of the Equinox Jetty bundle.
                Dictionary<String, Object> webServerConfig = InitUtils
                                .getHttpServerConfig(getProps(KernelConstants.JETTY_FACTORY_PID, NodeConstants.DEFAULT));