大家有认识 Lehigh University 的 Prof. Nelson Tansu 的吗# Engineering - 工程
c*n
1 楼
I tried to listen to notifications from all mbeans ,
by calling
mbsc.addNotificationListener(new ObjectName("*:*")......)
but at run time it gave me an error:
>>> Perform operations on Hello MBean <<<
Add notification listener...
Exception in thread "main" javax.management.InstanceNotFoundException:
*:type=Hello
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMB
eanServerInterceptor.java:1094)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getClassLoaderFor(
DefaultMBeanServerInterceptor.java:1438)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.getClassLoaderFor(JmxMBeanServer.
java:1276)
at
javax.management.remote.rmi.RMIConnectionImpl$5.run(RMIConnectionImpl.ja
va:1326)
at java.security.AccessController.doPrivileged(Native Method)
so it did not really take "*" as a pattern, but the doc says this should
work.... where did I do wrong? thanks!
by calling
mbsc.addNotificationListener(new ObjectName("*:*")......)
but at run time it gave me an error:
>>> Perform operations on Hello MBean <<<
Add notification listener...
Exception in thread "main" javax.management.InstanceNotFoundException:
*:type=Hello
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMB
eanServerInterceptor.java:1094)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getClassLoaderFor(
DefaultMBeanServerInterceptor.java:1438)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.getClassLoaderFor(JmxMBeanServer.
java:1276)
at
javax.management.remote.rmi.RMIConnectionImpl$5.run(RMIConnectionImpl.ja
va:1326)
at java.security.AccessController.doPrivileged(Native Method)
so it did not really take "*" as a pattern, but the doc says this should
work.... where did I do wrong? thanks!