*/
protected boolean loadJSR77(String appName, String j2eeType) {
ObjectName jsr77mBeanObjectName = null;
try {
String domainName = null;
AdminService adminService = AdminService.getAdminService();
if (adminService != null) {
domainName = adminService.getAdminContext().getDomainName();
} else {
return false;
}
if (j2eeType == null) return false;
//We do not load JSR77 MBeans for web modules
//web modules are loaded by the Tomcat container
if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_WEB_MODULE)) {
return false;
}
String instanceName =
ApplicationServer.getServerContext().getInstanceName();
//form query
StringBuffer sb = new StringBuffer("");
sb.append(domainName + ":");
sb.append("j2eeType=" + j2eeType + ",");
sb.append("name=" + appName + ",");
if (! j2eeType.equals(ManagementObjectManager.J2EE_TYPE_APPLICATION)) {
sb.append("J2EEApplication=null" + ",");
}
sb.append("J2EEServer=" + instanceName + "," + "*");
// perform query
MBeanServer mbs = adminService.getAdminContext().getMBeanServer();
ObjectName objNamePattern = new ObjectName(sb.toString());
java.util.Set s = mbs.queryNames(objNamePattern, null);
if (s != null && s.size()>0) {
ObjectName [] objNameArr =