angsuman
-
07:20:47 am on December 26, 2009 | # |
How to develop JMX MBean in 5 minutes
- Create a class named say Abc.
- To expose it as MBean, create an interface AbcMBean.
- Abc should now implement AbcMBean.
- Get information with getMethodName() methods
- Set information with setMethodName() methods
- Register the MBean class separately:
java.lang.management.ManagementFactory.getPlatformMBeanServer().registerMBean(new ClassName(), new ObjectName(”com.taragana:name=NameofService”));
That’s it!
Leave a Comment
You must be logged in to post a comment.