[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/optimistic ...

Manik Surtani msurtani at jboss.com
Sat Dec 30 12:49:52 EST 2006


  User: msurtani
  Date: 06/12/30 12:49:52

  Modified:    tests/functional/org/jboss/cache/optimistic                              
                        AsyncCacheTest.java ThreadedCacheAccessTest.java
                        OptimisticCreateIfNotExistsInterceptorTest.java
                        NodeInterceptorKeyValTest.java
                        NodeInterceptorPutMapTest.java
                        NodeInterceptorGetChildrenNamesTest.java
                        OptimisticWithCacheLoaderTest.java
                        OptimisticVersioningTest.java
                        NodeInterceptorRemoveNodeTest.java
                        TxInterceptorTest.java
                        NodeInterceptorGetKeyValTest.java
                        NodeInterceptorPutEraseTest.java
                        ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
                        VersioningOnReadTest.java
                        ValidatorInterceptorTest.java
                        ValidationFailureTest.java CacheTest.java
                        OptimisticWithPassivationTest.java
                        FullStackInterceptorTest.java
                        OpLockingInterceptorTest.java
                        AbstractOptimisticTestCase.java
                        NodeInterceptorRemoveKeyValTest.java
                        NodeInterceptorTransactionTest.java
                        AsyncFullStackInterceptorTest.java
                        OptimisticReplicationInterceptorTest.java
                        RemoveBeforeCreateTest.java
                        ConcurrentTransactionTest.java
                        NodeInterceptorRemoveDataTest.java
                        NodeInterceptorGetKeysTest.java
                        MockInterceptor.java
  Log:
  Major changes to restructure cache and node object model
  
  Revision  Changes    Path
  1.7       +2 -2      JBossCache/tests/functional/org/jboss/cache/optimistic/AsyncCacheTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AsyncCacheTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/AsyncCacheTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- AsyncCacheTest.java	30 Aug 2006 21:05:16 -0000	1.6
  +++ AsyncCacheTest.java	30 Dec 2006 17:49:52 -0000	1.7
  @@ -4,10 +4,10 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.loader.SamplePojo;
   import org.jboss.cache.misc.TestingUtil;
  @@ -18,7 +18,7 @@
   public class AsyncCacheTest extends AbstractOptimisticTestCase
   {
   
  -   TreeCache cache, cache2;
  +   CacheImpl cache, cache2;
   
      protected void setUp() throws Exception
      {
  
  
  
  1.5       +3 -3      JBossCache/tests/functional/org/jboss/cache/optimistic/ThreadedCacheAccessTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ThreadedCacheAccessTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ThreadedCacheAccessTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ThreadedCacheAccessTest.java	30 Aug 2006 21:05:16 -0000	1.4
  +++ ThreadedCacheAccessTest.java	30 Dec 2006 17:49:52 -0000	1.5
  @@ -9,8 +9,8 @@
   import junit.framework.Assert;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.TreeCache;
   
   import javax.transaction.TransactionManager;
   
  @@ -34,7 +34,7 @@
      private final Fqn fqn = Fqn.fromString("/a/b");
      private final String key = "key", value = "value";
   
  -   private TreeCache cache;
  +   private CacheImpl cache;
      private WorkerThread[] threads;
   
      public ThreadedCacheAccessTest(String name)
  @@ -55,7 +55,7 @@
   
         cache.put(fqn, key, value);
   
  -      threads = new WorkerThread[ numThreads ];
  +      threads = new WorkerThread[numThreads];
   
         for (int i = 0; i < numThreads; i++)
         {
  
  
  
  1.13      +11 -11    JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticCreateIfNotExistsInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- OptimisticCreateIfNotExistsInterceptorTest.java	20 Sep 2006 16:28:58 -0000	1.12
  +++ OptimisticCreateIfNotExistsInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.13
  @@ -6,11 +6,11 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.loader.SamplePojo;
  @@ -41,7 +41,7 @@
         super(name);
      }
   
  -   protected void setupTransactionsInInvocationCtx(TreeCache cache) throws Exception
  +   protected void setupTransactionsInInvocationCtx(CacheImpl cache) throws Exception
      {
         txManager = DummyTransactionManager.getInstance();
         // start a tx
  @@ -65,12 +65,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(dummy);
   
  @@ -101,12 +101,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(dummy);
   
  @@ -152,12 +152,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
         interceptor.setNext(dummy);
   
         cache.setInterceptorChain(interceptor);
  
  
  
  1.12      +21 -21    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorKeyValTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- NodeInterceptorKeyValTest.java	6 Sep 2006 15:30:58 -0000	1.11
  +++ NodeInterceptorKeyValTest.java	30 Dec 2006 17:49:52 -0000	1.12
  @@ -1,10 +1,10 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -32,14 +32,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -85,14 +85,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -142,14 +142,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -198,14 +198,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -256,14 +256,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  
  
  
  1.11      +13 -13    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorPutMapTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- NodeInterceptorPutMapTest.java	6 Sep 2006 15:30:58 -0000	1.10
  +++ NodeInterceptorPutMapTest.java	30 Dec 2006 17:49:52 -0000	1.11
  @@ -1,10 +1,10 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -34,14 +34,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
   
         interceptor.setNext(nodeInterceptor);
  @@ -91,14 +91,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -150,14 +150,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  
  
  
  1.11      +14 -14    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorGetChildrenNamesTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- NodeInterceptorGetChildrenNamesTest.java	6 Sep 2006 15:30:58 -0000	1.10
  +++ NodeInterceptorGetChildrenNamesTest.java	30 Dec 2006 17:49:52 -0000	1.11
  @@ -1,10 +1,10 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -34,14 +34,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -104,14 +104,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -155,14 +155,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -202,7 +202,7 @@
   
         //assert the removal has had no effect
         assertEquals(1, cache.getChildrenNames("/one").size());
  -      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  +      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild(new Fqn("two")));
   
         mgr.commit();
   
  
  
  
  1.14      +9 -9      JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticWithCacheLoaderTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticWithCacheLoaderTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticWithCacheLoaderTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- OptimisticWithCacheLoaderTest.java	30 Aug 2006 20:28:50 -0000	1.13
  +++ OptimisticWithCacheLoaderTest.java	30 Dec 2006 17:49:52 -0000	1.14
  @@ -7,7 +7,7 @@
   package org.jboss.cache.optimistic;
   
   import junit.framework.Assert;
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.loader.CacheLoader;
   import org.jboss.cache.transaction.DummyTransactionManager;
   
  @@ -29,7 +29,7 @@
   
      public void testLoaderIndependently() throws Exception
      {
  -      TreeCache cache = createCacheWithLoader();
  +      CacheImpl cache = createCacheWithLoader();
         CacheLoader loader = cache.getCacheLoader();
   
         // test the cache loader independently first ...
  @@ -47,7 +47,7 @@
         CacheLoader loader = null;
         try
         {
  -         TreeCache cache = createCacheWithLoader();
  +         CacheImpl cache = createCacheWithLoader();
            loader = cache.getCacheLoader();
   
            DummyTransactionManager mgr = DummyTransactionManager.getInstance();
  @@ -84,7 +84,7 @@
      public void testCacheStoring() throws Exception
      {
         Transaction tx;
  -      TreeCache cache = createCacheWithLoader();
  +      CacheImpl cache = createCacheWithLoader();
         CacheLoader loader = cache.getCacheLoader();
   
         // test the cache ...
  @@ -130,7 +130,7 @@
   
      public void testCacheLoading() throws Exception
      {
  -      TreeCache cache = createCacheWithLoader();
  +      CacheImpl cache = createCacheWithLoader();
         CacheLoader loader = cache.getCacheLoader();
   
         Assert.assertNull(cache.get(fqn, key));
  @@ -151,10 +151,10 @@
   
      public void testCacheLoadingWithReplication() throws Exception
      {
  -      TreeCache cache1 = createReplicatedCacheWithLoader(false);
  +      CacheImpl cache1 = createReplicatedCacheWithLoader(false);
         CacheLoader loader1 = cache1.getCacheLoader();
   
  -      TreeCache cache2 = createReplicatedCacheWithLoader(false);
  +      CacheImpl cache2 = createReplicatedCacheWithLoader(false);
         CacheLoader loader2 = cache2.getCacheLoader();
   
         // test the cache ...
  @@ -203,10 +203,10 @@
   
      public void testSharedCacheLoadingWithReplication() throws Exception
      {
  -      TreeCache cache1 = createReplicatedCacheWithLoader(true);
  +      CacheImpl cache1 = createReplicatedCacheWithLoader(true);
         CacheLoader loader1 = cache1.getCacheLoader();
   
  -      TreeCache cache2 = createReplicatedCacheWithLoader(true);
  +      CacheImpl cache2 = createReplicatedCacheWithLoader(true);
         CacheLoader loader2 = cache2.getCacheLoader();
   
         // test the cache ...
  
  
  
  1.6       +11 -11    JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticVersioningTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticVersioningTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticVersioningTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- OptimisticVersioningTest.java	30 Aug 2006 21:05:16 -0000	1.5
  +++ OptimisticVersioningTest.java	30 Dec 2006 17:49:52 -0000	1.6
  @@ -7,9 +7,9 @@
   package org.jboss.cache.optimistic;
   
   import junit.framework.Assert;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.OptimisticTreeNode;
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.NodeSPI;
   import org.jboss.cache.config.Configuration;
   
   import javax.transaction.RollbackException;
  @@ -23,7 +23,7 @@
    */
   public class OptimisticVersioningTest extends AbstractOptimisticTestCase
   {
  -   TreeCache cache1, cache2;
  +   CacheImpl cache1, cache2;
   
      public OptimisticVersioningTest(String name)
      {
  @@ -52,8 +52,8 @@
   
         cache1.put(fqn, key, "value");
   
  -      DataVersion v1 = ((OptimisticTreeNode) cache1.get(fqn)).getVersion();
  -      DataVersion v2 = ((OptimisticTreeNode) cache2.get(fqn)).getVersion();
  +      DataVersion v1 = ((NodeSPI) cache1.get(fqn)).getVersion();
  +      DataVersion v2 = ((NodeSPI) cache2.get(fqn)).getVersion();
   
         Assert.assertEquals("value", cache1.get(fqn, key));
         Assert.assertEquals("value", cache2.get(fqn, key));
  @@ -62,8 +62,8 @@
         // change stuff in the node again...
         cache1.put(fqn, key, "value2");
   
  -      v1 = ((OptimisticTreeNode) cache1.get(fqn)).getVersion();
  -      v2 = ((OptimisticTreeNode) cache2.get(fqn)).getVersion();
  +      v1 = ((NodeSPI) cache1.get(fqn)).getVersion();
  +      v2 = ((NodeSPI) cache2.get(fqn)).getVersion();
   
         Assert.assertEquals("value2", cache1.get(fqn, key));
         Assert.assertEquals("value2", cache2.get(fqn, key));
  @@ -81,8 +81,8 @@
   
         cache1.put(fqn, key, "value");
   
  -      DataVersion v1 = ((OptimisticTreeNode) cache1.get(fqn)).getVersion();
  -      DataVersion v2 = ((OptimisticTreeNode) cache2.get(fqn)).getVersion();
  +      DataVersion v1 = ((NodeSPI) cache1.get(fqn)).getVersion();
  +      DataVersion v2 = ((NodeSPI) cache2.get(fqn)).getVersion();
   
         Assert.assertEquals("value", cache1.get(fqn, key));
         Assert.assertEquals("value", cache2.get(fqn, key));
  @@ -115,8 +115,8 @@
         }
   
         // data versions should be in sync.
  -      v1 = ((OptimisticTreeNode) cache1.get(fqn)).getVersion();
  -      v2 = ((OptimisticTreeNode) cache2.get(fqn)).getVersion();
  +      v1 = ((NodeSPI) cache1.get(fqn)).getVersion();
  +      v2 = ((NodeSPI) cache2.get(fqn)).getVersion();
   
         Assert.assertEquals("Version info should have propagated", v1, v2);
      }
  
  
  
  1.14      +43 -44    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorRemoveNodeTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- NodeInterceptorRemoveNodeTest.java	20 Nov 2006 03:53:56 -0000	1.13
  +++ NodeInterceptorRemoveNodeTest.java	30 Dec 2006 17:49:52 -0000	1.14
  @@ -6,13 +6,12 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.Node;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
  -import org.jboss.cache.TreeNode;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -43,14 +42,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -94,14 +93,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -155,14 +154,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -203,7 +202,7 @@
         assertNotNull(workspace.getNode(Fqn.fromString("/one")));
         assertEquals(true, workspace.getNode(Fqn.fromString("/one")).isDeleted());
         assertEquals(1, workspace.getNode(Fqn.fromString("/one")).getMergedChildren().size());
  -      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  +      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
         assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild(Fqn.fromString("/one")));
         assertTrue(entry.getLocks().isEmpty());
         assertEquals(2, entry.getModifications().size());
  @@ -216,14 +215,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -264,8 +263,8 @@
         assertEquals(true, workspace.getNode(Fqn.fromString("/one")).isDeleted());
   
         //will still have alink from one to two
  -      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  -      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild("one"));
  +      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
  +      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild(Fqn.fromString("one")));
   
         //now put /one/two back in
         cache.remove("/one");
  @@ -277,8 +276,8 @@
         assertEquals(true, workspace.getNode(Fqn.fromString("/one")).isDeleted());
   
         //will still have alink from one to two
  -      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  -      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild("one"));
  +      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
  +      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild(Fqn.fromString("one")));
   
         assertEquals(null, dummy.getCalled());
   
  @@ -300,14 +299,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -348,8 +347,8 @@
         assertEquals(true, workspace.getNode(Fqn.fromString("/one")).isDeleted());
   
         //will still have alink from one to two
  -      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  -      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild("one"));
  +      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
  +      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild(Fqn.fromString("one")));
   
         //now put /one/two back in
         cache.put("/one/two", temp);
  @@ -362,8 +361,8 @@
         assertNotSame(two, twoAfter);
         assertEquals(false, twoAfter.isDeleted());
   
  -      assertEquals(twoAfter.getNode(), workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  -      assertEquals(oneAfter.getNode(), workspace.getNode(Fqn.fromString("/")).getChild("one"));
  +      assertEquals(twoAfter.getNode(), workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
  +      assertEquals(oneAfter.getNode(), workspace.getNode(Fqn.fromString("/")).getChild(Fqn.fromString("one")));
   
         assertEquals(null, dummy.getCalled());
   
  @@ -386,14 +385,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -434,8 +433,8 @@
         assertEquals(true, workspace.getNode(Fqn.fromString("/one")).isDeleted());
   
         //will still have alink from one to two
  -      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  -      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild("one"));
  +      assertNotNull(workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
  +      assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild(Fqn.fromString("one")));
   
         //now put /one back in
         SamplePojo pojo2 = new SamplePojo(21, "test");
  @@ -449,8 +448,8 @@
         assertEquals(two, twoAfter);
         assertEquals(true, twoAfter.isDeleted());
   
  -      assertNull(workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  -      assertEquals(oneAfter.getNode(), workspace.getNode(Fqn.fromString("/")).getChild("one"));
  +      assertNull(workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
  +      assertEquals(oneAfter.getNode(), workspace.getNode(Fqn.fromString("/")).getChild(Fqn.fromString("one")));
   
         assertEquals(null, dummy.getCalled());
   
  @@ -473,14 +472,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -521,7 +520,7 @@
         assertEquals(false, workspace.getNode(Fqn.fromString("/one")).isDeleted());
   
         //will still have alink from one to two
  -      assertEquals(null, workspace.getNode(Fqn.fromString("/one")).getChild("two"));
  +      assertEquals(null, workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("two")));
   
   
         assertEquals(null, dummy.getCalled());
  
  
  
  1.18      +43 -43    JBossCache/tests/functional/org/jboss/cache/optimistic/TxInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TxInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/TxInterceptorTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- TxInterceptorTest.java	11 Nov 2006 19:55:18 -0000	1.17
  +++ TxInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.18
  @@ -6,10 +6,10 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.loader.SamplePojo;
   import org.jboss.cache.marshall.MethodCall;
   import org.jboss.cache.marshall.MethodCallFactory;
  @@ -34,11 +34,11 @@
      public void testNoTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
         assertNull(mgr.getTransaction());
         assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
  @@ -64,11 +64,11 @@
      public void testLocalTransactionExists() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -102,11 +102,11 @@
      public void testRollbackTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -134,11 +134,11 @@
   
      public void testEmptyLocalTransaction() throws Exception
      {
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -163,11 +163,11 @@
      public void testEmptyRollbackLocalTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -193,11 +193,11 @@
      public void testLocalRollbackAftercommitTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -238,11 +238,11 @@
   
      public void testgtxTransactionExists() throws Exception
      {
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -276,11 +276,11 @@
      public void testRemotePrepareTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -381,11 +381,11 @@
      public void testRemotePrepareSuspendTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -499,11 +499,11 @@
      public void testRemoteCommitSuspendTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -625,11 +625,11 @@
      public void testRemoteRollbackSuspendTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -749,11 +749,11 @@
      public void testRemoteCommitTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -877,11 +877,11 @@
      public void testRemoteRollbackTransaction() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -1000,11 +1000,11 @@
      public void testSequentialTransactionExists() throws Exception
      {
   
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), false));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, false));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  
  
  
  1.11      +13 -13    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorGetKeyValTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- NodeInterceptorGetKeyValTest.java	6 Sep 2006 15:30:58 -0000	1.10
  +++ NodeInterceptorGetKeyValTest.java	30 Dec 2006 17:49:52 -0000	1.11
  @@ -1,10 +1,10 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -32,12 +32,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
         dummy.setCache(cache);
   
  @@ -100,12 +100,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
         dummy.setCache(cache);
   
  @@ -159,12 +159,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
         dummy.setCache(cache);
   
  @@ -217,12 +217,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
         dummy.setCache(cache);
   
  
  
  
  1.11      +13 -13    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorPutEraseTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- NodeInterceptorPutEraseTest.java	6 Sep 2006 15:30:58 -0000	1.10
  +++ NodeInterceptorPutEraseTest.java	30 Dec 2006 17:49:52 -0000	1.11
  @@ -1,10 +1,10 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -34,14 +34,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -88,14 +88,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -145,14 +145,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  
  
  
  1.18      +9 -9      JBossCache/tests/functional/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- ThreadedOptimisticCreateIfNotExistsInterceptorTest.java	6 Sep 2006 15:30:58 -0000	1.17
  +++ ThreadedOptimisticCreateIfNotExistsInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.18
  @@ -8,9 +8,9 @@
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.OptimisticTransactionEntry;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.loader.SamplePojo;
  @@ -35,13 +35,13 @@
   
      }
   
  -   protected synchronized void setTransactionsInInvocationCtx(TransactionManager mgr, TreeCache cache) throws Exception
  +   protected synchronized void setTransactionsInInvocationCtx(TransactionManager mgr, CacheImpl cache) throws Exception
      {
         cache.getInvocationContext().setTransaction(mgr.getTransaction());
         cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction());
      }
   
  -   protected void resetInvocationCtx(TreeCache cache)
  +   protected void resetInvocationCtx(CacheImpl cache)
      {
         cache.getInvocationContext().setTransaction(null);
         cache.getInvocationContext().setGlobalTransaction(null);
  @@ -54,12 +54,12 @@
         final int minSleep = 0;
         final int maxSleep = 1000;
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
         interceptor.setNext(dummy);
   
         cache.setInterceptorChain(interceptor);
  @@ -122,12 +122,12 @@
         final int minSleep = 0;
         final int maxSleep = 500;
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
         interceptor.setNext(dummy);
   
         cache.setInterceptorChain(interceptor);
  
  
  
  1.3       +2 -2      JBossCache/tests/functional/org/jboss/cache/optimistic/VersioningOnReadTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: VersioningOnReadTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/VersioningOnReadTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- VersioningOnReadTest.java	11 Nov 2006 19:55:18 -0000	1.2
  +++ VersioningOnReadTest.java	30 Dec 2006 17:49:52 -0000	1.3
  @@ -1,7 +1,7 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.TreeCache;
   
   import javax.transaction.Transaction;
   import javax.transaction.TransactionManager;
  @@ -11,7 +11,7 @@
    */
   public class VersioningOnReadTest extends AbstractOptimisticTestCase
   {
  -   TreeCache cache;
  +   CacheImpl cache;
      Fqn fqn = Fqn.fromString("/a");
      TransactionManager tm;
   
  
  
  
  1.16      +457 -457  JBossCache/tests/functional/org/jboss/cache/optimistic/ValidatorInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ValidatorInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ValidatorInterceptorTest.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- ValidatorInterceptorTest.java	25 Aug 2006 14:10:10 -0000	1.15
  +++ ValidatorInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.16
  @@ -6,12 +6,12 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
  +import org.jboss.cache.NodeSPI;
   import org.jboss.cache.OptimisticTransactionEntry;
  -import org.jboss.cache.OptimisticTreeNode;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -43,16 +43,16 @@
   
       public void testTransactionvalidateMethod() throws Exception
       {
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           Interceptor validateInterceptor = new OptimisticValidatorInterceptor();
  -        validateInterceptor.setCache(cache.getCacheSPI());
  +      validateInterceptor.setCache(cache);
           Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -        interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
           Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -        nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
           MockInterceptor dummy = new MockInterceptor();
  -        dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
           validateInterceptor.setNext(interceptor);
           interceptor.setNext(nodeInterceptor);
           nodeInterceptor.setNext(dummy);
  @@ -126,16 +126,16 @@
       public void testTransactionValidateFailureMethod() throws Exception
       {
   
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           Interceptor validateInterceptor = new OptimisticValidatorInterceptor();
  -        validateInterceptor.setCache(cache.getCacheSPI());
  +      validateInterceptor.setCache(cache);
           Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -        interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
           Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -        nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
           MockInterceptor dummy = new MockInterceptor();
  -        dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
           validateInterceptor.setNext(interceptor);
           interceptor.setNext(nodeInterceptor);
           nodeInterceptor.setNext(dummy);
  @@ -166,9 +166,9 @@
           TransactionWorkspace workspace = entry.getTransactionWorkSpace();
   
           /*GlobalTransaction.class,
  -List.class,
  -Address.class,
  -boolean.class*/
  +      List.class,
  +      Address.class,
  +      boolean.class*/
   
           assertEquals(3, workspace.getNodes().size());
           assertNotNull(workspace.getNode(Fqn.fromString("/one/two")));
  @@ -180,9 +180,9 @@
           assertEquals(null, dummy.getCalled());
   
           //lets change one of the underlying version numbers
  -        ((OptimisticTreeNode) workspace.getNode(Fqn.fromString("/one/two")).getNode()).setVersion(new DefaultDataVersion(2));
  +      workspace.getNode(Fqn.fromString("/one/two")).getNode().setVersion(new DefaultDataVersion(2));
           //now let us do a prepare
  -        MethodCall prepareMethod = MethodCallFactory.create(MethodDeclarations.optimisticPrepareMethod, new Object[]{gtx, entry.getModifications(), gtx.getAddress(), Boolean.FALSE});
  +      MethodCall prepareMethod = MethodCallFactory.create(MethodDeclarations.optimisticPrepareMethod, gtx, entry.getModifications(), gtx.getAddress(), Boolean.FALSE);
           try
           {
               cache._replicate(prepareMethod);
  @@ -202,16 +202,16 @@
       public void testTransactionValidateCommitMethod() throws Exception
       {
   
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           Interceptor validateInterceptor = new OptimisticValidatorInterceptor();
  -        validateInterceptor.setCache(cache.getCacheSPI());
  +      validateInterceptor.setCache(cache);
           Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -        interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
           Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -        nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
           MockInterceptor dummy = new MockInterceptor();
  -        dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
           validateInterceptor.setNext(interceptor);
           interceptor.setNext(nodeInterceptor);
           nodeInterceptor.setNext(dummy);
  @@ -242,9 +242,9 @@
           TransactionWorkspace workspace = entry.getTransactionWorkSpace();
   
           /*GlobalTransaction.class,
  -List.class,
  -Address.class,
  -boolean.class*/
  +      List.class,
  +      Address.class,
  +      boolean.class*/
   
           assertEquals(3, workspace.getNodes().size());
           assertNotNull(workspace.getNode(Fqn.fromString("/one/two")));
  @@ -288,16 +288,16 @@
   
   
           assertEquals(null, dummy.getCalled());
  -        OptimisticTreeNode node = (OptimisticTreeNode) workspace.getNode(Fqn.fromString("/")).getNode();
  +      NodeSPI node = workspace.getNode(Fqn.fromString("/")).getNode();
           //assert we can navigate
   
           assertNotNull(node);
  -        node = (OptimisticTreeNode) node.getChild("one");
  +      node = (NodeSPI) node.getChild("one");
           assertEquals(new DefaultDataVersion(1), node.getVersion());
           assertNotNull(node);
           assertTrue(cache.exists(node.getFqn()));
           assertEquals(new DefaultDataVersion(1), node.getVersion());
  -        node = (OptimisticTreeNode) node.getChild("two");
  +      node = (NodeSPI) node.getChild("two");
           assertNotNull(node);
           assertTrue(cache.exists(node.getFqn()));
           assertEquals(new DefaultDataVersion(1), node.getVersion());
  @@ -313,16 +313,16 @@
       public void testTransactionValidateFailRemoteCommitMethod() throws Exception
       {
   
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           Interceptor validateInterceptor = new OptimisticValidatorInterceptor();
  -        validateInterceptor.setCache(cache.getCacheSPI());
  +      validateInterceptor.setCache(cache);
           Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -        interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
           Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -        nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
           MockInterceptor dummy = new MockInterceptor();
  -        dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
           validateInterceptor.setNext(interceptor);
           interceptor.setNext(nodeInterceptor);
           nodeInterceptor.setNext(dummy);
  @@ -395,16 +395,16 @@
   
   
           assertEquals(null, dummy.getCalled());
  -        OptimisticTreeNode node = (OptimisticTreeNode) workspace.getNode(Fqn.fromString("/")).getNode();
  +      NodeSPI node = workspace.getNode(Fqn.fromString("/")).getNode();
           //assert we can navigate
   
           assertNotNull(node);
  -        node = (OptimisticTreeNode) node.getChild("one");
  +      node = (NodeSPI) node.getChild("one");
           assertEquals(new DefaultDataVersion(1), node.getVersion());
           assertNotNull(node);
           assertTrue(cache.exists(node.getFqn()));
           assertEquals(new DefaultDataVersion(1), node.getVersion());
  -        node = (OptimisticTreeNode) node.getChild("two");
  +      node = (NodeSPI) node.getChild("two");
           assertNotNull(node);
           assertTrue(cache.exists(node.getFqn()));
           assertEquals(new DefaultDataVersion(1), node.getVersion());
  @@ -419,15 +419,15 @@
       public void testTransactionValidateRollbackMethod() throws Exception
       {
   
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
           Interceptor validateInterceptor = new OptimisticValidatorInterceptor();
  -        validateInterceptor.setCache(cache.getCacheSPI());
  +      validateInterceptor.setCache(cache);
           Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -        interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
           Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -        nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
           MockInterceptor dummy = new MockInterceptor();
  -        dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
           validateInterceptor.setNext(interceptor);
           interceptor.setNext(nodeInterceptor);
           nodeInterceptor.setNext(dummy);
  @@ -458,9 +458,9 @@
           TransactionWorkspace workspace = entry.getTransactionWorkSpace();
   
           /*GlobalTransaction.class,
  -List.class,
  -Address.class,
  -boolean.class*/
  +      List.class,
  +      Address.class,
  +      boolean.class*/
   
           assertEquals(3, workspace.getNodes().size());
           assertNotNull(workspace.getNode(Fqn.fromString("/one/two")));
  
  
  
  1.3       +43 -43    JBossCache/tests/functional/org/jboss/cache/optimistic/ValidationFailureTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ValidationFailureTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ValidationFailureTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- ValidationFailureTest.java	25 Apr 2006 15:18:29 -0000	1.2
  +++ ValidationFailureTest.java	30 Dec 2006 17:49:52 -0000	1.3
  @@ -6,10 +6,10 @@
    */
   package org.jboss.cache.optimistic;
   
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   
  -import javax.transaction.TransactionManager;
   import javax.transaction.Transaction;
  +import javax.transaction.TransactionManager;
   
   /**
    * Tests a failure in validating a concurrently updated node
  @@ -25,7 +25,7 @@
   
       public void testValidationFailureLockRelease() throws Exception
       {
  -        TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
   
           TransactionManager mgr = cache.getTransactionManager();
   
  @@ -51,7 +51,7 @@
               mgr.commit();
               assertTrue("Should have failed", false);
           }
  -        catch(Exception e)
  +      catch (Exception e)
           {
               assertTrue("Expecting this to fail", true);
           }
  
  
  
  1.26      +20 -20    JBossCache/tests/functional/org/jboss/cache/optimistic/CacheTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/CacheTest.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- CacheTest.java	11 Nov 2006 19:55:18 -0000	1.25
  +++ CacheTest.java	30 Dec 2006 17:49:52 -0000	1.26
  @@ -7,11 +7,11 @@
   import junit.framework.Assert;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.loader.SamplePojo;
   import org.jboss.cache.marshall.MethodCall;
  @@ -41,7 +41,7 @@
   
      public void testExplicitTxFailure() throws Exception
      {
  -      final TreeCache c = createCache();
  +      final CacheImpl c = createCache();
   
         // explicit.
         TransactionManager mgr = c.getTransactionManager();
  @@ -64,7 +64,7 @@
   
      public void testImplicitTxFailure() throws Exception
      {
  -      final TreeCache c = createCache();
  +      final CacheImpl c = createCache();
   
         // implicit (much harder to orchestrate...
         int numThreads = 50;
  @@ -101,12 +101,12 @@
   
      public void testLocalTransaction() throws Exception
      {
  -      TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
         assertNull(mgr.getTransaction());
  @@ -140,12 +140,12 @@
      public void testRollbackTransaction() throws Exception
      {
   
  -      TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
         assertNull(mgr.getTransaction());
  @@ -173,12 +173,12 @@
      public void testRemotePrepareTransaction() throws Exception
      {
   
  -      TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
         //start local transaction
  @@ -278,8 +278,8 @@
      {
   
   
  -      TreeCache cache = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  -      TreeCache cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  +      CacheImpl cache = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  +      CacheImpl cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
         assertEquals(2, cache.getMembers().size());
         assertEquals(2, cache2.getMembers().size());
   
  @@ -330,8 +330,8 @@
      {
   
   
  -      TreeCache cache = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  -      TreeCache cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  +      CacheImpl cache = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  +      CacheImpl cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
         assertEquals(2, cache.getMembers().size());
         assertEquals(2, cache2.getMembers().size());
   
  @@ -386,8 +386,8 @@
      {
   
   
  -      TreeCache cache = createPessimisticCache();
  -      TreeCache cache2 = createPessimisticCache();
  +      CacheImpl cache = createPessimisticCache();
  +      CacheImpl cache2 = createPessimisticCache();
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -412,7 +412,7 @@
   
      public void testConcurrentNodeRemoval() throws Exception
      {
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
   
         cache.put(fqn, "key", "value");
   
  @@ -447,7 +447,7 @@
   
      public void testConcurrentNodeModification() throws Exception
      {
  -      TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
   
         cache.put(fqn, "key", "value");
   
  
  
  
  1.14      +4 -4      JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticWithPassivationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticWithPassivationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticWithPassivationTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- OptimisticWithPassivationTest.java	25 Oct 2006 04:50:20 -0000	1.13
  +++ OptimisticWithPassivationTest.java	30 Dec 2006 17:49:52 -0000	1.14
  @@ -7,7 +7,7 @@
   package org.jboss.cache.optimistic;
   
   import junit.framework.Assert;
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.config.CacheLoaderConfig;
   import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.loader.CacheLoader;
  @@ -49,9 +49,9 @@
         return XmlConfigurationParser.parseCacheLoaderConfig(element);
      }
   
  -   private TreeCache createLocalCache() throws Exception
  +   private CacheImpl createLocalCache() throws Exception
      {
  -      TreeCache cache = createCacheUnstarted(false);
  +      CacheImpl cache = createCacheUnstarted(false);
         cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(getTempDir()));
   
         cache.create();
  @@ -61,7 +61,7 @@
   
      public void testPassivationLocal() throws Exception
      {
  -      TreeCache cache = createLocalCache();
  +      CacheImpl cache = createLocalCache();
         CacheLoader loader = cache.getCacheLoader();
   
         // clean up
  
  
  
  1.20      +584 -580  JBossCache/tests/functional/org/jboss/cache/optimistic/FullStackInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FullStackInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/FullStackInterceptorTest.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- FullStackInterceptorTest.java	20 Nov 2006 03:53:56 -0000	1.19
  +++ FullStackInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.20
  @@ -3,7 +3,11 @@
   import junit.framework.Assert;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.*;
  +import org.jboss.cache.CacheImpl;
  +import org.jboss.cache.Fqn;
  +import org.jboss.cache.GlobalTransaction;
  +import org.jboss.cache.OptimisticTransactionEntry;
  +import org.jboss.cache.TransactionTable;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.loader.SamplePojo;
   import org.jboss.cache.transaction.DummyTransactionManager;
  @@ -33,7 +37,7 @@
       public void testLocalTransaction() throws Exception
       {
   
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -66,7 +70,7 @@
       {
           TestListener listener = new TestListener();
   
  -        TreeCache cache = createCacheWithListener(listener);
  +      CacheImpl cache = createCacheWithListener(listener);
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -103,7 +107,7 @@
       public void testSingleInstanceCommit() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -144,7 +148,7 @@
       public void testSingleInstanceRollback() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createSyncReplicatedCache();
  +      CacheImpl cache = createSyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -174,7 +178,7 @@
       public void testSingleInstanceDuplicateCommit() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createSyncReplicatedCache();
  +      CacheImpl cache = createSyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -225,7 +229,7 @@
       public void testValidationFailCommit() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createSyncReplicatedCache();
  +      CacheImpl cache = createSyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -292,8 +296,8 @@
       public void test2InstanceCommit() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createSyncReplicatedCache();
  -        TreeCache cache2 = createSyncReplicatedCache();
  +      CacheImpl cache = createSyncReplicatedCache();
  +      CacheImpl cache2 = createSyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -351,8 +355,8 @@
       public void test2InstanceRemove() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createSyncReplicatedCache();
  -        TreeCache cache2 = createSyncReplicatedCache();
  +      CacheImpl cache = createSyncReplicatedCache();
  +      CacheImpl cache2 = createSyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -400,7 +404,7 @@
           assertNotNull(cache2.get(Fqn.fromString("/")).getChild("one"));
           assertEquals(false, cache2.get(Fqn.fromString("/")).getNodeSPI().getLock().isLocked());
           assertEquals(false, cache2.get(Fqn.fromString("/one")).getNodeSPI().getLock().isLocked());
  -        assertEquals(false, cache2.get(Fqn.fromString("/one/two")).getLock().isLocked());
  +      assertEquals(false, cache2.get(Fqn.fromString("/one/two")).getNodeSPI().getLock().isLocked());
           assertNotNull(cache2.get(Fqn.fromString("/one")).getChild("two"));
           assertNotNull(cache2.get(Fqn.fromString("/one/two"), "key1"));
   
  @@ -420,8 +424,8 @@
       public void testValidationFailCommit2Instances() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createSyncReplicatedCache();
  -        TreeCache cache2 = createSyncReplicatedCache();
  +      CacheImpl cache = createSyncReplicatedCache();
  +      CacheImpl cache2 = createSyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -498,7 +502,7 @@
           SamplePojo pojo1 = new SamplePojo(21, "test-1");
           SamplePojo pojo2 = new SamplePojo(21, "test-2");
   
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -545,7 +549,7 @@
       public void testGetKeysIsolationTransaction() throws Exception
       {
   
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           if (mgr.getTransaction() != null) mgr.rollback();
  @@ -589,7 +593,7 @@
   
       public void testTxRollbackThroughConcurrentWrite() throws Exception
       {
  -        TreeCache cache = createCacheWithListener();
  +      CacheImpl cache = createCacheWithListener();
           Set keys;
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
  @@ -650,14 +654,14 @@
       }
   
   
  -    protected TreeCache createSyncReplicatedCache() throws Exception
  +   protected CacheImpl createSyncReplicatedCache() throws Exception
       {
           return createReplicatedCache("temp" + groupIncreaser, Configuration.CacheMode.REPL_SYNC);
       }
   
       public void testPuts() throws Exception
       {
  -        TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
           Transaction tx;
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
  @@ -683,7 +687,7 @@
   
       public void testRemoves() throws Exception
       {
  -        TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
           Transaction tx;
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
  @@ -712,7 +716,7 @@
   
       public void testRemovesBeforeGet() throws Exception
       {
  -        TreeCache cache = createCache();
  +      CacheImpl cache = createCache();
           Transaction tx;
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
  @@ -742,8 +746,8 @@
           try
           {
               log.debug("Starting test");
  -            TreeCache cache1 = createSyncReplicatedCache();
  -            TreeCache cache2 = createSyncReplicatedCache();
  +         CacheImpl cache1 = createSyncReplicatedCache();
  +         CacheImpl cache2 = createSyncReplicatedCache();
               log.debug("Created caches");
               DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  
  
  
  1.17      +16 -17    JBossCache/tests/functional/org/jboss/cache/optimistic/OpLockingInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OpLockingInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OpLockingInterceptorTest.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- OpLockingInterceptorTest.java	20 Nov 2006 03:53:56 -0000	1.16
  +++ OpLockingInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.17
  @@ -6,13 +6,12 @@
    */
   package org.jboss.cache.optimistic;
   
  -import org.jboss.cache.DataNode;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.Node;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticLockingInterceptor;
  @@ -49,16 +48,16 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor lockingInterceptor = new OptimisticLockingInterceptor();
  -      lockingInterceptor.setCache(cache.getCacheSPI());
  +      lockingInterceptor.setCache(cache);
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
         lockingInterceptor.setNext(interceptor);
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -140,16 +139,16 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor lockingInterceptor = new OptimisticLockingInterceptor();
  -      lockingInterceptor.setCache(cache.getCacheSPI());
  +      lockingInterceptor.setCache(cache);
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
         lockingInterceptor.setNext(interceptor);
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -257,16 +256,16 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor lockingInterceptor = new OptimisticLockingInterceptor();
  -      lockingInterceptor.setCache(cache.getCacheSPI());
  +      lockingInterceptor.setCache(cache);
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
         lockingInterceptor.setNext(interceptor);
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  
  
  
  1.43      +25 -25    JBossCache/tests/functional/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AbstractOptimisticTestCase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -b -r1.42 -r1.43
  --- AbstractOptimisticTestCase.java	11 Nov 2006 19:55:18 -0000	1.42
  +++ AbstractOptimisticTestCase.java	30 Dec 2006 17:49:52 -0000	1.43
  @@ -4,10 +4,10 @@
   package org.jboss.cache.optimistic;
   
   import junit.framework.TestCase;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.CacheListener;
   import org.jboss.cache.CacheSPI;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.config.CacheLoaderConfig;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.factories.XmlConfigurationParser;
  @@ -69,14 +69,14 @@
         super(name);
      }
   
  -   protected TreeCache createCacheUnstarted() throws Exception
  +   protected CacheImpl createCacheUnstarted() throws Exception
      {
         return createCacheUnstarted(true);
      }
   
  -   protected TreeCache createCacheUnstarted(boolean optimistic) throws Exception
  +   protected CacheImpl createCacheUnstarted(boolean optimistic) throws Exception
      {
  -      TreeCache cache = new TreeCache();
  +      CacheImpl cache = new CacheImpl();
         Configuration c = new Configuration();
         cache.setConfiguration(c);
         if (optimistic) c.setNodeLockingScheme("OPTIMISTIC");
  @@ -86,14 +86,14 @@
         return cache;
      }
   
  -   protected TreeCache createCacheWithListener() throws Exception
  +   protected CacheImpl createCacheWithListener() throws Exception
      {
         return createCacheWithListener(new TestListener());
      }
   
  -   protected TreeCache createCacheWithListener(CacheListener listener) throws Exception
  +   protected CacheImpl createCacheWithListener(CacheListener listener) throws Exception
      {
  -      TreeCache cache = createCacheUnstarted();
  +      CacheImpl cache = createCacheUnstarted();
         cache.create();
         cache.start();
         cache.getNotifier().addCacheListener(listener);
  @@ -106,7 +106,7 @@
       * @return
       * @throws Exception
       */
  -   protected TreeCache createCacheWithLoader() throws Exception
  +   protected CacheImpl createCacheWithLoader() throws Exception
      {
         return createCacheWithLoader(false);
      }
  @@ -130,9 +130,9 @@
         return XmlConfigurationParser.parseCacheLoaderConfig(element);
      }
   
  -   protected TreeCache createCacheWithLoader(boolean passivationEnabled) throws Exception
  +   protected CacheImpl createCacheWithLoader(boolean passivationEnabled) throws Exception
      {
  -      TreeCache cache = createCacheUnstarted();
  +      CacheImpl cache = createCacheUnstarted();
         Configuration c = cache.getConfiguration();
         cache.setConfiguration(c);
         c.setCacheLoaderConfig(getCacheLoaderConfig(true, getTempDir(), passivationEnabled));
  @@ -142,24 +142,24 @@
      }
   
   
  -   protected TreeCache createCache() throws Exception
  +   protected CacheImpl createCache() throws Exception
      {
  -      TreeCache cache = createCacheUnstarted();
  +      CacheImpl cache = createCacheUnstarted();
         cache.create();
         cache.start();
         return cache;
      }
   
  -   protected void destroyCache(TreeCache c)
  +   protected void destroyCache(CacheImpl c)
      {
         c.stop();
         c.destroy();
      }
   
   
  -   protected TreeCache createPessimisticCache() throws Exception
  +   protected CacheImpl createPessimisticCache() throws Exception
      {
  -      TreeCache cache = new TreeCache();
  +      CacheImpl cache = new CacheImpl();
         Configuration c = new Configuration();
         cache.setConfiguration(c);
   
  @@ -176,9 +176,9 @@
         return cache;
      }
   
  -   protected TreeCache createPessimisticCacheLocal() throws Exception
  +   protected CacheImpl createPessimisticCacheLocal() throws Exception
      {
  -      TreeCache cache = new TreeCache();
  +      CacheImpl cache = new CacheImpl();
         Configuration c = new Configuration();
         cache.setConfiguration(c);
   
  @@ -213,14 +213,14 @@
                 "pbcast.STATE_TRANSFER";
      }
   
  -   protected TreeCache createReplicatedCache(Configuration.CacheMode mode) throws Exception
  +   protected CacheImpl createReplicatedCache(Configuration.CacheMode mode) throws Exception
      {
         return createReplicatedCache("test", mode);
      }
   
  -   protected TreeCache createReplicatedCache(String name, Configuration.CacheMode mode) throws Exception
  +   protected CacheImpl createReplicatedCache(String name, Configuration.CacheMode mode) throws Exception
      {
  -      TreeCache cache = new TreeCache();
  +      CacheImpl cache = new CacheImpl();
         Configuration c = new Configuration();
         cache.setConfiguration(c);
   
  @@ -242,24 +242,24 @@
         return cache;
      }
   
  -   protected TreeCache createReplicatedCacheWithLoader(boolean shared, Configuration.CacheMode cacheMode) throws Exception
  +   protected CacheImpl createReplicatedCacheWithLoader(boolean shared, Configuration.CacheMode cacheMode) throws Exception
      {
         return createReplicatedCacheWithLoader("temp-loader", shared, cacheMode);
      }
   
  -   protected TreeCache createReplicatedCacheWithLoader(boolean shared) throws Exception
  +   protected CacheImpl createReplicatedCacheWithLoader(boolean shared) throws Exception
      {
         return createReplicatedCacheWithLoader("temp-loader", shared, Configuration.CacheMode.REPL_SYNC);
      }
   
  -   protected TreeCache createReplicatedCacheWithLoader(String name, boolean shared) throws Exception
  +   protected CacheImpl createReplicatedCacheWithLoader(String name, boolean shared) throws Exception
      {
         return createReplicatedCacheWithLoader(name, shared, Configuration.CacheMode.REPL_SYNC);
      }
   
  -   protected TreeCache createReplicatedCacheWithLoader(String name, boolean shared, Configuration.CacheMode cacheMode) throws Exception
  +   protected CacheImpl createReplicatedCacheWithLoader(String name, boolean shared, Configuration.CacheMode cacheMode) throws Exception
      {
  -      TreeCache cache = new TreeCache();
  +      CacheImpl cache = new CacheImpl();
         Configuration c = new Configuration();
         cache.setConfiguration(c);
         c.setClusterName(name);
  
  
  
  1.11      +10 -10    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorRemoveKeyValTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- NodeInterceptorRemoveKeyValTest.java	6 Sep 2006 15:30:58 -0000	1.10
  +++ NodeInterceptorRemoveKeyValTest.java	30 Dec 2006 17:49:52 -0000	1.11
  @@ -6,11 +6,11 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -41,12 +41,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
         dummy.setCache(cache);
   
  @@ -92,12 +92,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
         dummy.setCache(cache);
   
  @@ -150,12 +150,12 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
         dummy.setCache(cache);
   
  
  
  
  1.9       +9 -9      JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorTransactionTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorTransactionTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorTransactionTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- NodeInterceptorTransactionTest.java	6 Sep 2006 15:30:58 -0000	1.8
  +++ NodeInterceptorTransactionTest.java	30 Dec 2006 17:49:52 -0000	1.9
  @@ -6,7 +6,7 @@
    */
   package org.jboss.cache.optimistic;
   
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -30,14 +30,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -62,14 +62,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  
  
  
  1.7       +281 -277  JBossCache/tests/functional/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AsyncFullStackInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- AsyncFullStackInterceptorTest.java	20 Nov 2006 03:53:56 -0000	1.6
  +++ AsyncFullStackInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.7
  @@ -2,10 +2,14 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.*;
  +import org.jboss.cache.CacheImpl;
  +import org.jboss.cache.Fqn;
  +import org.jboss.cache.GlobalTransaction;
  +import org.jboss.cache.OptimisticTransactionEntry;
  +import org.jboss.cache.TransactionTable;
   import org.jboss.cache.config.Configuration;
  -import org.jboss.cache.misc.TestingUtil;
   import org.jboss.cache.loader.SamplePojo;
  +import org.jboss.cache.misc.TestingUtil;
   import org.jboss.cache.transaction.DummyTransactionManager;
   
   import javax.transaction.Transaction;
  @@ -32,7 +36,7 @@
       public void testSingleInstanceRollback() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createAsyncReplicatedCache();
  +      CacheImpl cache = createAsyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -62,7 +66,7 @@
       public void testSingleInstanceDuplicateCommit() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createAsyncReplicatedCache();
  +      CacheImpl cache = createAsyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -113,7 +117,7 @@
       public void testValidationFailCommit() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createAsyncReplicatedCache();
  +      CacheImpl cache = createAsyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -180,8 +184,8 @@
       public void test2InstanceCommit() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createAsyncReplicatedCache();
  -        TreeCache cache2 = createAsyncReplicatedCache();
  +      CacheImpl cache = createAsyncReplicatedCache();
  +      CacheImpl cache2 = createAsyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -217,7 +221,7 @@
           assertNotNull(cache.get(Fqn.fromString("/one/two"), "key1"));
   
           // let async calls propagate
  -        TestingUtil.sleepThread((long)1000);
  +      TestingUtil.sleepThread((long) 1000);
   
           // cache2 asserts
           assertEquals(0, cache2.getTransactionTable().getNumGlobalTransactions());
  @@ -242,8 +246,8 @@
       public void test2InstanceRemove() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createAsyncReplicatedCache();
  -        TreeCache cache2 = createAsyncReplicatedCache();
  +      CacheImpl cache = createAsyncReplicatedCache();
  +      CacheImpl cache2 = createAsyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -280,7 +284,7 @@
           assertNotNull(cache.get(Fqn.fromString("/one/two"), "key1"));
   
           // let async calls propagate
  -        TestingUtil.sleepThread((long)1000);
  +      TestingUtil.sleepThread((long) 1000);
   
           // cache2 asserts
           assertEquals(0, cache2.getTransactionTable().getNumGlobalTransactions());
  @@ -304,7 +308,7 @@
           assertEquals(null, cache.get("/one/two", "key1"));
   
           // let async calls propagate
  -        TestingUtil.sleepThread((long)1000);
  +      TestingUtil.sleepThread((long) 1000);
   
           log.debug("  C2 " + cache2.get("/one/two"));
           assertEquals(false, cache2.exists("/one/two"));
  @@ -317,8 +321,8 @@
       public void testValidationFailCommit2Instances() throws Exception
       {
           groupIncreaser++;
  -        TreeCache cache = createAsyncReplicatedCache();
  -        TreeCache cache2 = createAsyncReplicatedCache();
  +      CacheImpl cache = createAsyncReplicatedCache();
  +      CacheImpl cache2 = createAsyncReplicatedCache();
   
           DummyTransactionManager mgr = DummyTransactionManager.getInstance();
           assertNull(mgr.getTransaction());
  @@ -355,7 +359,7 @@
           mgr.commit();
   
           // let async calls propagate
  -        TestingUtil.sleepThread((long)1000);
  +      TestingUtil.sleepThread((long) 1000);
   
           assertEquals(1, cache.getTransactionTable().getNumGlobalTransactions());
           assertEquals(1, cache.getTransactionTable().getNumLocalTransactions());
  @@ -393,7 +397,7 @@
   
       }
   
  -    protected TreeCache createAsyncReplicatedCache() throws Exception
  +   protected CacheImpl createAsyncReplicatedCache() throws Exception
       {
           return createReplicatedCache("temp" + groupIncreaser, Configuration.CacheMode.REPL_ASYNC);
       }
  
  
  
  1.19      +31 -31    JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticReplicationInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -b -r1.18 -r1.19
  --- OptimisticReplicationInterceptorTest.java	11 Nov 2006 19:55:18 -0000	1.18
  +++ OptimisticReplicationInterceptorTest.java	30 Dec 2006 17:49:52 -0000	1.19
  @@ -6,10 +6,10 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.loader.SamplePojo;
   import org.jboss.cache.marshall.MethodCall;
  @@ -32,7 +32,7 @@
    */
   public class OptimisticReplicationInterceptorTest extends AbstractOptimisticTestCase
   {
  -   private TreeCache cache;
  +   private CacheImpl cache;
   
      /**
       * @param name
  @@ -57,9 +57,9 @@
      public void testLocalTransaction() throws Exception
      {
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
         assertNull(mgr.getTransaction());
  @@ -90,9 +90,9 @@
      public void testRollbackTransaction() throws Exception
      {
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
         assertNull(mgr.getTransaction());
  @@ -118,9 +118,9 @@
      public void testRemotePrepareTransaction() throws Exception
      {
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -187,9 +187,9 @@
      public void testRemoteRollbackTransaction() throws Exception
      {
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -271,9 +271,9 @@
      public void testRemoteCommitNoPrepareTransaction() throws Exception
      {
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -334,9 +334,9 @@
      public void testRemoteRollbackNoPrepareTransaction() throws Throwable
      {
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -391,9 +391,9 @@
      public void testRemoteCommitTransaction() throws Exception
      {
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -478,15 +478,15 @@
         cache = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
   
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
  -      TreeCache cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  +      CacheImpl cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
         MockInterceptor dummy2 = new MockInterceptor();
  -      dummy.setCache(cache2.getCacheSPI());
  +      dummy.setCache(cache2);
   
  -      cache2.setInterceptorChain(getAlteredInterceptorChain(dummy2, cache2.getCacheSPI(), true));
  +      cache2.setInterceptorChain(getAlteredInterceptorChain(dummy2, cache2, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -537,18 +537,18 @@
         cache = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
   
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
  -      TreeCache cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  +      CacheImpl cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
         MockFailureInterceptor dummy2 = new MockFailureInterceptor();
         List failures = new ArrayList();
         failures.add(MethodDeclarations.optimisticPrepareMethod);
         dummy2.setFailurelist(failures);
  -      dummy.setCache(cache2.getCacheSPI());
  +      dummy.setCache(cache2);
   
  -      cache2.setInterceptorChain(getAlteredInterceptorChain(dummy2, cache2.getCacheSPI(), true));
  +      cache2.setInterceptorChain(getAlteredInterceptorChain(dummy2, cache2, true));
   
         DummyTransactionManager mgr = DummyTransactionManager.getInstance();
   
  @@ -607,15 +607,15 @@
         cache = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
   
         MockFailureInterceptor dummy = new MockFailureInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
  -      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache.getCacheSPI(), true));
  +      cache.setInterceptorChain(getAlteredInterceptorChain(dummy, cache, true));
   
  -      TreeCache cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
  +      CacheImpl cache2 = createReplicatedCache(Configuration.CacheMode.REPL_SYNC);
         MockInterceptor dummy2 = new MockInterceptor();
  -      dummy.setCache(cache2.getCacheSPI());
  +      dummy.setCache(cache2);
   
  -      cache2.setInterceptorChain(getAlteredInterceptorChain(dummy2, cache2.getCacheSPI(), true));
  +      cache2.setInterceptorChain(getAlteredInterceptorChain(dummy2, cache2, true));
   
         List failures = new ArrayList();
         failures.add(MethodDeclarations.optimisticPrepareMethod);
  
  
  
  1.4       +6 -6      JBossCache/tests/functional/org/jboss/cache/optimistic/RemoveBeforeCreateTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RemoveBeforeCreateTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/RemoveBeforeCreateTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- RemoveBeforeCreateTest.java	20 Dec 2006 13:29:16 -0000	1.3
  +++ RemoveBeforeCreateTest.java	30 Dec 2006 17:49:52 -0000	1.4
  @@ -1,8 +1,8 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.OptimisticTreeNode;
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.NodeSPI;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.misc.TestingUtil;
   
  @@ -13,12 +13,12 @@
    */
   public class RemoveBeforeCreateTest extends AbstractOptimisticTestCase
   {
  -   TreeCache[] c = null;
  +   CacheImpl[] c = null;
      TransactionManager t;
   
      protected void setUp() throws Exception
      {
  -      c = new TreeCache[2];
  +      c = new CacheImpl[2];
         c[0] = createReplicatedCache(Configuration.CacheMode.REPL_ASYNC);
         c[1] = createReplicatedCache(Configuration.CacheMode.REPL_ASYNC);
   
  @@ -52,10 +52,10 @@
         assertEquals("value", c[0].get("/control", "key"));
         assertEquals("value", c[1].get("/control", "key"));
   
  -      DefaultDataVersion v1 = (DefaultDataVersion) ((OptimisticTreeNode) c[0].get("/control")).getVersion();
  +      DefaultDataVersion v1 = (DefaultDataVersion) ((NodeSPI) c[0].get("/control")).getVersion();
         assertEquals(1, v1.getRawVersion());
   
  -      DefaultDataVersion v2 = (DefaultDataVersion) ((OptimisticTreeNode) c[1].get("/control")).getVersion();
  +      DefaultDataVersion v2 = (DefaultDataVersion) ((NodeSPI) c[1].get("/control")).getVersion();
         assertEquals(1, v2.getRawVersion());
   
   
  
  
  
  1.5       +4 -4      JBossCache/tests/functional/org/jboss/cache/optimistic/ConcurrentTransactionTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConcurrentTransactionTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ConcurrentTransactionTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ConcurrentTransactionTest.java	6 Sep 2006 15:30:58 -0000	1.4
  +++ ConcurrentTransactionTest.java	30 Dec 2006 17:49:52 -0000	1.5
  @@ -6,9 +6,9 @@
    */
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.OptimisticTreeNode;
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.NodeSPI;
   
   import javax.transaction.Transaction;
   import javax.transaction.TransactionManager;
  @@ -18,7 +18,7 @@
    */
   public class ConcurrentTransactionTest extends AbstractOptimisticTestCase
   {
  -   private TreeCache cache;
  +   private CacheImpl cache;
   
      public ConcurrentTransactionTest(String name)
      {
  @@ -75,7 +75,7 @@
   
         assertEquals(value, cache.get("/a/b/x/y", key));
   
  -      OptimisticTreeNode n = (OptimisticTreeNode) cache.get(Fqn.ROOT);
  +      NodeSPI n = (NodeSPI) cache.get(Fqn.ROOT);
         System.out.println(n.getVersion());
      }
   }
  
  
  
  1.12      +17 -17    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorRemoveDataTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- NodeInterceptorRemoveDataTest.java	6 Sep 2006 15:30:58 -0000	1.11
  +++ NodeInterceptorRemoveDataTest.java	30 Dec 2006 17:49:52 -0000	1.12
  @@ -1,10 +1,10 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -34,14 +34,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -85,14 +85,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -142,14 +142,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -202,14 +202,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  
  
  
  1.11      +13 -13    JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorGetKeysTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- NodeInterceptorGetKeysTest.java	6 Sep 2006 15:30:58 -0000	1.10
  +++ NodeInterceptorGetKeysTest.java	30 Dec 2006 17:49:52 -0000	1.11
  @@ -1,10 +1,10 @@
   package org.jboss.cache.optimistic;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
   import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
  @@ -34,14 +34,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -103,14 +103,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  @@ -152,14 +152,14 @@
      {
   
         TestListener listener = new TestListener();
  -      final TreeCache cache = createCacheWithListener(listener);
  +      final CacheImpl cache = createCacheWithListener(listener);
   
         Interceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
  -      interceptor.setCache(cache.getCacheSPI());
  +      interceptor.setCache(cache);
         Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
  -      nodeInterceptor.setCache(cache.getCacheSPI());
  +      nodeInterceptor.setCache(cache);
         MockInterceptor dummy = new MockInterceptor();
  -      dummy.setCache(cache.getCacheSPI());
  +      dummy.setCache(cache);
   
         interceptor.setNext(nodeInterceptor);
         nodeInterceptor.setNext(dummy);
  
  
  
  1.7       +41 -41    JBossCache/tests/functional/org/jboss/cache/optimistic/MockInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MockInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/MockInterceptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- MockInterceptor.java	25 Aug 2006 14:10:10 -0000	1.6
  +++ MockInterceptor.java	30 Dec 2006 17:49:52 -0000	1.7
  @@ -1,6 +1,6 @@
   package org.jboss.cache.optimistic;
   
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.marshall.MethodCall;
   
  @@ -20,9 +20,9 @@
   {
   
   
  -    public void setCache(TreeCache cache)
  +   public void setCache(CacheImpl cache)
       {
  -        super.setCache(cache.getCacheSPI());
  +      super.setCache(cache);
   
       }
   
  
  
  



More information about the jboss-cvs-commits mailing list