0

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,

Saurabh
  • 930
  • 2
  • 17
  • 39

1 Answers1

0

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

Udo Klimaschewski
  • 5,150
  • 1
  • 28
  • 41
  • Thanks for the help.But after adding it to the MBeanServer it only shows attribute tab but not the Operations and notification tab.Can you please tell me what could be the issue? – Saurabh Apr 10 '14 at 13:19
  • Sounds like a problem with your MBean, if attributes are shown but not the operations. You better start a new question for it, because it is another topic, not about finding the server. Post your MBean code and code how you register to a new question. – Udo Klimaschewski Apr 10 '14 at 13:36