[jboss-cvs] JBossAS SVN: r59567 - in trunk/tomcat/src/main/org/jboss/web/tomcat/tc6: sso and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 11 21:39:27 EST 2007


Author: bstansberry at jboss.com
Date: 2007-01-11 21:39:24 -0500 (Thu, 11 Jan 2007)
New Revision: 59567

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/CacheListener.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheService.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheWrapper.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/sso/TreeCacheSSOClusterManager.java
Log:
Move to JBoss Cache Alpha2

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/CacheListener.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/CacheListener.java	2007-01-12 02:38:46 UTC (rev 59566)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/CacheListener.java	2007-01-12 02:39:24 UTC (rev 59567)
@@ -25,8 +25,8 @@
 
 import org.jboss.cache.CacheSPI;
 import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
 import org.jboss.cache.AbstractCacheListener;
+import org.jboss.cache.CacheListener.ModificationType;
 import org.jboss.cache.buddyreplication.BuddyManager;
 import org.jboss.logging.Logger;
 import org.jgroups.View;
@@ -106,7 +106,7 @@
    }
    
    @Override
-   public void nodeModified(Fqn fqn, boolean pre, boolean isLocal, Map data)
+   public void nodeModified(Fqn fqn, boolean pre, boolean isLocal, ModificationType type, Map data)
    {
       if (pre || isLocal)
          return;
@@ -138,7 +138,8 @@
       // Query if we have version value in the distributed cache. 
       // If we have a version value, compare the version and invalidate if necessary.
       // TODO get the key from the passed in data map!!
-      Integer version = (Integer)cacheWrapper_.get(fqn, JBossCacheService.VERSION_KEY);
+//      Integer version = (Integer)cacheWrapper_.get(fqn, JBossCacheService.VERSION_KEY);
+      Integer version = (Integer)data.get(JBossCacheService.VERSION_KEY);
       if(version != null)
       {
          String realId = getIdFromFqn(fqn, isBuddy);
@@ -176,7 +177,7 @@
       }
       else
       {
-         log_.warn("No VERSION_KEY attribute found in " + fqn);
+//         log_.warn("No VERSION_KEY attribute found in " + fqn);
       }
    }
 

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheService.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheService.java	2007-01-12 02:38:46 UTC (rev 59566)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheService.java	2007-01-12 02:39:24 UTC (rev 59567)
@@ -188,7 +188,7 @@
       }
 
       // We require the cache tm to be BatchModeTransactionManager now.
-      tm = plainCache_.getTransactionManager();
+      tm = plainCache_.getConfiguration().getRuntimeConfig().getTransactionManager();
       if( ! (tm instanceof BatchModeTransactionManager) )
       {
          throw new RuntimeException("JBossCacheService.start(): JBossCacheAop transaction manager is not of type BatchModeTransactionManager." +
@@ -401,7 +401,7 @@
    public boolean exists(String realId)
    {
       Fqn fqn = getSessionFqn(realId);
-      return plainCache_.hasChild(fqn);
+      return plainCache_.getRoot().hasChild(fqn);
    }
 
    public Object getAttribute(String realId, String key)
@@ -468,7 +468,7 @@
       Fqn fqn = getAttributeFqn(realId);
       try
       {
-         Node node = plainCache_.getChild(fqn);
+         Node node = plainCache_.getRoot().getChild(fqn);
          if (node != null)
             keys = node.getKeys();
       }
@@ -517,7 +517,7 @@
    {
       Map result = new HashMap();
       
-      Node bbRoot = plainCache_.getChild(BUDDY_BACKUP_FQN);
+      Node bbRoot = plainCache_.getRoot().getChild(BUDDY_BACKUP_FQN);
       if (bbRoot != null)
       {
          Set owners = bbRoot.getChildren();
@@ -543,7 +543,7 @@
    
    private Set getChildrenNames(Fqn fqn)
    {
-      Node node = plainCache_.getChild(fqn);
+      Node node = plainCache_.getRoot().getChild(fqn);
       return (node == null ? null : node.getChildrenNames());
    }
 

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheWrapper.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheWrapper.java	2007-01-12 02:38:46 UTC (rev 59566)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheWrapper.java	2007-01-12 02:39:24 UTC (rev 59567)
@@ -348,7 +348,7 @@
             
             // next do a depth first removal; this ensures all nodes
             // are removed, not just their data map
-            Node base = plainCache_.getChild(fqn);
+            Node base = plainCache_.getRoot().getChild(fqn);
             if (base != null)
             {
                Set children = base.getChildren();

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/sso/TreeCacheSSOClusterManager.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/sso/TreeCacheSSOClusterManager.java	2007-01-12 02:38:46 UTC (rev 59566)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/sso/TreeCacheSSOClusterManager.java	2007-01-12 02:39:24 UTC (rev 59567)
@@ -905,7 +905,7 @@
     */
    private void configureFromCache() throws Exception
    {  
-      tm = cache.getTransactionManager();
+      tm = cache.getConfiguration().getRuntimeConfig().getTransactionManager();
 
       if (tm == null) 
       {
@@ -1094,7 +1094,7 @@
       try
       {
          ctx.setOptionOverrides(GRAVITATE_OPTION);
-         cache.remove(fqn);
+         cache.removeNode(fqn);
       }
       finally
       {




More information about the jboss-cvs-commits mailing list