[jbosscache-commits] JBoss Cache SVN: r4854 - in core/trunk/src: main/java/org/jboss/cache/config and 7 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Dec 13 18:54:20 EST 2007


Author: manik.surtani at jboss.com
Date: 2007-12-13 18:54:19 -0500 (Thu, 13 Dec 2007)
New Revision: 4854

Modified:
   core/trunk/src/main/java/org/jboss/cache/RegionManager.java
   core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java
   core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
   core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java
   core/trunk/src/main/java/org/jboss/cache/transaction/TransactionEntry.java
   core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java
   core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderManagerTest.java
   core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
   core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java
Log:
more fixes

Modified: core/trunk/src/main/java/org/jboss/cache/RegionManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RegionManager.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/RegionManager.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -92,8 +92,8 @@
       }
 
       setDefaultInactive(configuration.isInactiveOnStartup());
-      if (log.isTraceEnabled())
-         log.trace("Finished region manager.  Default region is " + regionsRegistry.get(Fqn.ROOT));
+
+      if (defaultInactive) regionsRegistry.get(Fqn.ROOT).setActive(false);
    }
 
    @Stop
@@ -124,6 +124,8 @@
    public void setDefaultInactive(boolean defaultInactive)
    {
       this.defaultInactive = defaultInactive;
+      Region defaultRegion = regionsRegistry.get(Fqn.ROOT);
+      if (defaultRegion != null) defaultRegion.setActive(!defaultInactive);
    }
 
    /**
@@ -360,6 +362,16 @@
       {
          throw new RuntimeException(e);
       }
+
+//      if (!fqn.isRoot())
+//      {
+//         // activate parent regions
+//         Region parent = getRegion(fqn.getParent(), false);
+//         if (parent != null && !parent.isActive())
+//         {
+//            activate(parent.getFqn(), suppressRegionNotEmptyException);
+//         }
+//      }
    }
 
    /**

Modified: core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -101,7 +101,7 @@
    {
       try
       {
-         if (cache != null && (cache.getCacheStatus() == CacheStatus.STARTED || cache.getCacheStatus() == CacheStatus.STARTING) && !getClass().getDeclaredField(fieldName).isAnnotationPresent(Dynamic.class))
+         if (cache != null && cache.getCacheStatus() != null && (cache.getCacheStatus() == CacheStatus.STARTED || cache.getCacheStatus() == CacheStatus.STARTING) && !getClass().getDeclaredField(fieldName).isAnnotationPresent(Dynamic.class))
          {
             throw new ConfigurationException("Attempted to modify a non-Dynamic configuration element [" + fieldName + "] after the cache has started!");
          }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -1,5 +1,6 @@
 package org.jboss.cache.interceptors;
 
+import org.apache.commons.logging.Log;
 import org.jboss.cache.CacheException;
 import org.jboss.cache.CacheSPI;
 import org.jboss.cache.Fqn;
@@ -14,10 +15,9 @@
 import org.jboss.cache.transaction.TransactionEntry;
 import org.jboss.cache.transaction.TransactionTable;
 import org.jgroups.Address;
-import org.apache.commons.logging.Log;
 
+import javax.transaction.SystemException;
 import javax.transaction.TransactionManager;
-import javax.transaction.SystemException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -59,8 +59,15 @@
       this.loader = cache.getCacheLoaderManager().getCacheLoader();
    }
 
+   public Object invoke(InvocationContext ctx) throws Throwable
+   {
+      if (loaderConfig == null) loaderConfig = cache.getCacheLoaderManager().getCacheLoaderConfig();
+      if (loader == null) loader = cache.getCacheLoaderManager().getCacheLoader();
+      return super.invoke(ctx);
+   }
+
    /**
-    *  if this is a shared cache loader and the call is of remote origin, pass up the chain
+    * if this is a shared cache loader and the call is of remote origin, pass up the chain
     */
    protected boolean skipMethodCall(InvocationContext ctx)
    {
@@ -113,7 +120,8 @@
                storeInternalState(affectedFqns);
             }
             return returnValue;
-         } else
+         }
+         else
          {
             log.trace("Commit called with no modifications; ignoring.");
          }
@@ -229,7 +237,8 @@
    protected Object handlePutDataEraseMethod(InvocationContext ctx, GlobalTransaction gt, Fqn fqn, Map newData, boolean createUndoOps, boolean eraseContents) throws Throwable
    {
       Object returnValue = nextInterceptor(ctx);
-      if (inTransaction()) {
+      if (inTransaction())
+      {
          return returnValue;
       }
       loader.removeData(fqn);
@@ -265,7 +274,7 @@
    }
 
    private Object handlePutKeyValue(InvocationContext ctx, Fqn fqn, Object key, Object value)
-      throws Throwable
+         throws Throwable
    {
       Object returnValue = nextInterceptor(ctx);
       if (inTransaction())
@@ -364,8 +373,8 @@
          if (configuration.getExposeManagementStatistics() && getStatisticsEnabled())
          {
             if ((mod.getType() == Modification.ModificationType.PUT_DATA) ||
-                    (mod.getType() == Modification.ModificationType.PUT_DATA_ERASE) ||
-                    (mod.getType() == Modification.ModificationType.PUT_KEY_VALUE))
+                  (mod.getType() == Modification.ModificationType.PUT_DATA_ERASE) ||
+                  (mod.getType() == Modification.ModificationType.PUT_KEY_VALUE))
             {
                txPuts++;
             }
@@ -390,7 +399,6 @@
    /**
     * Converts a method call to a Modification, to be sent to a cache loader.  In addition, adds any affected Fqns to the
     * affectedFqns collection, which is then used by the calling code.
-    *
     */
    private Modification convertMethodCallToModification(MethodCall methodCall, Set<Fqn> affectedFqns) throws Exception
    {
@@ -410,27 +418,27 @@
       {
          case MethodDeclarations.putDataMethodLocal_id:
             mod = new Modification(Modification.ModificationType.PUT_DATA,
-                    fqn, (Map) args[2]);// data
+                  fqn, (Map) args[2]);// data
             break;
          case MethodDeclarations.putDataEraseMethodLocal_id:
             mod = new Modification(Modification.ModificationType.PUT_DATA_ERASE,
-                    fqn,  (Map) args[2]);// data
+                  fqn, (Map) args[2]);// data
             break;
          case MethodDeclarations.putKeyValMethodLocal_id:
             mod = new Modification(Modification.ModificationType.PUT_KEY_VALUE,
-                    fqn,  args[2], args[3]);// key + value
+                  fqn, args[2], args[3]);// key + value
             break;
          case MethodDeclarations.removeNodeMethodLocal_id:
             mod = new Modification(Modification.ModificationType.REMOVE_NODE,
-                    fqn);
+                  fqn);
             break;
          case MethodDeclarations.removeKeyMethodLocal_id:
             mod = new Modification(Modification.ModificationType.REMOVE_KEY_VALUE,
-                    fqn, args[2]);// key
+                  fqn, args[2]);// key
             break;
          case MethodDeclarations.removeDataMethodLocal_id:
             mod = new Modification(Modification.ModificationType.REMOVE_DATA,
-                    fqn);
+                  fqn);
             break;
          case MethodDeclarations.moveMethodLocal_id:
             Fqn moveFrom = (Fqn) args[0];

Modified: core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -138,6 +138,7 @@
       {
          if (!originLocal) ctx.setOriginLocal(true);
          // reset old method call
+         if (ctx == null) ctx = invocationContextContainer.get();
          ctx.setMethodCall(oldCall);
       }
    }

Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -264,7 +264,7 @@
 
    public CacheStatus getCacheStatus()
    {
-      return cache.getCacheStatus();
+      return cache == null ? null : cache.getCacheStatus();
    }
 
    public InvocationContext getInvocationContext()
@@ -572,7 +572,7 @@
       return getChildrenNames(Fqn.fromString(fqn));
    }
 
-   public CacheImpl getImpl()
+   public CacheImpl getDelegationTarget()
    {
       return cache;
    }

Modified: core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -14,6 +14,7 @@
 import org.jboss.cache.config.CacheLoaderConfig;
 import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
 import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig;
+import org.jboss.cache.config.Configuration;
 import org.jboss.cache.factories.annotations.Inject;
 import org.jboss.cache.factories.annotations.Start;
 import org.jboss.cache.factories.annotations.Stop;
@@ -66,6 +67,7 @@
    private CacheSPI cache;
    private CacheLoader loader;
    private boolean fetchPersistentState;
+   private Configuration configuration;
 
    /**
     * Sets a configuration object and creates a cacheloader accordingly.
@@ -75,10 +77,12 @@
     * @throws CacheException
     */
    @Inject
-   public void setConfig(CacheLoaderConfig config, CacheSPI cache) throws CacheException
+   public void setConfig(CacheLoaderConfig config, CacheSPI cache, Configuration configuration) throws CacheException
    {
       this.config = config == null ? new CacheLoaderConfig() : config;
       this.cache = cache;
+      this.configuration = configuration;
+
       if (config != null)
       {
          try
@@ -220,7 +224,7 @@
          // startCacheLoader() method.
          //           tmpLoader.create();
          //           tmpLoader.start();
-         if (cache != null && cache.getConfiguration().isUseRegionBasedMarshalling())
+         if (configuration != null && configuration.isUseRegionBasedMarshalling())
          {
             tmpLoader.setRegionManager(cache.getRegionManager());
          }

Modified: core/trunk/src/main/java/org/jboss/cache/transaction/TransactionEntry.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/transaction/TransactionEntry.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/transaction/TransactionEntry.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -340,7 +340,7 @@
       {
          l = new ArrayList<MethodCall>(undo_list);
       }
-      CacheImpl ci = ((CacheInvocationDelegate) cache).getImpl();
+      CacheImpl ci = ((CacheInvocationDelegate) cache).getDelegationTarget();
       for (ListIterator<MethodCall> i = l.listIterator(l.size()); i.hasPrevious();)
       {
          MethodCall undo_op = i.previous();

Modified: core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -4,6 +4,7 @@
 import org.jboss.cache.CacheImpl;
 import org.jboss.cache.CacheSPI;
 import org.jboss.cache.interceptors.Interceptor;
+import org.jboss.cache.invocation.CacheInvocationDelegate;
 
 /**
  * Helper that prints the contents of a {@link org.jboss.cache.Cache} to a string.
@@ -35,7 +36,7 @@
    public static String printCacheLockingInfo(Cache c)
    {
       // internal cast
-      CacheImpl ci = (CacheImpl) c;
+      CacheImpl ci = ((CacheInvocationDelegate) c).getDelegationTarget();
       return ci.printLockInfo();
    }
 

Modified: core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderManagerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderManagerTest.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderManagerTest.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -64,7 +64,7 @@
       CacheLoaderConfig cfg = createCacheLoaderCfg(false);
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, false, "org.jboss.cache.loader.FileCacheLoader"));
 
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
       CacheLoader cl = mgr.getCacheLoader();
 
       assertEquals(FileCacheLoader.class, cl.getClass());
@@ -73,7 +73,7 @@
       cfg = createCacheLoaderCfg(false);
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.FileCacheLoader"));
 
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
       cl = mgr.getCacheLoader();
 
       assertEquals(AsyncCacheLoader.class, cl.getClass());
@@ -88,7 +88,7 @@
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, false, "org.jboss.cache.loader.JDBCCacheLoader"));
 
       CacheLoaderManager mgr = new CacheLoaderManager();
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
       CacheLoader cl = mgr.getCacheLoader();
 
       assertEquals(FileCacheLoader.class, cl.getClass());
@@ -99,7 +99,7 @@
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.bdbje.BdbjeCacheLoader"));
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.JDBCCacheLoader"));
 
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
       cl = mgr.getCacheLoader();
 
       assertEquals(AsyncCacheLoader.class, cl.getClass());
@@ -111,7 +111,7 @@
       CacheLoaderConfig clc = getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "location=" + getTempDir(), false, false, false);
 
       CacheLoaderManager mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
       CacheLoader cl = mgr.getCacheLoader();
 
       assertEquals(FileCacheLoader.class, cl.getClass());
@@ -119,7 +119,7 @@
       // with async
       clc = getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "location=" + getTempDir(), true, false, false);
 
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
       cl = mgr.getCacheLoader();
       assertEquals(AsyncCacheLoader.class, cl.getClass());
    }
@@ -158,7 +158,7 @@
             "</cacheloader></config>";
       CacheLoaderConfig clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       CacheLoaderManager mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
       CacheLoader cl = mgr.getCacheLoader();
 
       assertEquals(FileCacheLoader.class, cl.getClass());
@@ -193,7 +193,7 @@
             "    </properties>" +
             "</cacheloader></config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
       cl = mgr.getCacheLoader();
 
       assertEquals(AsyncCacheLoader.class, cl.getClass());
@@ -207,7 +207,7 @@
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, false, "org.jboss.cache.loader.JDBCCacheLoader"));
 
       CacheLoaderManager mgr = new CacheLoaderManager();
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
       CacheLoader cl = mgr.getCacheLoader();
 
       assertEquals(ChainingCacheLoader.class, cl.getClass());
@@ -221,7 +221,7 @@
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, false, "org.jboss.cache.loader.FileCacheLoader"));
       cfg.addIndividualCacheLoaderConfig(createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.JDBCCacheLoader"));
 
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
       cl = mgr.getCacheLoader();
 
       assertEquals(ChainingCacheLoader.class, cl.getClass());
@@ -256,7 +256,7 @@
 
       CacheLoaderConfig clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       CacheLoaderManager mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
       CacheLoader cl = mgr.getCacheLoader();
 
 
@@ -288,7 +288,7 @@
             "    </properties>" +
             "</cacheloader></config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
       cl = mgr.getCacheLoader();
 
       assertEquals(ChainingCacheLoader.class, cl.getClass());
@@ -314,7 +314,7 @@
 
       try
       {
-         mgr.setConfig(cfg, null);
+         mgr.setConfig(cfg, null, null);
          assertTrue("Should throw exception since we have > 1 cache loader with fetchPersistentState as true", false);
       }
       catch (Exception e)
@@ -331,7 +331,7 @@
       cfg.addIndividualCacheLoaderConfig(i);
 
       assertEquals(1, cfg.getIndividualCacheLoaderConfigs().size());
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
 
       // control cases which should not throw exceptions
       mgr = new CacheLoaderManager();
@@ -345,7 +345,7 @@
       cfg.addIndividualCacheLoaderConfig(i2);
 
       assertEquals(2, cfg.getIndividualCacheLoaderConfigs().size());
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
 
       // control cases which should not throw exceptions
       mgr = new CacheLoaderManager();
@@ -359,7 +359,7 @@
       cfg.addIndividualCacheLoaderConfig(i2);
 
       assertEquals(2, cfg.getIndividualCacheLoaderConfigs().size());
-      mgr.setConfig(cfg, null);
+      mgr.setConfig(cfg, null, null);
    }
 
    public void testConfigurationParsing() throws Exception
@@ -388,7 +388,7 @@
             "</cacheloader></config>";
       CacheLoaderConfig clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       CacheLoaderManager mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       assertEquals(ChainingCacheLoader.class, mgr.getCacheLoader().getClass());
       assertTrue("Should be true", mgr.isFetchPersistentState());
@@ -437,7 +437,7 @@
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
 
       mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       assertTrue("Should be false", !mgr.isFetchPersistentState());
 
@@ -461,7 +461,7 @@
             "</config>";
       CacheLoaderConfig clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       CacheLoaderManager mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       CacheLoaderConfig.IndividualCacheLoaderConfig iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNull("Singleton has not been configured", iclc.getSingletonStoreConfig());
@@ -486,7 +486,7 @@
             "</config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       mgr = new MockCacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNotNull("Singleton has been configured", iclc.getSingletonStoreConfig());
@@ -512,7 +512,7 @@
             "</config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       mgr = new MockCacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNotNull("Singleton has been configured", iclc.getSingletonStoreConfig());
@@ -545,7 +545,7 @@
             "</config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNotNull("Singleton has been configured", iclc.getSingletonStoreConfig());
@@ -576,7 +576,7 @@
             "</config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       mgr = new CacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNotNull("Singleton has been configured", iclc.getSingletonStoreConfig());
@@ -603,7 +603,7 @@
             "</config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       mgr = new MockCacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNotNull("Singleton has been configured", iclc.getSingletonStoreConfig());
@@ -636,7 +636,7 @@
             "</config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       mgr = new MockCacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNotNull("Singleton has been configured", iclc.getSingletonStoreConfig());
@@ -670,7 +670,7 @@
             "</config>";
       clc = XmlConfigurationParser.parseCacheLoaderConfig(strToElement(conf));
       mgr = new MockCacheLoaderManager();
-      mgr.setConfig(clc, null);
+      mgr.setConfig(clc, null, null);
 
       iclc = mgr.getCacheLoaderConfig().getFirstCacheLoaderConfig();
       assertNotNull("Singleton has been configured", iclc.getSingletonStoreConfig());
@@ -704,7 +704,7 @@
       mgr = new CacheLoaderManager();
       try
       {
-         mgr.setConfig(clc, null);
+         mgr.setConfig(clc, null, null);
          fail("A cache loader cannot be configured as singleton and shared, should have thrown an Exception");
       }
       catch (Exception e)
@@ -735,7 +735,7 @@
 
       try
       {
-         mgr.setConfig(clc, null);
+         mgr.setConfig(clc, null, null);
          fail("A singleton store class implementation must extend AbstractDelegatingCacheLoader");
       }
       catch (Exception e)

Modified: core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -6,10 +6,7 @@
  */
 package org.jboss.cache.loader;
 
-import javax.transaction.TransactionManager;
-
 import junit.framework.Assert;
-
 import org.jboss.cache.Cache;
 import org.jboss.cache.CacheSPI;
 import org.jboss.cache.DefaultCacheFactory;
@@ -18,12 +15,16 @@
 import org.jboss.cache.misc.TestingUtil;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
+import javax.transaction.TransactionManager;
+
 /**
  * Tests using cache loaders with replicating data
  *
  * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
  */
+ at Test(groups = "functional")
 public class CacheLoaderWithReplicationTest extends AbstractCacheLoaderTestBase
 {
    private Cache<Object, Object> cache1, cache2;

Modified: core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java	2007-12-13 22:47:36 UTC (rev 4853)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java	2007-12-13 23:54:19 UTC (rev 4854)
@@ -154,7 +154,7 @@
    public void testObjectFromByteBuffer() throws Exception
    {
       MethodCall put = MethodCallFactory.create(MethodDeclarations.putKeyValMethodLocal,
-            A_B, "name", "Joe", false);
+            null, A_B, "name", "Joe", false);
 
       MethodCall replicate = MethodCallFactory.create(MethodDeclarations.replicateMethod, put);
 




More information about the jbosscache-commits mailing list