1. The standard Mbean name must be preceded by an "Mbean" after the class name to be monitored.
2, the monitoring of the class and Mbean interface must be under the same package, also can be understood as the registered interface name must end with an Mbean, interface implementation analogy interface name less mbean, and interface and interface implementation class must be placed under the same package
If this is not the case, a similar error will be reported:
Exception in thread "main" Javax.management.NotCompliantMBeanException:MBean class Test.my.demo.jmx.stander.notification.Hello does not implement Dynamicmbean, neither follows the standard MBean Conventions (Javax.management.NotCompliantMBeanException:Class Test.my.demo.jmx.stander.notification.Hello is not a JMX compliant standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: Test.my.demo.jmx.stander.notification.Hello:Class Test.my.demo.jmx.stander.notification.Hello is not a JMX compliant MXBean)
At Com.sun.jmx.mbeanserver.Introspector.checkCompliance (introspector.java:160)
At Com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean (defaultmbeanserverinterceptor.java:305)
At Com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean (jmxmbeanserver.java:482)
At Test.my.demo.jmx.stander.notification.HelloAgent.main (helloagent.java:19)
Basic specifications that should be noted for JMX use