This content has been marked as final.
Show 2 replies
-
1. Re: Getting started with JTreeCache as MBean and JBoss 3.2.5
prese Jul 18, 2004 4:14 AM (in response to aburton)Hi Alex,
If you want to used it inside the same JMV you can use MBeanServerLocator.locate() to locate the MBeanServer. After this you can use MBeanProxy.get(TreeCacheMBean.class, new ObjectName("jboss.cache:service=TreeCache"), MBeanServer server) to retrieve an instance to TreeCacheMBean.
If you want to access it from a different JVM you can try it via RMIAdaptor.
HTH
Sebi -
2. Re: Getting started with JTreeCache as MBean and JBoss 3.2.5
aburton Jul 18, 2004 4:58 AM (in response to aburton)Many thanks, worked a treat :)
Alex.public static org.jboss.cache.TreeCacheMBean getTreeCache() throws javax.management.MalformedObjectNameException, org.jboss.mx.util.MBeanProxyCreationException { MBeanServer mbServer = MBeanServerLocator.locate(); return (TreeCacheMBean)MBeanProxy.get(TreeCacheMBean.class, new ObjectName("jboss.cache:service=TreeCache"), mbServer); }