cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [1/2] git commit: Always use premium setting in ConsoleProxyManager
Date Fri, 18 Jan 2013 02:23:14 GMT
Always use premium setting in ConsoleProxyManager


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

Branch: refs/heads/javelin
Commit: 17a94b20ec5a3f4882fc6019a0c1be19372f8004
Parents: 93985ae
Author: Kelven Yang <kelveny@gmail.com>
Authored: Thu Jan 17 18:22:37 2013 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Thu Jan 17 18:23:06 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServer.java            |    3 +--
 .../consoleproxy/ConsoleProxyManagerImpl.java      |    2 +-
 .../cloud/utils/component/ComponentContext.java    |    8 ++++----
 3 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/17a94b20/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 601316c..15d3095 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -106,7 +106,6 @@ import org.apache.http.protocol.ResponseContent;
 import org.apache.http.protocol.ResponseDate;
 import org.apache.http.protocol.ResponseServer;
 import org.apache.log4j.Logger;
-import org.springframework.aop.framework.Advised;
 import org.springframework.stereotype.Component;
 
 import com.cloud.api.response.ApiResponseSerializer;
@@ -452,7 +451,7 @@ public class ApiServer implements HttpRequestHandler {
             ctx.setAccountId(asyncCmd.getEntityOwnerId());
 
             Long instanceId = (objectId == null) ? asyncCmd.getInstanceId() : objectId;
-            AsyncJobVO job = new AsyncJobVO(callerUserId, caller.getId(), cmdObj.getClass().getName(),
+            AsyncJobVO job = new AsyncJobVO(callerUserId, caller.getId(), realCmdObj.getClass().getName(),
                     ApiGsonHelper.getBuilder().create().toJson(params), instanceId, asyncCmd.getInstanceType());
 
             long jobId = _asyncMgr.submitAsyncJob(job);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/17a94b20/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
index 502ba30..4ff0ada 100755
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -259,7 +259,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
     private String _instance;
 
     private int _proxySessionTimeoutValue = DEFAULT_PROXY_SESSION_TIMEOUT;
-    private boolean _sslEnabled = false;
+    private boolean _sslEnabled = true;
 
     // global load picture at zone basis
     private SystemVmLoadScanner<Long> _loadScanner;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/17a94b20/utils/src/com/cloud/utils/component/ComponentContext.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/component/ComponentContext.java b/utils/src/com/cloud/utils/component/ComponentContext.java
index dce2074..5347f2e 100644
--- a/utils/src/com/cloud/utils/component/ComponentContext.java
+++ b/utils/src/com/cloud/utils/component/ComponentContext.java
@@ -121,9 +121,9 @@ public class ComponentContext implements ApplicationContextAware {
     }
      
     public static Class<?> getTargetClass(Object instance) {
-	    if(instance instanceof Advised) {
+	    while(instance instanceof Advised) {
 	    	try {
-	    		return ((Advised)instance).getTargetSource().getTarget().getClass();
+	    		instance = ((Advised)instance).getTargetSource().getTarget();
 	    	} catch(Exception e) {
 	    		return instance.getClass();
 	    	}
@@ -132,9 +132,9 @@ public class ComponentContext implements ApplicationContextAware {
     }
     
     public static <T> T getTargetObject(Object instance) {
-        if(instance instanceof Advised) {
+        while(instance instanceof Advised) {
         	 try {
-				return (T)((Advised)instance).getTargetSource().getTarget();
+				instance = ((Advised)instance).getTargetSource().getTarget();
 			} catch (Exception e) {
 				return (T)instance;
 			}


Mime
View raw message