protected Object getAttribute(String context,
String attributeName) {
//
// Protected Helpers
//
try{
ObjectName mBeanName=new ObjectName(context);
Iterator allServers=MBeanServerFactory.findMBeanServer(null).iterator();
while(allServers.hasNext()) {
try{
return ((MBeanServer) allServers.next()).
getAttribute(mBeanName,attributeName);
} catch(MBeanException e) {
} catch(AttributeNotFoundException e) {
} catch(InstanceNotFoundException e) {
} catch(ReflectionException e) {
}
}
} catch(MalformedObjectNameException e) {
}
return null;
}
find attribute through JMX server and mbean |