Search code examples
javaspringmbeansspring-jmx

Third Party MBEANS operations management


I have a spring project where I have my custom mbeans(defined by user) and mbeans provided by jars. If I don't have to expose few operations of custom mbeans, I can put the mathod name values in assembler under properties : ignoredMethods. My question is : If i don't have to expose the method of a third party jar mbean which is already exposed, what should I do?


Solution

  • If the third party jars are themselves registering the MBeans with the MBeanServer internally, you have no control. If you are using Spring to expose the MBeans, then you can control what's exposed.

    EDIT:

    If you are using <context:mbean-export/>, it creates an AnnotationMBeanExporter which will auto-detect classes matching the MBean naming rules by default.

    You can turn it off by declaring the exporter as a <bean/> instead and setting its autoDectedMode to 0, or autoDetectModeName to AUTODETECT_NONE.