Tags

links:
http://www.javalobby.org/java/forums/t49130.html

summary:
– build your bean
– extract interface which name must ends with xxxMBean
– all extracted interface must be synchronized?
– getPlatformMBeanServer() to get the local jvm MBeanServer
– registerMBean() to register the MBean (with an ObjectName) to the MBeanServer
– upload/register the MBean onto the MBeanServer (kinda like a service locator?)
– whenever need it load from MBeanServer
– possible load it as proxy e.g.

ObjectName name = new ObjectName(“org.somename.you.register.with:type=ApplicationCacheMBean”);
ApplicationCacheMBean mbean = (ApplicationCacheMBean) =
MBeanServerInvocationHandler.newProxyInstance(mbs,
objectName,
ApplicationCacheMBean.class,
false);

Advertisements