0 Replies Latest reply on Jan 29, 2006 12:38 PM by uday dustin

    Not able to access cache.

    uday dustin Newbie

      I have written the following code to test the cache funtionality.

      Ithe Init servlet
      MBeanServer server = MBeanServerLocator.locate();
      cache = (TreeCacheMBean) MBeanProxyExt.create(TreeCacheMBean.class,
      "jboss.cache:service=MyCache", server);

      cache.put("/CacheTest", "Hello", new StringBuffer("Hello"));

      I was not able to access the cache using the following code from different servlet.

      MBeanServer server = MBeanServerLocator.locate();
      System.out.println("HIHIHIHIH:"+server.getAttribute(new ObjectName("jboss.cache:service=MyCache"),"Hello"));

      Can someone tell me what is wrong with the code.