[jboss-cvs] JBossAS SVN: r59573 - in trunk/testsuite/src/main/org/jboss/test: cluster/web and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 11 22:38:07 EST 2007


Author: bstansberry at jboss.com
Date: 2007-01-11 22:38:04 -0500 (Thu, 11 Jan 2007)
New Revision: 59573

Modified:
   trunk/testsuite/src/main/org/jboss/test/cache/bean/TreeCacheTesterBean.java
   trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java
   trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Address.java
   trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/AopBindingListener.java
   trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Person.java
Log:
Move to JBoss Cache Alpha2

Modified: trunk/testsuite/src/main/org/jboss/test/cache/bean/TreeCacheTesterBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cache/bean/TreeCacheTesterBean.java	2007-01-12 03:23:41 UTC (rev 59572)
+++ trunk/testsuite/src/main/org/jboss/test/cache/bean/TreeCacheTesterBean.java	2007-01-12 03:38:04 UTC (rev 59573)
@@ -25,7 +25,6 @@
 import org.jboss.cache.CacheException;
 import org.jboss.cache.Fqn;
 import org.jboss.cache.Node;
-import org.jboss.cache.TreeCache;
 import org.jboss.cache.config.Configuration;
 import org.jboss.cache.factories.DefaultCacheFactory;
 import org.jboss.cache.lock.IsolationLevel;
@@ -83,7 +82,7 @@
          config.setCacheMode(Configuration.legacyModeToCacheMode(caching_mode));
          config.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
          
-         cache = DefaultCacheFactory.createCache(config);
+         cache = DefaultCacheFactory.getInstance().createCache(config);
          
       } catch (Exception e) {
          throw new CreateException(e.toString());
@@ -177,7 +176,7 @@
     */
    public Set getKeys(String fqn) throws CacheException
    {
-      Node node = cache.getChild(Fqn.fromString(fqn));
+      Node node = cache.getRoot().getChild(Fqn.fromString(fqn));
       return node == null ? null : node.getKeys();
    }
 
@@ -198,7 +197,7 @@
     */
    public boolean exists(String fqn)
    {
-      return cache.hasChild(Fqn.fromString(fqn));
+      return cache.getRoot().hasChild(Fqn.fromString(fqn));
    }
 
    /**
@@ -209,7 +208,7 @@
     */
    public void put(String fqn, Map data) throws Exception
    {
-      cache.put(fqn, data);
+      cache.put(Fqn.fromString(fqn), data);
    }
 
    /**
@@ -232,7 +231,7 @@
     */
    public void remove(String fqn) throws Exception
    {
-      cache.remove(fqn);
+      cache.removeNode(Fqn.fromString(fqn));
    }
 
    /**
@@ -273,7 +272,7 @@
     */
    public Set getChildrenNames(String fqn) throws CacheException
    {
-      Node node = cache.getChild(Fqn.fromString(fqn));
+      Node node = cache.getRoot().getChild(Fqn.fromString(fqn));
       return (node == null ? null : node.getChildrenNames());
    }
 

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java	2007-01-12 03:23:41 UTC (rev 59572)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java	2007-01-12 03:38:04 UTC (rev 59573)
@@ -115,7 +115,7 @@
       Set result = new HashSet();
       
       Fqn fqn = Fqn.fromString(warFqn);
-      Node main = getCache().getChild(fqn);
+      Node main = getCache().getRoot().getChild(fqn);
       if (main != null)
       {
          result.addAll(main.getChildrenNames());
@@ -142,7 +142,7 @@
       Set result = new HashSet();
       
       Fqn fqn = Fqn.fromString("/SSO");
-      Node main = getCache().getChild(fqn);
+      Node main = getCache().getRoot().getChild(fqn);
       if (main != null)
       {
          result.addAll(main.getChildrenNames());
@@ -192,7 +192,7 @@
    private Set getBuddyBackupRoots()
    {
       Set buddies = null;
-      Node buddyRoot = getCache().getChild(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN);
+      Node buddyRoot = getCache().getRoot().getChild(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN);
       if (buddyRoot != null)
       {
          buddies = buddyRoot.getChildren();

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Address.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Address.java	2007-01-12 03:23:41 UTC (rev 59572)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Address.java	2007-01-12 03:38:04 UTC (rev 59573)
@@ -21,7 +21,7 @@
   */
 package org.jboss.test.cluster.web.aop;
 
-import org.jboss.cache.pojo.annotation.PojoCacheable;
+import org.jboss.cache.pojo.annotation.Replicable;
 
 
 
@@ -31,7 +31,7 @@
  *
  * @version $Revision$
  */
- at PojoCacheable
+ at Replicable
 public class Address
 {
    String street = null;

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/AopBindingListener.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/AopBindingListener.java	2007-01-12 03:23:41 UTC (rev 59572)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/AopBindingListener.java	2007-01-12 03:38:04 UTC (rev 59573)
@@ -22,7 +22,7 @@
 
 package org.jboss.test.cluster.web.aop;
 
-import org.jboss.cache.pojo.annotation.PojoCacheable;
+import org.jboss.cache.pojo.annotation.Replicable;
 import org.jboss.test.cluster.web.BindingListener;
 
 /**
@@ -32,7 +32,7 @@
  * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
  * @version $Revision$
  */
- at PojoCacheable
+ at Replicable
 public class AopBindingListener extends BindingListener
 {
 

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Person.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Person.java	2007-01-12 03:23:41 UTC (rev 59572)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/aop/Person.java	2007-01-12 03:38:04 UTC (rev 59573)
@@ -23,7 +23,7 @@
 
 import java.util.*;
 
-import org.jboss.cache.pojo.annotation.InstanceOfPojoCacheable;
+import org.jboss.cache.pojo.annotation.Replicable;
 
 
 /**
@@ -32,7 +32,7 @@
  *
  * @version $Revision$
  */
- at InstanceOfPojoCacheable
+ at Replicable
 public class Person
 {
    String name = null;




More information about the jboss-cvs-commits mailing list