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

Brian Stansberry brian.stansberry at jboss.com
Thu Nov 9 22:47:47 EST 2006


  User: bstansberry
  Date: 06/11/09 22:47:47

  Modified:    tests-50/functional/org/jboss/cache/pojo/jmx  MBeanTest.java
  Log:
  Rename config property used to control CacheMgmtInterceptor
  Initial tweak of the test to reflect use of PojoCacheJmxWrapper
  
  Revision  Changes    Path
  1.4       +7 -2      JBossCache/tests-50/functional/org/jboss/cache/pojo/jmx/MBeanTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MBeanTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/jmx/MBeanTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- MBeanTest.java	31 Oct 2006 11:07:18 -0000	1.3
  +++ MBeanTest.java	10 Nov 2006 03:47:47 -0000	1.4
  @@ -9,6 +9,7 @@
   
   import junit.framework.TestCase;
   import org.jboss.cache.pojo.jmx.JmxUtil;
  +import org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper;
   import org.jboss.cache.pojo.PojoCacheFactory;
   import org.jboss.cache.config.Configuration;
   
  @@ -29,13 +30,13 @@
      private ObjectName mBeanName;
      private String mBeanNameStr;
   
  -   protected void setUp() throws MalformedObjectNameException
  +   protected void setUp() throws Exception
      {
         mBeanServer = MBeanServerFactory.createMBeanServer("CacheMBeanTest");
   
         Configuration c = new Configuration();
         c.setClusterName("PojoCacheMBeanTest");
  -      c.setUseMbean(true);
  +      c.setExposeManagementStatistics(true);
         c.setCacheMode(Configuration.CacheMode.LOCAL);
         boolean toStart = false;
         cache = PojoCacheFactory.createCache(c, toStart);
  @@ -43,6 +44,10 @@
   
         mBeanNameStr = JmxUtil.getPojoCacheObjectName(cache);
         mBeanName = new ObjectName(mBeanNameStr);
  +      PojoCacheJmxWrapper wrapper = new PojoCacheJmxWrapper(cache);
  +      mBeanServer.registerMBean(wrapper, mBeanName);
  +      wrapper.create();
  +      wrapper.start();
      }
   
      protected void tearDown()
  
  
  



More information about the jboss-cvs-commits mailing list