try {
// Query Thread Pools
set = mBeanServer.queryMBeans(tpName, null);
iterator = set.iterator();
while (iterator.hasNext()) {
ObjectInstance oi = (ObjectInstance) iterator.next();
objectName = oi.getObjectName();
if (objectName.getKeyProperty("name").indexOf(port) > -1) {
tpName = objectName;
break;
}
}
// Query Global Request Processors
set = mBeanServer.queryMBeans(grpName, null);
iterator = set.iterator();
while (iterator.hasNext()) {
ObjectInstance oi = (ObjectInstance) iterator.next();
objectName = oi.getObjectName();
if (objectName.getKeyProperty("name").indexOf(port) > -1) {
grpName = objectName;
break;
}
}