سؤال

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,

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top