[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...

Ben Wang bwang at jboss.com
Mon Sep 25 01:50:04 EDT 2006


  User: bwang   
  Date: 06/09/25 01:50:04

  Modified:    src/org/jboss/cache/interceptors      
                        ActivationInterceptor.java
                        CacheLoaderInterceptor.java
                        CacheStoreInterceptor.java
                        InvalidationInterceptor.java
                        PassivationInterceptor.java TxInterceptor.java
  Log:
  1. Modify useInterceptorMbeans to useMbean
  2. Added PojoCache jmx framework 
  3. added test
  
  Revision  Changes    Path
  1.38      +7 -7      JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ActivationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -b -r1.37 -r1.38
  --- ActivationInterceptor.java	22 Sep 2006 16:27:55 -0000	1.37
  +++ ActivationInterceptor.java	25 Sep 2006 05:50:04 -0000	1.38
  @@ -27,7 +27,7 @@
    * their attributes have been initialized and their children have been loaded in memory.
    *
    * @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
  - * @version $Id: ActivationInterceptor.java,v 1.37 2006/09/22 16:27:55 msurtani Exp $
  + * @version $Id: ActivationInterceptor.java,v 1.38 2006/09/25 05:50:04 bwang Exp $
    */
   public class ActivationInterceptor extends CacheLoaderInterceptor implements ActivationInterceptorMBean
   {
  @@ -80,7 +80,7 @@
                  if (hasModifications(args))
                  {
                     loader.commit(gtx);
  -                  if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +                  if (configuration.isUseMbean() && getStatisticsEnabled())
                     {
                        Integer acts = (Integer) m_txActivations.get(gtx);
                        if (acts != null)
  @@ -95,7 +95,7 @@
                  if (hasModifications(args))
                  {
                     loader.rollback(gtx);
  -                  if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +                  if (configuration.isUseMbean() && getStatisticsEnabled())
                     {
                        m_txActivations.remove(gtx);
                     }
  @@ -187,7 +187,7 @@
      {
         cache.getNotifier().notifyNodeActivated(fqn, true);
         loader.remove(fqn);
  -      if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +      if (configuration.isUseMbean() && getStatisticsEnabled())
         {
            m_activations++;
         }
  @@ -328,7 +328,7 @@
         if (cache_loader_modifications.size() > 0)
         {
            loader.prepare(gtx, cache_loader_modifications, false);
  -         if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled() && txActs > 0)
  +         if (configuration.isUseMbean() && getStatisticsEnabled() && txActs > 0)
            {
               m_txActivations.put(gtx, new Integer(txActs));
            }
  
  
  
  1.57      +2 -2      JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheLoaderInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -b -r1.56 -r1.57
  --- CacheLoaderInterceptor.java	22 Sep 2006 16:38:18 -0000	1.56
  +++ CacheLoaderInterceptor.java	25 Sep 2006 05:50:04 -0000	1.57
  @@ -32,7 +32,7 @@
    * Loads nodes that don't exist at the time of the call into memory from the CacheLoader
    *
    * @author Bela Ban
  - * @version $Id: CacheLoaderInterceptor.java,v 1.56 2006/09/22 16:38:18 msurtani Exp $
  + * @version $Id: CacheLoaderInterceptor.java,v 1.57 2006/09/25 05:50:04 bwang Exp $
    */
   public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
   {
  @@ -546,7 +546,7 @@
         boolean nodeExists = (nodeData != null);
         if (log.isTraceEnabled()) log.trace("nodeExists " + nodeExists);
   
  -      if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +      if (configuration.isUseMbean() && getStatisticsEnabled())
         {
            if (nodeExists)
            {
  
  
  
  1.35      +7 -7      JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheStoreInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -b -r1.34 -r1.35
  --- CacheStoreInterceptor.java	22 Sep 2006 17:04:49 -0000	1.34
  +++ CacheStoreInterceptor.java	25 Sep 2006 05:50:04 -0000	1.35
  @@ -26,7 +26,7 @@
    * through the CacheLoader, either after each method call (no TXs), or at TX commit.
    *
    * @author Bela Ban
  - * @version $Id: CacheStoreInterceptor.java,v 1.34 2006/09/22 17:04:49 msurtani Exp $
  + * @version $Id: CacheStoreInterceptor.java,v 1.35 2006/09/25 05:50:04 bwang Exp $
    */
   public class CacheStoreInterceptor extends BaseCacheLoaderInterceptor implements CacheStoreInterceptorMBean
   {
  @@ -102,7 +102,7 @@
                        releaseLoaderLocks(fqnsModified);
                        preparingTxs.remove(gtx);
                     }
  -                  if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +                  if (configuration.isUseMbean() && getStatisticsEnabled())
                     {
                        Integer puts = (Integer) m_txStores.get(gtx);
                        if (puts != null)
  @@ -126,7 +126,7 @@
                        preparingTxs.remove(gtx);
                        loader.rollback(gtx);
                     }
  -                  if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +                  if (configuration.isUseMbean() && getStatisticsEnabled())
                     {
                        m_txStores.remove(gtx);
                     }
  @@ -217,7 +217,7 @@
               {
                  releaseLoaderLock(fqn);
               }
  -            if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +            if (configuration.isUseMbean() && getStatisticsEnabled())
               {
                  m_cacheStores++;
               }
  @@ -236,7 +236,7 @@
               {
                  releaseLoaderLock(fqn);
               }
  -            if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +            if (configuration.isUseMbean() && getStatisticsEnabled())
               {
                  m_cacheStores++;
               }
  @@ -354,7 +354,7 @@
            MethodCall methodCall = (MethodCall) it.next();
            Modification mod = convertMethodCallToModification(methodCall);
            cache_loader_modifications.add(mod);
  -         if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +         if (configuration.isUseMbean() && getStatisticsEnabled())
            {
               if ((mod.getType() == Modification.ModificationType.PUT_DATA) ||
                   (mod.getType() == Modification.ModificationType.PUT_DATA_ERASE) ||
  @@ -372,7 +372,7 @@
         {
            loader.prepare(gtx, cache_loader_modifications, onePhase);
            preparingTxs.put(gtx, gtx);
  -         if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled() && txPuts > 0)
  +         if (configuration.isUseMbean() && getStatisticsEnabled() && txPuts > 0)
            {
               m_txStores.put(gtx, new Integer(txPuts));
            }
  
  
  
  1.27      +1 -1      JBossCache/src/org/jboss/cache/interceptors/InvalidationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InvalidationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/InvalidationInterceptor.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- InvalidationInterceptor.java	5 Sep 2006 18:09:56 -0000	1.26
  +++ InvalidationInterceptor.java	25 Sep 2006 05:50:04 -0000	1.27
  @@ -149,7 +149,7 @@
      protected void invalidateAcrossCluster(Fqn fqn, TransactionWorkspace workspace) throws Throwable
      {
         // increment invalidations counter if statistics maintained
  -      if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +      if (configuration.isUseMbean() && getStatisticsEnabled())
            m_invalidations++;
   
         // only propagate version details if we're using explicit versioning.
  
  
  
  1.29      +2 -2      JBossCache/src/org/jboss/cache/interceptors/PassivationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PassivationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/PassivationInterceptor.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- PassivationInterceptor.java	19 Sep 2006 13:52:33 -0000	1.28
  +++ PassivationInterceptor.java	25 Sep 2006 05:50:04 -0000	1.29
  @@ -18,7 +18,7 @@
    * CacheLoader, either before each method call (no TXs), or at TX commit.
    *
    * @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
  - * @version $Id: PassivationInterceptor.java,v 1.28 2006/09/19 13:52:33 msurtani Exp $
  + * @version $Id: PassivationInterceptor.java,v 1.29 2006/09/25 05:50:04 bwang Exp $
    */
   public class PassivationInterceptor extends Interceptor implements PassivationInterceptorMBean
   {
  @@ -67,7 +67,7 @@
               cache.getNotifier().notifyNodePassivated(fqn, false);
               loader.put(fqn, attributes);
            }
  -         if (getStatisticsEnabled() && configuration.isUseInterceptorMbeans())
  +         if (getStatisticsEnabled() && configuration.isUseMbean())
            {
               m_passivations.increment();
            }
  
  
  
  1.61      +3 -3      JBossCache/src/org/jboss/cache/interceptors/TxInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TxInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/TxInterceptor.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -b -r1.60 -r1.61
  --- TxInterceptor.java	6 Sep 2006 17:58:20 -0000	1.60
  +++ TxInterceptor.java	25 Sep 2006 05:50:04 -0000	1.61
  @@ -95,7 +95,7 @@
                     {
                        result = handleRemotePrepare(m, ctx.getGlobalTransaction());
                        scrubTxsOnExit = true;
  -                     if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +                     if (configuration.isUseMbean() && getStatisticsEnabled())
                           m_prepares++;
                     }
                     else
  @@ -525,13 +525,13 @@
            if (m.getMethodId() == MethodDeclarations.commitMethod_id)
            {
               txManager.commit();
  -            if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +            if (configuration.isUseMbean() && getStatisticsEnabled())
                  m_commits++;
            }
            else
            {
               txManager.rollback();
  -            if (configuration.isUseInterceptorMbeans() && getStatisticsEnabled())
  +            if (configuration.isUseMbean() && getStatisticsEnabled())
                  m_rollbacks++;
            }
         }
  
  
  



More information about the jboss-cvs-commits mailing list