Question

I have a requirement in which I have to get the mbean server dynamically and register a new MBean to it.The Mbean Server is created using spring.Can anyone suggest me how can it be implemented?

Thanks,

Was it helpful?

Solution

You can try:

org.springframework.jmx.support.JmxUtils.locateMBeanServer();

and

org.springframework.jmx.support.JmxUtils.locateMBeanServer(String agentId);

Both are public static methods and return an instance of MBeanServer.

see: JavaDoc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top