Merge commit '79b243' from stabilization-f69489

Change-Id: Ie2387663ab0cd4544eb9ec6f12ec2ba74136ef83
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
index de1b18d..1e92f16 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
@@ -220,10 +220,9 @@
                 new IPCSystem(new InetSocketAddress(ccConfig.getClientListenAddress(), ccConfig.getClientListenPort()),
                         networkSecurityManager.getSocketChannelFactory(), ciIPCI,
                         new JavaSerializationBasedPayloadSerializerDeserializer());
-        webServer = new WebServer(this, ccConfig.getConsoleListenPort());
         clusterIPC.start();
         clientIPC.start();
-        webServer.start();
+        startWebServers();
         info = new ClusterControllerInfo(ccId, ccConfig.getClientPublicAddress(), ccConfig.getClientPublicPort(),
                 ccConfig.getConsolePublicPort());
         timer.schedule(sweeper, 0, ccConfig.getDeadNodeSweepThreshold());
@@ -237,6 +236,11 @@
         notifyApplication();
     }
 
+    protected void startWebServers() throws Exception {
+        webServer = new WebServer(this, ccConfig.getConsoleListenPort());
+        webServer.start();
+    }
+
     private void startApplication() throws Exception {
         serviceCtx = new CCServiceContext(this, serverCtx, ccContext, ccConfig.getAppConfig());
         serviceCtx.addJobLifecycleListener(resultDirectoryService);
@@ -326,7 +330,7 @@
     public void stop() throws Exception {
         LOGGER.log(Level.INFO, "Stopping ClusterControllerService");
         stopApplication();
-        webServer.stop();
+        stopWebServers();
         sweeper.cancel();
         workQueue.stop();
         executor.shutdownNow();
@@ -336,8 +340,11 @@
         LOGGER.log(Level.INFO, "Stopped ClusterControllerService");
     }
 
-    private void stopApplication() throws Exception {
+    protected void stopWebServers() throws Exception {
+        webServer.stop();
+    }
 
+    private void stopApplication() throws Exception {
         application.stop();
     }