質問

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