[jboss-cvs] JBossAS SVN: r104588 - projects/cluster/ha-server-cache-jbc/branches/Branch_2_0/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat May 8 16:13:06 EDT 2010


Author: bstansberry at jboss.com
Date: 2010-05-08 16:13:05 -0400 (Sat, 08 May 2010)
New Revision: 104588

Modified:
   projects/cluster/ha-server-cache-jbc/branches/Branch_2_0/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java
Log:
[JBCLUSTER-269] Include JBCACHE-1580 workaround

Modified: projects/cluster/ha-server-cache-jbc/branches/Branch_2_0/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/branches/Branch_2_0/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java	2010-05-08 13:59:18 UTC (rev 104587)
+++ projects/cluster/ha-server-cache-jbc/branches/Branch_2_0/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java	2010-05-08 20:13:05 UTC (rev 104588)
@@ -558,22 +558,24 @@
                   {
                      // If we pulled node from FileCacheLoader, the type will
                      // be String, which is incorrect
+                     // FIXME -- remove this JBCACHE-1580 workaround
                      boolean correctType = ownerVersion instanceof Integer;
                      
                      Integer versionInt = correctType ? 
                            (Integer) ownerVersion : Integer.valueOf(ownerVersion.toString());
+                     
                      Node<Object, Object> versionNode = owner.getChild(versionInt);
                      
+                     storeSessionIdsForOwner(versionNode, webappFqn, result);
+                           
                      if (!correctType)
-                     {
-                        // We loaded a node with a bogus name type from FileCacheLoader.
+                     {                        
+                        // We loaded a node with a bogus name type (i.e. String) from FileCacheLoader.
                         // We need to evict it or it will screw up JBC code that assumes
                         // all names at this point in the tree are Integer
                         Fqn<Object> bogus = Fqn.fromRelativeElements(ownerFqn, ownerVersion);
-                        this.cacheWrapper_.removeLocal(bogus);
+                        this.cacheWrapper_.evictSubtree(bogus);
                      }
-                     
-                     storeSessionIdsForOwner(versionNode, webappFqn, result);
                   }
                }
                else
@@ -761,16 +763,16 @@
       Set<Object> buddies = plainCache_.getChildrenNames(dead); // won't return null
       for (Object child : buddies)
       {
+         // FIXME -- remove this JBCACHE-1580 workaround
          if (!(child instanceof Integer))
          {
-            log_.warn("Found child of type " + child.getClass() + " under fqn " + dead, new Exception("Just a stack trace"));
             Object orig = child;
             child = Integer.valueOf(orig.toString());
             // In case we loaded a node with a bogus name type from FileCacheLoader
             // we need to evict it or it will screw up JBC code that assumes
             // all names at this point in the tree are Integer
             Fqn<Object> bogus = Fqn.fromElements(BUDDY_BACKUP, deadBuddy, orig);
-            this.cacheWrapper_.removeLocal(bogus);            
+            this.cacheWrapper_.evictSubtree(bogus);            
          }
          result.add(Fqn.fromElements(BUDDY_BACKUP, deadBuddy, child, SESSION, contextHostPath, sessionId));
       }




More information about the jboss-cvs-commits mailing list