Skip to content

Commit ed0fbcc

Browse files
committed
CLOUDSTACK-4950: fix the problem to support sessions to multiple vCenter instance
1 parent a1be4ff commit ed0fbcc

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ public boolean verify(String urlHostName, SSLSession session) {
8888
}
8989
};
9090
HttpsURLConnection.setDefaultHostnameVerifier(hv);
91-
92-
vimService = new VimService();
9391
} catch (Exception e) {
9492
}
9593
}
@@ -107,7 +105,7 @@ private static void trustAllHttpsCertificates() throws Exception {
107105
}
108106

109107
private ManagedObjectReference SVC_INST_REF = new ManagedObjectReference();
110-
private static VimService vimService;
108+
private VimService vimService;
111109
private VimPortType vimPort;
112110
private String serviceCookie;
113111
private final String SVC_INST_NAME = "ServiceInstance";
@@ -127,6 +125,7 @@ public void connect(String url, String userName, String password) throws Excepti
127125
SVC_INST_REF.setType(SVC_INST_NAME);
128126
SVC_INST_REF.setValue(SVC_INST_NAME);
129127

128+
vimService = new VimService();
130129
vimPort = vimService.getVimPort();
131130
Map<String, Object> ctxt = ((BindingProvider) vimPort).getRequestContext();
132131

0 commit comments

Comments
 (0)