[jboss-cvs] JBossAS SVN: r65656 - branches/JBoss_4_0_5_GA_CP/tomcat/src/main/org/jboss/web/tomcat/tc5/session.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 27 06:25:54 EDT 2007


Author: jiwils
Date: 2007-09-27 06:25:53 -0400 (Thu, 27 Sep 2007)
New Revision: 65656

Modified:
   branches/JBoss_4_0_5_GA_CP/tomcat/src/main/org/jboss/web/tomcat/tc5/session/JBossCacheWrapper.java
Log:
Fix for [ASPATCH-280].  Shutdown now uses a local remove instead of eviction when removing nodes from the cache on shutdown.

Modified: branches/JBoss_4_0_5_GA_CP/tomcat/src/main/org/jboss/web/tomcat/tc5/session/JBossCacheWrapper.java
===================================================================
--- branches/JBoss_4_0_5_GA_CP/tomcat/src/main/org/jboss/web/tomcat/tc5/session/JBossCacheWrapper.java	2007-09-27 10:24:39 UTC (rev 65655)
+++ branches/JBoss_4_0_5_GA_CP/tomcat/src/main/org/jboss/web/tomcat/tc5/session/JBossCacheWrapper.java	2007-09-27 10:25:53 UTC (rev 65656)
@@ -30,7 +30,7 @@
 import java.util.Map;
 import java.util.Set;
 
-public class JBossCacheWrapper 
+public class JBossCacheWrapper
 {
    static final Option GRAVITATE_OPTION = new Option();
 
@@ -38,7 +38,7 @@
    {
       GRAVITATE_OPTION.setForceDataGravitation(true);
    }
-         
+
    private static final int RETRY = 3;
    private PojoCacheMBean proxy_;
 
@@ -234,34 +234,21 @@
       }
       throw new RuntimeException("JBossCacheService: exception occurred in cache evict after retry ... ", ex);
    }
-   
+
    void evictSubtree(Fqn fqn)
    {
-      
+
       Exception ex = null;
       for (int i = 0; i < RETRY; i++)
       {
          try
          {
-            // Evict the node itself first, since if it stores a Pojo
-            // that will do everything
-            proxy_.evict(fqn);
-            
-            // next do a depth first removal; this ensure all nodes
-            // are removed, not just their data map
-            Set children = proxy_.getChildrenNames(fqn);
-            if (children != null)
-            {
-               for (Iterator it = children.iterator(); it.hasNext(); )
-               {
-                  Fqn child = new Fqn(fqn, it.next());
-                  proxy_.evict(child);
-               }
-               
-               proxy_.evict(fqn);
-            }
+            // Test fix for JBAS-4611.  Using proxy_.remove with a local option instead of
+            // proxy_.evict.
+            Option option = new Option();
+            option.setCacheModeLocal(true);
+            proxy_.remove(fqn, option);
             return;
-            
          }
          catch (TimeoutException e)
          {
@@ -273,8 +260,8 @@
          }
       }
       throw new RuntimeException("JBossCacheService: exception occurred in cache evictSubtree after retry ... ", ex);
-      
-      
+
+
    }
 
 }




More information about the jboss-cvs-commits mailing list