[jboss-cvs] JBossCache/src/org/jboss/cache ...

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


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

  Modified:    src/org/jboss/cache   ConsoleListener.java
                        TreeCacheView2.java
  Log:
  migrated to new configurators
  
  Revision  Changes    Path
  1.7       +3 -3      JBossCache/src/org/jboss/cache/ConsoleListener.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConsoleListener.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/ConsoleListener.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- ConsoleListener.java	18 Jul 2006 10:50:46 -0000	1.6
  +++ ConsoleListener.java	20 Jul 2006 11:48:25 -0000	1.7
  @@ -1,10 +1,11 @@
   package org.jboss.cache;
   
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jgroups.View;
   
   import java.util.Iterator;
  -import java.util.Set;
   import java.util.Map;
  +import java.util.Set;
   
   /**
    * This class provides a non-graphical view of <em>JBossCache</em> replication
  @@ -344,7 +345,6 @@
           try
           {
               TreeCache cache = new TreeCache();
  -            PropertyConfigurator configurator = new PropertyConfigurator();
   
               String configFileName = DEFAULT_CONFIG_FILE_NAME;
   
  @@ -355,7 +355,7 @@
                   System.out.print("No xml config file argument is supplied. Will use jboss-cache.xml from classpath");
               }
   
  -            configurator.configure(cache, configFileName);
  +            cache.setConfiguration(new XmlConfigurationParser().parseFile(configFileName));
   
               ConsoleListener listener = new ConsoleListener(cache);
               listener.listen();
  
  
  
  1.12      +4 -3      JBossCache/src/org/jboss/cache/TreeCacheView2.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheView2.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCacheView2.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- TreeCacheView2.java	18 Jul 2006 10:50:46 -0000	1.11
  +++ TreeCacheView2.java	20 Jul 2006 11:48:25 -0000	1.12
  @@ -12,7 +12,9 @@
   import bsh.util.JConsole;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.log4j.PropertyConfigurator;
   import org.jgroups.View;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   
   import javax.swing.*;
   import javax.swing.event.TableModelEvent;
  @@ -52,7 +54,7 @@
    * The view itself caches only the nodes, but doesn't cache any of the data (HashMap) associated with it. When
    * data needs to be displayed, the underlying tree will be accessed directly.
    *
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
    */
   public class TreeCacheView2 {
      static TreeCacheGui2 gui_=null;
  @@ -133,8 +135,7 @@
   				demo.start();
   			} else {
   				tree = new TreeCache();
  -				PropertyConfigurator config = new PropertyConfigurator();
  -				config.configure(tree, resource);
  +				tree.setConfiguration(new XmlConfigurationParser().parseFile(resource));
   
   				tree.addTreeCacheListener(new TreeCacheView.MyListener());
   				tree.start();
  
  
  



More information about the jboss-cvs-commits mailing list