cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: updated refs/heads/4.1 to c2457b5
Date Tue, 30 Apr 2013 17:49:31 GMT
Updated Branches:
  refs/heads/4.1 75832c893 -> c2457b528


CLOUDSTACK-2194: Fix ApiServer component initialization sequence


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

Branch: refs/heads/4.1
Commit: c2457b52889928afa906b3f634c4fd54f879b878
Parents: 75832c8
Author: Kelven Yang <kelveny@gmail.com>
Authored: Tue Apr 30 10:31:10 2013 -0700
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Tue Apr 30 18:44:07 2013 +0100

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServer.java |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2457b52/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 4c1cf2d..7562ac2 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -39,6 +39,7 @@ import javax.annotation.PostConstruct;
 import javax.crypto.Mac;
 import javax.crypto.spec.SecretKeySpec;
 import javax.inject.Inject;
+import javax.naming.ConfigurationException;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
@@ -56,8 +57,6 @@ import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
 import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
 import com.cloud.event.ActionEventUtils;
-import org.apache.cloudstack.acl.APILimitChecker;
-import org.apache.cloudstack.api.*;
 import org.apache.cloudstack.api.command.user.account.ListAccountsCmd;
 import org.apache.cloudstack.api.command.user.account.ListProjectAccountsCmd;
 import org.apache.cloudstack.api.command.user.event.ListEventsCmd;
@@ -135,6 +134,7 @@ import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.Pair;
 import com.cloud.utils.StringUtils;
 import com.cloud.utils.component.ComponentContext;
+import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.component.PluggableService;
 import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.SearchCriteria;
@@ -142,7 +142,7 @@ import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
-public class ApiServer implements HttpRequestHandler, ApiServerService {
+public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiServerService
{
     private static final Logger s_logger = Logger.getLogger(ApiServer.class.getName());
     private static final Logger s_accessLogger = Logger.getLogger("apiserver." + ApiServer.class.getName());
 
@@ -173,13 +173,19 @@ public class ApiServer implements HttpRequestHandler, ApiServerService
{
     @PostConstruct
     void initComponent() {
         s_instance = this;
-        init();
     }
 
     public static ApiServer getInstance() {
         return s_instance;
     }
-
+    
+	@Override
+	public boolean configure(String name, Map<String, Object> params)
+			throws ConfigurationException {
+		init();
+		return true;
+	}
+ 
     public void init() {
         Integer apiPort = null; // api port, null by default
         SearchCriteria<ConfigurationVO> sc = _configDao.createSearchCriteria();


Mime
View raw message