3 Replies Latest reply on Mar 27, 2007 2:37 PM by Brian Stansberry

    How to access TreeCache from MBean ?

    Raameshwar Nandalal Newbie

      Hi ,

      I am new to both JBoss Cache and MBeans.

      I am trying to deploy JBoss TreeCache as MBean in Sun Java Application Server 9. I am able to deploy it and start successfully and i am able to access the cache through the following code.

      ObjectInstance object = server.getObjectInstance(name);
      TreeCache cache = (TreeCache)server.instantiate(object.getClassName(),null);
      cache.put("/a/b/c", map);

      The problem i face is, i cannot access the same instance of cache if i access the MBean from other applications. What is the api i should use if i want to access the JBoss Cache from different applications. The server.instantiate() method always gives a new instance.

      Any pointers would be of great help.