[jboss-cvs] JBossAS SVN: r104608 - 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
Mon May 10 12:24:06 EDT 2010


Author: bstansberry at jboss.com
Date: 2010-05-10 12:24:05 -0400 (Mon, 10 May 2010)
New Revision: 104608

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:
Disable 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-10 12:33:23 UTC (rev 104607)
+++ 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-10 16:24:05 UTC (rev 104608)
@@ -553,29 +553,33 @@
                Fqn<String> ownerFqn = owner.getFqn();
                if (Util.isBuddyOwnerDead(ownerFqn))
                {
-                  Set<Object> ownerVersions = owner.getChildrenNames();                  
-                  for (Object ownerVersion : ownerVersions)
+//                  Set<Object> ownerVersions = owner.getChildrenNames();                  
+//                  for (Object ownerVersion : ownerVersions)
+//                  {
+//                     // 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 (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_.evictSubtree(bogus);
+//                     }
+//                  }
+                  for (Node<Object, Object> ownerVersion : owner.getChildren())
                   {
-                     // 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 (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_.evictSubtree(bogus);
-                     }
+                     storeSessionIdsForOwner(ownerVersion, webappFqn, result);
                   }
                }
                else
@@ -764,16 +768,16 @@
       for (Object child : buddies)
       {
          // FIXME -- remove this JBCACHE-1580 workaround
-         if (!(child instanceof Integer))
-         {
-            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_.evictSubtree(bogus);            
-         }
+//         if (!(child instanceof Integer))
+//         {
+//            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_.evictSubtree(bogus);            
+//         }
          result.add(Fqn.fromElements(BUDDY_BACKUP, deadBuddy, child, SESSION, contextHostPath, sessionId));
       }
       return result;




More information about the jboss-cvs-commits mailing list