I am having a problem accessing mbean using ObjectName expression matching. The following code successfully installs boolean b:
ObjectName objName = new ObjectName("UnifiedSystem-search Cluster Control lc:class=myclass"); boolean b = (boolean)myMBeanServer.invoke(objName, "areAlertsSuppressed");
The problem is that mbeanname varies depending on the encoding environment. However, the name does not change much, which is easy to do with the help of the built-in expression corresponding to ObjectNames support. The following code (in the same environment as above) raises an InstanceNotFoundException:
ObjectName objName = new ObjectName("UnifiedSystem-search Cluster Control *:class=myclass"); boolean b = (boolean)myMBeanServer.invoke(objName, "areAlertsSuppressed")
Any ideas how I can get the result I'm looking for?
source share