Always use premium setting in ConsoleProxyManager

This commit is contained in:
Kelven Yang 2013-01-17 18:22:37 -08:00
parent 93985ae191
commit 17a94b20ec
3 changed files with 6 additions and 7 deletions

View File

@ -106,7 +106,6 @@ import org.apache.http.protocol.ResponseContent;
import org.apache.http.protocol.ResponseDate; import org.apache.http.protocol.ResponseDate;
import org.apache.http.protocol.ResponseServer; import org.apache.http.protocol.ResponseServer;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.aop.framework.Advised;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.cloud.api.response.ApiResponseSerializer; import com.cloud.api.response.ApiResponseSerializer;
@ -452,7 +451,7 @@ public class ApiServer implements HttpRequestHandler {
ctx.setAccountId(asyncCmd.getEntityOwnerId()); ctx.setAccountId(asyncCmd.getEntityOwnerId());
Long instanceId = (objectId == null) ? asyncCmd.getInstanceId() : objectId; 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()); ApiGsonHelper.getBuilder().create().toJson(params), instanceId, asyncCmd.getInstanceType());
long jobId = _asyncMgr.submitAsyncJob(job); long jobId = _asyncMgr.submitAsyncJob(job);

View File

@ -259,7 +259,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
private String _instance; private String _instance;
private int _proxySessionTimeoutValue = DEFAULT_PROXY_SESSION_TIMEOUT; private int _proxySessionTimeoutValue = DEFAULT_PROXY_SESSION_TIMEOUT;
private boolean _sslEnabled = false; private boolean _sslEnabled = true;
// global load picture at zone basis // global load picture at zone basis
private SystemVmLoadScanner<Long> _loadScanner; private SystemVmLoadScanner<Long> _loadScanner;

View File

@ -121,9 +121,9 @@ public class ComponentContext implements ApplicationContextAware {
} }
public static Class<?> getTargetClass(Object instance) { public static Class<?> getTargetClass(Object instance) {
if(instance instanceof Advised) { while(instance instanceof Advised) {
try { try {
return ((Advised)instance).getTargetSource().getTarget().getClass(); instance = ((Advised)instance).getTargetSource().getTarget();
} catch(Exception e) { } catch(Exception e) {
return instance.getClass(); return instance.getClass();
} }
@ -132,9 +132,9 @@ public class ComponentContext implements ApplicationContextAware {
} }
public static <T> T getTargetObject(Object instance) { public static <T> T getTargetObject(Object instance) {
if(instance instanceof Advised) { while(instance instanceof Advised) {
try { try {
return (T)((Advised)instance).getTargetSource().getTarget(); instance = ((Advised)instance).getTargetSource().getTarget();
} catch (Exception e) { } catch (Exception e) {
return (T)instance; return (T)instance;
} }