Hi,
I want to be able to execute some utility function from JMX console.
I know that I should add some bean into module somewhere but not sure about details.
How to expose some utility method in JMX console?
In your ModuleContextListener, register your MBean from the moduleInitialized() method. For example:
MBeanServer mbeanServer = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
mbeanServer.registerMBean(new TMSSMCService(), new ObjectName(TMSSMCService.NAME));
Thanks, Greg. I see controls on JMX UI are taken from method arguments. Does JMX bean UI support only text inputs or we can show some combo with dynamically generated values?
To my knowledge, combo fields are not supported and you have to stick with primitives like numbers, Strings and booleans