[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/jmx ...

Manik Surtani msurtani at jboss.com
Thu Nov 16 09:51:49 EST 2006


  User: msurtani
  Date: 06/11/16 09:51:49

  Modified:    tests/functional/org/jboss/cache/jmx  CacheMBeanTest.java
  Log:
  More JMX crapola
  
  Revision  Changes    Path
  1.6       +5 -2      JBossCache/tests/functional/org/jboss/cache/jmx/CacheMBeanTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheMBeanTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/jmx/CacheMBeanTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- CacheMBeanTest.java	10 Nov 2006 02:48:46 -0000	1.5
  +++ CacheMBeanTest.java	16 Nov 2006 14:51:49 -0000	1.6
  @@ -2,13 +2,13 @@
   
   import junit.framework.TestCase;
   import org.jboss.cache.Cache;
  +import org.jboss.cache.CacheSPI;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.factories.DefaultCacheFactory;
   
   import javax.management.MBeanServer;
   import javax.management.MBeanServerFactory;
  -import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
   
   /**
  @@ -23,7 +23,7 @@
      private ObjectName mBeanName;
      private String mBeanNameStr;
   
  -   protected void setUp() throws MalformedObjectNameException
  +   protected void setUp() throws Exception
      {
         mBeanServer = MBeanServerFactory.createMBeanServer("CacheMBeanTest");
   
  @@ -34,6 +34,9 @@
         cache = DefaultCacheFactory.createCache(c);
         mBeanNameStr = JmxUtil.PREFIX + cache.getConfiguration().getClusterName();
         mBeanName = new ObjectName(mBeanNameStr);
  +
  +      JmxUtil.registerCacheMBean(mBeanServer, new org.jboss.cache.jmx.Cache((CacheSPI) cache), mBeanNameStr);
  +      JmxUtil.registerInterceptors(mBeanServer, ((CacheSPI)cache).getInterceptorChain(), mBeanNameStr);
      }
   
      protected void tearDown()
  
  
  



More information about the jboss-cvs-commits mailing list