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

Manik Surtani msurtani at jboss.com
Thu Jul 20 07:14:17 EDT 2006


  User: msurtani
  Date: 06/07/20 07:14:17

  Modified:    tests/functional/org/jboss/cache/aop      
                        NewLocalAopTest.java NewReplicatedTxAopTest.java
                        ObjectGraphAopTest.java RecursiveRefAopTest.java
                        ReplicatedObjectGraphAopTest.java
                        ReplicatedPutWithBulkRemoveAopTest.java
  Log:
  Partially migrated to new configurators
  
  Revision  Changes    Path
  1.9       +2 -3      JBossCache/tests/functional/org/jboss/cache/aop/NewLocalAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NewLocalAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/NewLocalAopTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- NewLocalAopTest.java	9 Apr 2006 12:33:49 -0000	1.8
  +++ NewLocalAopTest.java	20 Jul 2006 11:14:17 -0000	1.9
  @@ -5,8 +5,8 @@
   import junit.framework.TestSuite;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.aop.test.Person;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   
   import java.util.Map;
   
  @@ -33,8 +33,7 @@
         log_.info("setUp() ....");
         String configFile = "META-INF/local-service.xml";
         cache_ = new PojoCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  -      config.configure(cache_, configFile); // read in generic replSync xml
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile(configFile));
         cache_.start();
      }
   
  
  
  
  1.6       +14 -11    JBossCache/tests/functional/org/jboss/cache/aop/NewReplicatedTxAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NewReplicatedTxAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/NewReplicatedTxAopTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- NewReplicatedTxAopTest.java	29 May 2006 06:06:47 -0000	1.5
  +++ NewReplicatedTxAopTest.java	20 Jul 2006 11:14:17 -0000	1.6
  @@ -7,25 +7,29 @@
   
   package org.jboss.cache.aop;
   
  -import junit.framework.TestCase;
   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.transaction.DummyTransactionManager;
  -import org.jboss.cache.misc.TestingUtil;
  -import org.jboss.cache.PropertyConfigurator;
  -import org.jboss.cache.aop.test.Person;
   import org.jboss.cache.aop.test.Address;
   import org.jboss.cache.aop.test.IdObject;
  +import org.jboss.cache.aop.test.Person;
  +import org.jboss.cache.factories.XmlConfigurationParser;
  +import org.jboss.cache.misc.TestingUtil;
  +import org.jboss.cache.transaction.DummyTransactionManager;
   
   import javax.naming.Context;
  -import javax.naming.NamingException;
   import javax.naming.InitialContext;
  -import javax.transaction.*;
  -import java.util.Properties;
  +import javax.naming.NamingException;
  +import javax.transaction.NotSupportedException;
  +import javax.transaction.RollbackException;
  +import javax.transaction.SystemException;
  +import javax.transaction.Transaction;
  +import javax.transaction.UserTransaction;
   import java.util.ArrayList;
   import java.util.List;
  +import java.util.Properties;
   
   /**
    * PojoCache replicated test cases with tx.
  @@ -57,11 +61,10 @@
         Properties prop = new Properties();
         prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
         cache_ = new PojoCache();
  -      PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
  -      config.configure(cache_, "META-INF/replSync-service.xml");
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
   
         cache1_ = new PojoCache();
  -      config.configure(cache1_, "META-INF/replSync-service.xml");
  +      cache1_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
         cache_.start();
         cache1_.start();
   
  
  
  
  1.17      +6 -7      JBossCache/tests/functional/org/jboss/cache/aop/ObjectGraphAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ObjectGraphAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/ObjectGraphAopTest.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- ObjectGraphAopTest.java	9 Apr 2006 12:33:49 -0000	1.16
  +++ ObjectGraphAopTest.java	20 Jul 2006 11:14:17 -0000	1.17
  @@ -5,15 +5,15 @@
   import junit.framework.TestSuite;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.aop.PojoCache;
  +import org.jboss.cache.DataNode;
   import org.jboss.cache.aop.test.Address;
  -import org.jboss.cache.aop.test.Person;
   import org.jboss.cache.aop.test.Link;
   import org.jboss.cache.aop.test.NodeManager;
  -import org.jboss.cache.PropertyConfigurator;
  -import org.jboss.cache.DataNode;
  +import org.jboss.cache.aop.test.Person;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   
  -import java.util.*;
  +import java.util.ArrayList;
  +import java.util.List;
   
   /**
    * Test object graph handling in aop, e.g., circular reference, multiple reference, link, etc.
  @@ -37,8 +37,7 @@
   //      String configFile = "META-INF/local-service.xml";
         String configFile = "META-INF/local-service.xml";
         cache_ = new PojoCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  -      config.configure(cache_, configFile); // read in generic replSync xml
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile(configFile)); 
         cache_.start();
      }
   
  
  
  
  1.5       +2 -4      JBossCache/tests/functional/org/jboss/cache/aop/RecursiveRefAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RecursiveRefAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/RecursiveRefAopTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- RecursiveRefAopTest.java	9 Apr 2006 12:33:49 -0000	1.4
  +++ RecursiveRefAopTest.java	20 Jul 2006 11:14:17 -0000	1.5
  @@ -3,10 +3,9 @@
   import junit.framework.TestCase;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.PropertyConfigurator;
  -import org.jboss.cache.aop.PojoCache;
   import org.jboss.cache.aop.test.IdObject;
   import org.jboss.cache.aop.test.ValueObject;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   
   import java.util.HashMap;
   import java.util.Map;
  @@ -30,8 +29,7 @@
         log.info("setUp() ....");
         treeCache = new PojoCache();
   
  -      PropertyConfigurator cacheConfig = new PropertyConfigurator();
  -      cacheConfig.configure(treeCache, CONFIG_FILENAME);
  +      treeCache.setConfiguration(new XmlConfigurationParser().parseFile(CONFIG_FILENAME));
         treeCache.startService();
         treeCache.putObject("/aop/test", new HashMap());
         cachedMap = (Map) treeCache.getObject("/aop/test");
  
  
  
  1.24      +2 -3      JBossCache/tests/functional/org/jboss/cache/aop/ReplicatedObjectGraphAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedObjectGraphAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/ReplicatedObjectGraphAopTest.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- ReplicatedObjectGraphAopTest.java	20 Jul 2006 09:03:52 -0000	1.23
  +++ ReplicatedObjectGraphAopTest.java	20 Jul 2006 11:14:17 -0000	1.24
  @@ -5,11 +5,11 @@
   import junit.framework.TestSuite;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.aop.test.Address;
   import org.jboss.cache.aop.test.Link;
   import org.jboss.cache.aop.test.NodeManager;
   import org.jboss.cache.aop.test.Person;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.misc.TestingUtil;
   
   import java.util.ArrayList;
  @@ -49,8 +49,7 @@
   
      private PojoCache createCache(String name) throws Exception {
         PojoCache tree=new PojoCache();
  -      PropertyConfigurator config=new PropertyConfigurator();
  -      config.configure(tree, "META-INF/replSync-service.xml"); // read in generic replAsync xml
  +      tree.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml")); 
         tree.getConfiguration().setClusterName(name);
         tree.createService();
         tree.startService();
  
  
  
  1.4       +7 -9      JBossCache/tests/functional/org/jboss/cache/aop/ReplicatedPutWithBulkRemoveAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedPutWithBulkRemoveAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/ReplicatedPutWithBulkRemoveAopTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- ReplicatedPutWithBulkRemoveAopTest.java	9 May 2006 05:58:06 -0000	1.3
  +++ ReplicatedPutWithBulkRemoveAopTest.java	20 Jul 2006 11:14:17 -0000	1.4
  @@ -7,20 +7,19 @@
   
   package org.jboss.cache.aop;
   
  -import junit.framework.TestCase;
   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.aop.PojoCache;
  -import org.jboss.cache.aop.test.Person;
   import org.jboss.cache.aop.test.Address;
  -import org.jboss.cache.PropertyConfigurator;
  +import org.jboss.cache.aop.test.Person;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   
   import javax.naming.Context;
  -import java.util.Properties;
  -import java.util.List;
   import java.util.ArrayList;
  +import java.util.List;
  +import java.util.Properties;
   
   /**
    * Test for putObject with existing pojo for bulkd remove for speed.
  @@ -45,11 +44,10 @@
         Properties prop = new Properties();
         prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
         cache_ = new PojoCache();
  -      PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
  -      config.configure(cache_, "META-INF/replSync-service.xml");
  +      cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
   
         cache1_ = new PojoCache();
  -      config.configure(cache1_, "META-INF/replSync-service.xml");
  +      cache1_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml")); 
         cache_.start();
         cache1_.start();
      }
  
  
  



More information about the jboss-cvs-commits mailing list