Start simplifying and clarifying CMS initialisation. Remove Jackrabbit
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / NodeHttp.java
index ea764c3fb2e400fa08d62c13cc11453a55a65796..87b688a6dd70e38c364802f2ea55f0cdc98f9339 100644 (file)
@@ -46,10 +46,10 @@ public class NodeHttp implements KernelConstants {
 
        private String httpRealm = "Argeo";
        private String webDavConfig = HttpUtils.WEBDAV_CONFIG;
-       private final boolean cleanState;
+//     private final boolean cleanState;
 
-       public NodeHttp(boolean cleanState) {
-               this.cleanState = cleanState;
+       public NodeHttp() {
+//             this.cleanState = cleanState;
                httpServiceTracker = new PrepareHttpStc();
                // httpServiceTracker.open();
                KernelUtils.asyncOpen(httpServiceTracker);
@@ -66,7 +66,7 @@ public class NodeHttp implements KernelConstants {
                try {
                        registerWebdavServlet(httpService, alias, repository);
                        registerRemotingServlet(httpService, alias, repository);
-                       if (NodeConstants.EGO.equals(alias))
+                       if (NodeConstants.EGO_REPOSITORY.equals(alias))
                                registerFilesServlet(httpService, alias, repository);
                        if (log.isTraceEnabled())
                                log.trace("Registered servlets for repository '" + alias + "'");
@@ -81,7 +81,7 @@ public class NodeHttp implements KernelConstants {
                try {
                        httpService.unregister(webdavPath(alias));
                        httpService.unregister(remotingPath(alias));
-                       if (NodeConstants.EGO.equals(alias))
+                       if (NodeConstants.EGO_REPOSITORY.equals(alias))
                                httpService.unregister(filesPath(alias));
                        if (log.isTraceEnabled())
                                log.trace("Unregistered servlets for repository '" + alias + "'");
@@ -222,8 +222,11 @@ public class NodeHttp implements KernelConstants {
                                throw new CmsException("An http service is already configured");
                        repositories = new RepositoriesStc(bc, httpService);
                        // repositories.open();
-                       if (cleanState)
-                               KernelUtils.asyncOpen(repositories);
+
+                       ///if (cleanState)
+                       // FIXME properly publish servlets
+                       //KernelUtils.asyncOpen(repositories);
+
                        log.info(httpPortsMsg(httpPort, httpsPort));
                        // httpAvailable = true;
                        // checkReadiness();