}
//serverConnection.queryNames(null,null);
StatsProxy proxy = null;
if (connectionSettings.getConnectionType().isUseManagementHome()) {
proxy = new JSR77ManagementMBeanServerProxy(this.mejb);
} else {
proxy = new JMXRemotingMBeanServerProxy(serverConnection);
}
setStatsProxy(proxy);
this.mbeanServer = proxy.buildServerProxy();
} catch (MalformedURLException e) {
throw new EmsConnectException("Malformed url", e);
} catch (IOException e) {
throw new EmsConnectException("IOException: Check service availability",e);