You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pe...@apache.org on 2005/04/10 18:22:15 UTC

cvs commit: jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig CatalinaClusterSF.java StandardHostSF.java server-registry.xml

pero        2005/04/10 09:22:15

  Modified:    modules/storeconfig build.xml
               modules/storeconfig/src/share/org/apache/catalina/storeconfig
                        CatalinaClusterSF.java StandardHostSF.java
                        server-registry.xml
  Log:
  Add new Listener, ClusterListener and Valve Cluster subelement config options
  
  Revision  Changes    Path
  1.3       +11 -7     jakarta-tomcat-catalina/modules/storeconfig/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml	11 Feb 2005 19:46:01 -0000	1.2
  +++ build.xml	10 Apr 2005 16:22:15 -0000	1.3
  @@ -5,13 +5,13 @@
   
   	<!-- See "build.properties.sample" in the top level directory for all     -->
   	<!-- property values you must customize for successful building!!!        -->
  -	<!--property file="build.properties"/>
  -  <property file="../build.properties"/>
  -  <property file="${user.home}/build.properties"/-->
  -
  -	<!-- Build Defaults -->
  -	<property name="catalina.build" location="../.." />
  -	<property name="config.build" value="${catalina.home}/modules/storeconfig/build" />
  +    <property file="../../../build.properties" />
  +    <property file="../../../jakarta-tomcat-5/build.properties.default" />
  +
  +    <!-- Build Defaults -->
  +    <property name="catalina.home"  location="../.."/>
  +    <property name="catalina.build" location="../../../jakarta-tomcat-5/build"/>
  +    <property name="config.build" value="${catalina.home}/modules/storeconfig/build" />
   	<property name="config.dist" value="${catalina.home}/modules/storeconfig/dist" />
   
   	<!-- Construct Catalina classpath -->
  @@ -119,6 +119,10 @@
   		</jar>
   	</target>
   
  +    <target name="copy" depends="dist" >
  +       <copy file="${cluster.dist}/catalina-storeconfig.jar" todir="${catalina.build}/server/lib" />
  +   </target>
  +
   	<!-- ======================== DIST: Clean Directory ===================== -->
   
   
  
  
  
  1.3       +5 -20     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CatalinaClusterSF.java	3 Apr 2005 16:05:10 -0000	1.2
  +++ CatalinaClusterSF.java	10 Apr 2005 16:22:15 -0000	1.3
  @@ -81,24 +81,10 @@
                   storeElement(aWriter, indent, deployer);
               }
               // Store nested <Valve> element
  -            // ReplicationValve are not store at Hosts element, see
  -            // Host transient child list!
  -            Valve valve = cluster.getValve();
  -            if (valve != null) {
  -                IStoreFactory elementFactory = getRegistry().findStoreFactory(
  -                        valve.getClass());
  -                if (elementFactory != null) {
  -                    StoreDescription desc = getRegistry().findDescription(
  -                            valve.getClass());
  -                    elementFactory.store(aWriter, indent, valve);
  -                }
  -            }
  -            // Store nested <Valve> pipeline elements
  -            /*           if (aCluster instanceof SimpleTcpCluster) {
  -                           Valve valves[] = ((Pipeline) ((SimpleTcpCluster)cluster).getValves();
  -                           storeElementArray(aWriter, indent, valves);
  -                       }
  -           */
  +            // ClusterValve are not store at Hosts element, see
  +            Valve valves[] = cluster.getValves();
  +            storeElementArray(aWriter, indent, valves);
  + 
               if (aCluster instanceof SimpleTcpCluster) {
                   // Store nested <Listener> elements
                   LifecycleListener listeners[] = ((SimpleTcpCluster)cluster).findLifecycleListeners();
  @@ -106,8 +92,7 @@
                   // Store nested <ClusterListener> elements
                   MessageListener mlisteners[] = ((SimpleTcpCluster)cluster).findClusterListeners();
                   storeElementArray(aWriter, indent, mlisteners);
  -            }
  -            
  +            }            
           }
       }
   }
  \ No newline at end of file
  
  
  
  1.2       +11 -1     jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardHostSF.java
  
  Index: StandardHostSF.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardHostSF.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StandardHostSF.java	8 Jan 2005 11:14:07 -0000	1.1
  +++ StandardHostSF.java	10 Apr 2005 16:22:15 -0000	1.2
  @@ -17,6 +17,8 @@
   package org.apache.catalina.storeconfig;
   
   import java.io.PrintWriter;
  +import java.util.ArrayList;
  +import java.util.List;
   
   import org.apache.catalina.Cluster;
   import org.apache.catalina.Container;
  @@ -25,6 +27,7 @@
   import org.apache.catalina.Pipeline;
   import org.apache.catalina.Realm;
   import org.apache.catalina.Valve;
  +import org.apache.catalina.cluster.ClusterValve;
   import org.apache.catalina.core.StandardHost;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -83,7 +86,14 @@
               // Store nested <Valve> elements
               if (host instanceof Pipeline) {
                   Valve valves[] = ((Pipeline) host).getValves();
  -                storeElementArray(aWriter, indent, valves);
  +                if(valves != null && valves.length > 0 ) {
  +                    List hostValves = new ArrayList() ;
  +                    for(int i = 0 ; i < valves.length ; i++ ) {
  +                        if(!( valves[i] instanceof ClusterValve))
  +                            hostValves.add(valves[i]);
  +                    }                
  +                    storeElementArray(aWriter, indent, hostValves.toArray());
  +                }
               }
   
               // store all <Cluster> elements
  
  
  
  1.5       +0 -1      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- server-registry.xml	3 Apr 2005 16:05:10 -0000	1.4
  +++ server-registry.xml	10 Apr 2005 16:22:15 -0000	1.5
  @@ -192,7 +192,6 @@
   	     <TransientChild>org.apache.catalina.valves.CertificatesValve</TransientChild>
   	     <TransientChild>org.apache.catalina.valves.ErrorReportValve</TransientChild>
   	     <TransientChild>org.apache.catalina.valves.RequestListenerValve</TransientChild>
  -	     <TransientChild>org.apache.catalina.cluster.tcp.ReplicationValve</TransientChild>
   	 </Description>
        <Description
   	    tag="Environment"
  
  
  

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