Basic specifications that should be noted for JMX use

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.