3 Replies Latest reply on Aug 6, 2009 9:56 AM by manik

    Where is the TreeCacheMBean class?

    drcallaway

      I'm trying to register JBoss Cache with the JBoss MBean server but I can't find the TreeCacheMBean class anywhere. I'm using JBoss Cache Core 3.1.0.GA. Does anyone know which JAR contains TreeCacheMBean? Also, is there a Maven repository that hosts this JAR file?

        • 1. Re: Where is the TreeCacheMBean class?
          snacker

          I think they removed it from the 3.1.0 cache api's.
          What we had to do was this:

          CacheFactory factory = new DefaultCacheFactory();
          Cache cache = factory.createCache("mycache-service.xml");
          MBeanServer server = MBeanServerLocator.locate();
          ObjectName on = new ObjectName( "jboss.cache:service=MyCache" );
          JmxRegistrationManager jmxManager = new JmxRegistrationManager(server, cache, on);
          jmxManager.registerAllMBeans();
          


          If it did exist I would expect it to be in either jbosscache-core.jar or jbosscache-pojo.jar, but I don't see it in either of those.

          (Don't take this as the final word though)


          • 2. Re: Where is the TreeCacheMBean class?
            snacker

            There is a TreeCacheViewMBean interface in the core jar, but I don't see a TreeCacheMBean in the jars:

            [jboss/server/all/lib] $ for x in *.jar ; do jar -tvf $x | egrep -i 'TreeCache.*?MBean' && ls -al $x && echo ; done
             505 Mon May 04 15:48:18 EDT 2009 org/jboss/cache/TreeCacheViewMBean.class
            -rwxrwxr-x 1 test test 1164437 May 22 16:38 jbosscache-core.jar
            


            • 3. Re: Where is the TreeCacheMBean class?
              manik

              TreeCacheMBean was deprecated in 2.x and removed in 3.x.

              Look for CacheJmxWrapperMBean instead.