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

Manik Surtani msurtani at jboss.com
Thu Jan 4 11:17:38 EST 2007


  User: msurtani
  Date: 07/01/04 11:17:38

  Modified:    tests/functional/org/jboss/cache/mgmt  NotificationTest.java
  Log:
  Updated JMX interfaces
  
  Revision  Changes    Path
  1.16      +57 -3     JBossCache/tests/functional/org/jboss/cache/mgmt/NotificationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NotificationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/mgmt/NotificationTest.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- NotificationTest.java	30 Dec 2006 17:49:57 -0000	1.15
  +++ NotificationTest.java	4 Jan 2007 16:17:38 -0000	1.16
  @@ -7,7 +7,7 @@
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.interceptors.CacheMgmtInterceptor;
  -import org.jboss.cache.jmx.Cache;
  +import org.jboss.cache.jmx.CacheJmxWrapper;
   import org.jboss.cache.jmx.JmxUtil;
   import org.jboss.cache.loader.CacheLoader;
   import org.jboss.cache.xml.XmlHelper;
  @@ -24,7 +24,7 @@
    * Functional tests for CacheMgmtInterceptor broadcast of cache event notifications
    *
    * @author Jerry Gauthier
  - * @version $Id: NotificationTest.java,v 1.15 2006/12/30 17:49:57 msurtani Exp $
  + * @version $Id: NotificationTest.java,v 1.16 2007/01/04 16:17:38 msurtani Exp $
    */
   public class NotificationTest extends TestCase
   {
  @@ -68,7 +68,7 @@
         cache = createCache(CLUSTER_NAME);
         // bind manually for now.
         ObjectName mgmt = new ObjectName(JmxUtil.PREFIX + cache.getConfiguration().getClusterName() + MGMT_SERVICE);
  -      Cache cacheMBean = new Cache(cache);
  +      CacheJmxWrapper cacheMBean = new CacheJmxWrapper(cache);
   
         m_server.registerMBean(cacheMBean, mgmt);
      }
  @@ -216,52 +216,106 @@
            Object userData = notification.getUserData();
   
            if (type.equals(CacheMgmtInterceptor.NOTIF_CACHE_STARTED))
  +         {
               m_cacheStarted = true;
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_CACHE_STOPPED))
  +         {
               m_cacheStopped = true;
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_CREATED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodeCreatedPre = true;
  +            }
               else
  +            {
                  m_nodeCreatedPost = true;
  +            }
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_EVICTED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodeEvictedPre = true;
  +            }
               else
  +            {
                  m_nodeEvictedPost = true;
  +            }
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_LOADED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodeLoadedPre = true;
  +            }
               else
  +            {
                  m_nodeLoadedPost = true;
  +            }
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_REMOVED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodeRemovedPre = true;
  +            }
               else
  +            {
                  m_nodeRemovedPost = true;
  +            }
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_VISITED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodeVisitedPre = true;
  +            }
               else
  +            {
                  m_nodeVisitedPost = true;
  +            }
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_VIEW_CHANGED))
  +         {
               m_viewChange = true;
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_ACTIVATED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodeActivatedPre = true;
  +            }
               else
  +            {
                  m_nodeActivatedPost = true;
  +            }
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_MODIFIED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodeModifiedPre = true;
  +            }
               else
  +            {
                  m_nodeModifiedPost = true;
  +            }
  +         }
            else if (type.equals(CacheMgmtInterceptor.NOTIF_NODE_PASSIVATED))
  +         {
               if (getPre(userData))
  +            {
                  m_nodePassivatedPre = true;
  +            }
               else
  +            {
                  m_nodePassivatedPost = true;
         }
      }
  +      }
  +   }
   
   }
  
  
  



More information about the jboss-cvs-commits mailing list