cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [11/32] git commit: server: Fix ApiServer init method, we won't use cfg files and it's not used there
Date Fri, 11 Jan 2013 00:01:22 GMT
server: Fix ApiServer init method, we won't use cfg files and it's not used there

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/72693ea3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/72693ea3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/72693ea3

Branch: refs/heads/javelin
Commit: 72693ea382bd064f4e227faab2f61561b7683149
Parents: dcbb0ec
Author: Rohit Yadav <bhaisaab@apache.org>
Authored: Wed Jan 9 17:10:36 2013 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Wed Jan 9 17:20:46 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServer.java            |    9 ++++-----
 .../src/com/cloud/servlet/CloudStartupServlet.java |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/72693ea3/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 56cef12..dfb47fa 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -166,23 +166,22 @@ public class ApiServer implements HttpRequestHandler {
         super();
     }
 
-    public static void initApiServer(String[] apiConfig) {
+    public static void initApiServer() {
         if (s_instance == null) {
             //Injection will create ApiServer and all its fields which have @Inject
             s_instance = ComponentLocator.inject(ApiServer.class);
-            s_instance.init(apiConfig);
+            s_instance.init();
         }
     }
 
     public static ApiServer getInstance() {
-        // Assumption: CloudStartupServlet would initialize ApiServer
         if (s_instance == null) {
-            s_logger.fatal("ApiServer instance failed to initialize");
+            ApiServer.initApiServer();
         }
         return s_instance;
     }
 
-    public void init(String[] apiConfig) {
+    public void init() {
         BaseCmd.setComponents(new ApiResponseHelper());
         BaseListCmd.configure();
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/72693ea3/server/src/com/cloud/servlet/CloudStartupServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/servlet/CloudStartupServlet.java b/server/src/com/cloud/servlet/CloudStartupServlet.java
index 389bd26..484c7bf 100755
--- a/server/src/com/cloud/servlet/CloudStartupServlet.java
+++ b/server/src/com/cloud/servlet/CloudStartupServlet.java
@@ -48,7 +48,7 @@ public class CloudStartupServlet extends HttpServlet implements ServletContextLi
 	    	s_locator = ComponentLocator.getLocator(ManagementServer.Name);
 		    ManagementServer ms = (ManagementServer)ComponentLocator.getComponent(ManagementServer.Name);
 		    ms.enableAdminUser("password");
-		    ApiServer.initApiServer(ms.getPropertiesFiles());
+		    ApiServer.initApiServer();
 	    } catch (InvalidParameterValueException ipve) {
 	    	s_logger.error("Exception starting management server ", ipve);
 	    	throw new ServletException (ipve.getMessage());


Mime
View raw message