String onStr = domain + ":type=Host,*";
ObjectName objectName = new ObjectName(onStr);
Set set = mBeanServer.queryMBeans(objectName, null);
Iterator iterator = set.iterator();
while (iterator.hasNext()) {
ObjectInstance oi = (ObjectInstance) iterator.next();
registerHost(oi.getObjectName());
}
// Query contexts
onStr = "*:j2eeType=WebModule,*";
objectName = new ObjectName(onStr);
set = mBeanServer.queryMBeans(objectName, null);
iterator = set.iterator();
while (iterator.hasNext()) {
ObjectInstance oi = (ObjectInstance) iterator.next();
registerContext(oi.getObjectName());
}
// Query wrappers
onStr = "*:j2eeType=Servlet,*";
objectName = new ObjectName(onStr);
set = mBeanServer.queryMBeans(objectName, null);
iterator = set.iterator();
while (iterator.hasNext()) {
ObjectInstance oi = (ObjectInstance) iterator.next();
registerWrapper(oi.getObjectName());
}
onStr = "JMImplementation:type=MBeanServerDelegate";
objectName = new ObjectName(onStr);
mBeanServer.addNotificationListener(objectName, this, null, null);