Search code examples
jmxmbeansapache-tomee

MBeanServer in TomEE/Tomcat


I have been asked to investigate feasibility of some projects. One of them requires registering and unregistering MBeans explicitly from TomEE's JMX Infrastructure (MBeanServer provided by OpenEJB, I believe).

Websphere provides an implementation for accessing its singleton MBeanServer using the code

AdminService.getMBeanFactory().getMBeanServer();

I was wondering if any such implementation exists in TomEE/Tomcat with OpenEJB. Any direction would be appreciated.


Solution

  • Yes LocalMBeanServer but this is fully useless if you don't want to be able to switch some MBeans off. TomEE keeps thing simple and just rely on JVM MBeanServer (ManagementFactory one)