[jboss-cvs] JBossCache/tests/perf/org/jboss/cache ...

Manik Surtani msurtani at jboss.com
Thu Jul 20 07:48:27 EDT 2006


  User: msurtani
  Date: 06/07/20 07:48:27

  Modified:    tests/perf/org/jboss/cache      
                        ConcurrentEvictAndRemoveTest.java
                        FieldUpdateEmulator.java LocalMapPerfTest.java
                        LocalPerfTest.java ReplicatedAsyncMapPerfTest.java
                        ReplicatedSyncMapPerfTest.java
  Log:
  migrated to new configurators
  
  Revision  Changes    Path
  1.5       +4 -5      JBossCache/tests/perf/org/jboss/cache/ConcurrentEvictAndRemoveTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConcurrentEvictAndRemoveTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/ConcurrentEvictAndRemoveTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ConcurrentEvictAndRemoveTest.java	20 Jul 2006 10:59:14 -0000	1.4
  +++ ConcurrentEvictAndRemoveTest.java	20 Jul 2006 11:48:27 -0000	1.5
  @@ -11,17 +11,17 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  -
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.eviction.RegionManager;
   import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.eviction.RegionManager;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   
   import java.util.Random;
   /**
    * Local mode test for concurrent EvictionTimerTask evicting nodes and Client removing nodes from TreeCache.
    *
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    * @author <a href="mailto:uwe.lamprecht at gmx.de">Uwe Lamprecht</a> July 29 2004
    */
   public final class ConcurrentEvictAndRemoveTest extends TestCase
  @@ -50,8 +50,7 @@
           super.setUp();
           cache = new TreeCache();
           cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
  -        PropertyConfigurator config = new PropertyConfigurator();
  -        config.configure(cache, "META-INF/local-mru-eviction-service.xml");
  +        cache.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-mru-eviction-service.xml"));
           cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
           cache.start();
       }
  
  
  
  1.6       +3 -2      JBossCache/tests/perf/org/jboss/cache/FieldUpdateEmulator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FieldUpdateEmulator.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/FieldUpdateEmulator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- FieldUpdateEmulator.java	20 Jul 2006 11:14:18 -0000	1.5
  +++ FieldUpdateEmulator.java	20 Jul 2006 11:48:27 -0000	1.6
  @@ -14,6 +14,7 @@
   import org.jboss.cache.data.RandomString;
   import org.jboss.cache.data.Student;
   import org.jboss.cache.transaction.DummyTransactionManager;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jgroups.View;
   import org.apache.log4j.PropertyConfigurator;
   
  @@ -56,13 +57,13 @@
   
      void initCache() throws Exception {
         cache_ = new PojoCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  +
         String file = (String)props_.get("cache_config");
         if(file==null)
         {
            throw new RuntimeException("Cache config xml is not specified.");
         }
  -      config.configure(cache_, file); // read in generic replAsync xml
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile(file));
         cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      }
   
  
  
  
  1.4       +4 -3      JBossCache/tests/perf/org/jboss/cache/LocalMapPerfTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocalMapPerfTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/LocalMapPerfTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- LocalMapPerfTest.java	20 Jul 2006 10:54:01 -0000	1.3
  +++ LocalMapPerfTest.java	20 Jul 2006 11:48:27 -0000	1.4
  @@ -16,6 +16,8 @@
   import org.jboss.cache.lock.LockStrategyFactory;
   import org.jboss.cache.transaction.DummyTransactionManager;
   import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.factories.XmlConfigurationParser;
  +import org.apache.log4j.PropertyConfigurator;
   
   import javax.naming.Context;
   import javax.naming.InitialContext;
  @@ -30,7 +32,7 @@
   /**
    * Local mode performance test for TreeCache.
    *
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    * @author <a href="mailto:bwang at jboss.org">Ben Wang</a> May 20 2003
    */
   public class LocalMapPerfTest extends TestCase
  @@ -117,8 +119,7 @@
      {
         cachingMode_ = caching_mode;
         cache_ = new TreeCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  -      config.configure(cache_, "META-INF/local-service.xml"); // read in generic local xml
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-service.xml"));
         cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache_.startService();
      }
  
  
  
  1.4       +4 -4      JBossCache/tests/perf/org/jboss/cache/LocalPerfTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocalPerfTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/LocalPerfTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- LocalPerfTest.java	20 Jul 2006 08:53:08 -0000	1.3
  +++ LocalPerfTest.java	20 Jul 2006 11:48:27 -0000	1.4
  @@ -12,10 +12,11 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  +import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.lock.IsolationLevel;
   import org.jboss.cache.lock.LockStrategyFactory;
   import org.jboss.cache.transaction.DummyTransactionManager;
  -import org.jboss.cache.config.Configuration;
   
   import javax.naming.Context;
   import javax.naming.InitialContext;
  @@ -28,7 +29,7 @@
   /**
    * Local mode performance test for TreeCache.
    *
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    * @author <a href="mailto:bwang at jboss.org">Ben Wang</a> May 20 2003
    */
   public class LocalPerfTest extends TestCase
  @@ -88,8 +89,7 @@
      {
         cachingMode_ = caching_mode;
         cache_ = new TreeCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  -      config.configure(cache_, "META-INF/local-service.xml"); // read in generic local xml
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-service.xml"));
         cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache_.startService();
      }
  
  
  
  1.5       +3 -4      JBossCache/tests/perf/org/jboss/cache/ReplicatedAsyncMapPerfTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedAsyncMapPerfTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/ReplicatedAsyncMapPerfTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ReplicatedAsyncMapPerfTest.java	20 Jul 2006 11:14:18 -0000	1.4
  +++ ReplicatedAsyncMapPerfTest.java	20 Jul 2006 11:48:27 -0000	1.5
  @@ -13,8 +13,8 @@
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.transaction.DummyTransactionManager;
  -import org.apache.log4j.PropertyConfigurator;
   
   import javax.naming.Context;
   import javax.naming.InitialContext;
  @@ -29,7 +29,7 @@
   /**
    * Local mode performance test for TreeCache.
    *
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    * @author <a href="mailto:bwang at jboss.org">Ben Wang</a> May 20 2003
    */
   public class ReplicatedAsyncMapPerfTest extends TestCase
  @@ -132,8 +132,7 @@
      {
         cachingMode_ = caching_mode;
         cache_ = new TreeCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  -      config.configure(cache_, "META-INF/replAsync-service.xml"); // read in generic replAsync xml
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replAsync-service.xml")); // read in generic replAsync xml
         cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache_.startService();
      }
  
  
  
  1.4       +4 -4      JBossCache/tests/perf/org/jboss/cache/ReplicatedSyncMapPerfTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedSyncMapPerfTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/ReplicatedSyncMapPerfTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- ReplicatedSyncMapPerfTest.java	20 Jul 2006 09:03:55 -0000	1.3
  +++ ReplicatedSyncMapPerfTest.java	20 Jul 2006 11:48:27 -0000	1.4
  @@ -12,10 +12,11 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  +import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.lock.IsolationLevel;
   import org.jboss.cache.lock.LockStrategyFactory;
   import org.jboss.cache.transaction.DummyTransactionManager;
  -import org.jboss.cache.config.Configuration;
   
   import javax.naming.Context;
   import javax.naming.InitialContext;
  @@ -30,7 +31,7 @@
   /**
    * Local mode performance test for TreeCache.
    *
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    * @author <a href="mailto:bwang at jboss.org">Ben Wang</a> May 20 2003
    */
   public class ReplicatedSyncMapPerfTest extends TestCase
  @@ -135,8 +136,7 @@
      {
         cachingMode_ = caching_mode;
         cache_ = new TreeCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  -      config.configure(cache_, "META-INF/replSync-service.xml"); // read in generic replSync xml
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
         cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache_.startService();
   //		org.jgroups.log.Trace.init();
  
  
  



More information about the jboss-cvs-commits mailing list