EmsConnection jmxConnection = getEmsConnection();
String servletMBeanNames = SESSION_NAME_BASE_TEMPLATE.replace("%PATH%",
WarDiscoveryHelper.getContextPath(this.contextRoot));
servletMBeanNames = servletMBeanNames.replace("%HOST%", vhost);
ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(servletMBeanNames);
List<EmsBean> mBeans = jmxConnection.queryBeans(queryUtility.getTranslatedQuery());
if (mBeans.size() == 0) {
// retry with the cluster manager TODO select the local vs cluster mode on discovery
servletMBeanNames = CLUSTER_SESSION_NAME_BASE_TEMPLATE.replace("%PATH%",
WarDiscoveryHelper.getContextPath(this.contextRoot));