1 Reply Latest reply on Mar 17, 2009 7:13 AM by manik

    CacheJmxWrapperMBean is deprecated, but the documentation st


      We have this code based on what's in the documentation, in order to get our cache (deployed using the jmx microcontainer) and return it to our application code:

      final MBeanServer server = MBeanServerLocator.locateJBoss();
      final ObjectName objectName = new ObjectName(sCacheName);
      final CacheJmxWrapperMBean<String, Object> cacheWrapper =
      (CacheJmxWrapperMBean<String, Object>)
      server, objectName, CacheJmxWrapperMBean.class, true);
      sCache = cacheWrapper.getCache();
      return sCache;

      But CacheJmxWrapperMBean is deprecated.

      What's the correct way to get the cache now?