tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig DescriptorHelper.java StandardHostSFTest.java
Date Sun, 03 Apr 2005 16:05:10 GMT
pero        2005/04/03 09:05:10

  Modified:    modules/storeconfig/src/share/org/apache/catalina/storeconfig
                        CatalinaClusterSF.java StoreRegistry.java
                        server-registry.xml
               modules/storeconfig/test/src/share/org/apache/catalina/storeconfig
                        DescriptorHelper.java StandardHostSFTest.java
  Log:
  Add storeconfig  Cluster/Listener and Cluster/ClusterListener elements
  
  Revision  Changes    Path
  1.2       +20 -0     jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java
  
  Index: CatalinaClusterSF.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CatalinaClusterSF.java	8 Jan 2005 11:14:07 -0000	1.1
  +++ CatalinaClusterSF.java	3 Apr 2005 16:05:10 -0000	1.2
  @@ -18,12 +18,17 @@
   
   import java.io.PrintWriter;
   
  +import org.apache.catalina.Lifecycle;
  +import org.apache.catalina.LifecycleListener;
  +import org.apache.catalina.Pipeline;
   import org.apache.catalina.Valve;
   import org.apache.catalina.cluster.CatalinaCluster;
   import org.apache.catalina.cluster.ClusterDeployer;
   import org.apache.catalina.cluster.ClusterReceiver;
   import org.apache.catalina.cluster.ClusterSender;
   import org.apache.catalina.cluster.MembershipService;
  +import org.apache.catalina.cluster.MessageListener;
  +import org.apache.catalina.cluster.tcp.SimpleTcpCluster;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -88,6 +93,21 @@
                       elementFactory.store(aWriter, indent, valve);
                   }
               }
  +            // Store nested <Valve> pipeline elements
  +            /*           if (aCluster instanceof SimpleTcpCluster) {
  +                           Valve valves[] = ((Pipeline) ((SimpleTcpCluster)cluster).getValves();
  +                           storeElementArray(aWriter, indent, valves);
  +                       }
  +           */
  +            if (aCluster instanceof SimpleTcpCluster) {
  +                // Store nested <Listener> elements
  +                LifecycleListener listeners[] = ((SimpleTcpCluster)cluster).findLifecycleListeners();
  +                storeElementArray(aWriter, indent, listeners);
  +                // Store nested <ClusterListener> elements
  +                MessageListener mlisteners[] = ((SimpleTcpCluster)cluster).findClusterListeners();
  +                storeElementArray(aWriter, indent, mlisteners);
  +            }
  +            
           }
       }
   }
  \ No newline at end of file
  
  
  
  1.2       +2 -1      jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StoreRegistry.java
  
  Index: StoreRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StoreRegistry.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StoreRegistry.java	8 Jan 2005 11:14:07 -0000	1.1
  +++ StoreRegistry.java	3 Apr 2005 16:05:10 -0000	1.2
  @@ -30,6 +30,7 @@
   import org.apache.catalina.cluster.ClusterReceiver;
   import org.apache.catalina.cluster.ClusterSender;
   import org.apache.catalina.cluster.MembershipService;
  +import org.apache.catalina.cluster.MessageListener;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -55,7 +56,7 @@
               ClusterSender.class, ClusterReceiver.class,
               MembershipService.class, ClusterDeployer.class, Realm.class,
               Manager.class, DirContext.class, LifecycleListener.class,
  -            Valve.class };
  +            Valve.class, MessageListener.class };
   
       /**
        * @return Returns the name.
  
  
  
  1.4       +7 -0      jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/server-registry.xml
  
  Index: server-registry.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/server-registry.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- server-registry.xml	15 Feb 2005 09:36:12 -0000	1.3
  +++ server-registry.xml	3 Apr 2005 16:05:10 -0000	1.4
  @@ -327,5 +327,12 @@
   		tagClass="org.apache.catalina.cluster.ClusterDeployer"
           storeFactoryClass="org.apache.catalina.storeconfig.StoreFactoryBase">
        </Description> 
  +     <Description
  +	    tag="ClusterListener"
  +		standard="false"
  +		default="false" 
  +		tagClass="org.apache.catalina.cluster.MessageListener"
  +        storeFactoryClass="org.apache.catalina.storeconfig.StoreFactoryBase">
  +     </Description>
   </Registry>
   
  
  
  
  1.2       +5 -3      jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/DescriptorHelper.java
  
  Index: DescriptorHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/DescriptorHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DescriptorHelper.java	8 Jan 2005 11:14:07 -0000	1.1
  +++ DescriptorHelper.java	3 Apr 2005 16:05:10 -0000	1.2
  @@ -20,6 +20,7 @@
   import org.apache.catalina.cluster.ClusterReceiver;
   import org.apache.catalina.cluster.ClusterSender;
   import org.apache.catalina.cluster.MembershipService;
  +import org.apache.catalina.cluster.MessageListener;
   import org.apache.catalina.deploy.ContextEjb;
   import org.apache.catalina.deploy.ContextEnvironment;
   import org.apache.catalina.deploy.ContextLocalEjb;
  @@ -27,9 +28,6 @@
   import org.apache.catalina.deploy.ContextResourceEnvRef;
   import org.apache.catalina.deploy.ContextResourceLink;
   import org.apache.catalina.deploy.NamingResources;
  -import org.apache.catalina.storeconfig.IStoreFactory;
  -import org.apache.catalina.storeconfig.StoreDescription;
  -import org.apache.catalina.storeconfig.StoreRegistry;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -173,6 +171,10 @@
                   .getName(), "Deployer", ClusterDeployer.class.getName(),
                   "org.apache.catalina.storeconfig.StoreFactoryBase", false,
                   false);
  +        registerDescriptor(clusterDesc, registry, MessageListener.class
  +                .getName(), "ClusterListener", MessageListener.class.getName(),
  +                "org.apache.catalina.storeconfig.StoreFactoryBase", false,
  +                false);
           return clusterDesc;
       }
   
  
  
  
  1.2       +7 -3      jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/StandardHostSFTest.java
  
  Index: StandardHostSFTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/StandardHostSFTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StandardHostSFTest.java	8 Jan 2005 11:14:08 -0000	1.1
  +++ StandardHostSFTest.java	3 Apr 2005 16:05:10 -0000	1.2
  @@ -25,6 +25,7 @@
   import org.apache.catalina.cluster.CatalinaCluster;
   import org.apache.catalina.cluster.deploy.FarmWarDeployer;
   import org.apache.catalina.cluster.mcast.McastService;
  +import org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener;
   import org.apache.catalina.cluster.tcp.ReplicationListener;
   import org.apache.catalina.cluster.tcp.ReplicationTransmitter;
   import org.apache.catalina.cluster.tcp.ReplicationValve;
  @@ -32,9 +33,6 @@
   import org.apache.catalina.core.StandardContext;
   import org.apache.catalina.core.StandardHost;
   import org.apache.catalina.realm.JAASRealm;
  -import org.apache.catalina.storeconfig.StandardHostSF;
  -import org.apache.catalina.storeconfig.StoreDescription;
  -import org.apache.catalina.storeconfig.StoreRegistry;
   
   /**
    * @author Peter Rossbach
  @@ -230,6 +228,8 @@
           deployer.setWatchEnabled(false);
           cluster.setClusterDeployer(deployer);
           standardHost.setCluster(cluster);
  +        cluster.addLifecycleListener(new InfoLifecycleListener());
  +        cluster.addClusterListener(new JvmRouteSessionIDBinderListener());
           // DeltaManager is default!
           String aspectedResult = "<Host"
                   + LF.LINE_SEPARATOR
  @@ -274,6 +274,10 @@
                   + "    <Valve className=\"org.apache.catalina.cluster.tcp.ReplicationValve\""
                   + LF.LINE_SEPARATOR
                   + "      filter=\".*\\.gif;.*\\.js;.*\\.jpg;.*\\.jpeg;.*\\.htm;.*\\.html;.*\\.txt;\"/>"
  +                + LF.LINE_SEPARATOR
  +                + "    <Listener className=\"org.apache.catalina.storeconfig.InfoLifecycleListener\"/>"
  +                + LF.LINE_SEPARATOR
  +                + "    <ClusterListener className=\"org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener\"/>"
                   + LF.LINE_SEPARATOR + "  </Cluster>" + LF.LINE_SEPARATOR
                   + "</Host>" + LF.LINE_SEPARATOR;
           check(aspectedResult);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message