[jboss-cvs] JBossAS SVN: r71100 - branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 20 16:21:49 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-03-20 16:21:49 -0400 (Thu, 20 Mar 2008)
New Revision: 71100

Modified:
   branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheWrapper.java
Log:
[JBPAPP-667] On undeploy use JBC remove() with local-only option to clean out sessions

Modified: branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheWrapper.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheWrapper.java	2008-03-20 20:14:54 UTC (rev 71099)
+++ branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheWrapper.java	2008-03-20 20:21:49 UTC (rev 71100)
@@ -26,9 +26,7 @@
 import org.jboss.cache.config.Option;
 import org.jboss.cache.lock.TimeoutException;
 
-import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
 
 public class JBossCacheWrapper 
 {
@@ -242,25 +240,11 @@
       {
          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);
-            }
-            return;
-            
+            // Just do a local-only remove
+            Option option = new Option();
+            option.setCacheModeLocal(true);
+            proxy_.remove(fqn, option);
+            return;            
          }
          catch (TimeoutException e)
          {
@@ -268,12 +252,10 @@
          }
          catch (Exception e)
          {
-            throw new RuntimeException("JBossCacheService: exception occurred in cache evict ... ", e);
+            throw new RuntimeException("JBossCacheService: exception occurred in cache evictSubtree ... ", e);
          }
       }
       throw new RuntimeException("JBossCacheService: exception occurred in cache evictSubtree after retry ... ", ex);
-      
-      
    }
 
 }




More information about the jboss-cvs-commits mailing list