pero        2005/05/16 11:34:31

  Modified:    modules/storeconfig build.xml
               modules/storeconfig/src/share/org/apache/catalina/storeconfig
                        CatalinaClusterSF.java ConnectorStoreAppender.java
               modules/storeconfig/test build.xml
               
modules/storeconfig/test/src/share/org/apache/catalina/storeconfig
                        ConnectorSFTest.java StandardHostSFTest.java
  Log:
  Fix Https sslProtocol Bug ( find by Ankit Shah)
  fix build.xml
  Fix cluster testcase after refactoring
  
  Revision  Changes    Path
  1.4       +1 -1      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml 10 Apr 2005 16:22:15 -0000      1.3
  +++ build.xml 16 May 2005 18:34:31 -0000      1.4
  @@ -120,7 +120,7 @@
        </target>
   
       <target name="copy" depends="dist" >
  -       <copy file="${cluster.dist}/catalina-storeconfig.jar" 
todir="${catalina.build}/server/lib" />
  +       <copy file="${config.dist}/catalina-storeconfig.jar" 
todir="${catalina.build}/server/lib" />
      </target>
   
        <!-- ======================== DIST: Clean Directory 
===================== -->
  
  
  
  1.4       +0 -2      
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CatalinaClusterSF.java    10 Apr 2005 16:22:15 -0000      1.3
  +++ CatalinaClusterSF.java    16 May 2005 18:34:31 -0000      1.4
  @@ -18,9 +18,7 @@
   
   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;
  
  
  
  1.3       +5 -6      
jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
  
  Index: ConnectorStoreAppender.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/ConnectorStoreAppender.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConnectorStoreAppender.java       15 Feb 2005 09:35:22 -0000      1.2
  +++ ConnectorStoreAppender.java       16 May 2005 18:34:31 -0000      1.3
  @@ -27,10 +27,7 @@
   import java.util.Iterator;
   import java.util.List;
   
  -import org.apache.catalina.Container;
   import org.apache.catalina.connector.Connector;
  -import org.apache.catalina.core.StandardContext;
  -import org.apache.catalina.core.StandardHost;
   import org.apache.coyote.ProtocolHandler;
   import org.apache.tomcat.util.IntrospectionUtils;
   
  @@ -97,6 +94,9 @@
           for (Iterator propertyIterator = propertyKeys.iterator(); 
propertyIterator
                   .hasNext();) {
               String key = (String) propertyIterator.next();
  +            if (replacements.get(key) != null) {
  +                key = (String) replacements.get(key);
  +            }
               Object value = (Object) IntrospectionUtils.getProperty(bean, 
key);
   
               if (desc.isTransientAttribute(key)) {
  @@ -230,9 +230,8 @@
       }
       
       /*
  -     * Print Context Values. <ul><li> Spezial handling to default workDir.
  -     * </li><li> Don't save path at external context.xml </li><li> Don't
  -     * generate docBase for host.appBase webapps <LI></ul>
  +     * Print Connector Values. <ul><li> Spezial handling to default jkHome.
  +     * </li><li> Don't save catalina.base path at server.xml</li><li></ul>
        * 
        * @see 
org.apache.catalina.config.StoreAppender#isPrintValue(java.lang.Object,
        *      java.lang.Object, java.lang.String,
  
  
  
  1.2       +1 -1      
jakarta-tomcat-catalina/modules/storeconfig/test/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/storeconfig/test/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml 8 Jan 2005 11:14:07 -0000       1.1
  +++ build.xml 16 May 2005 18:34:31 -0000      1.2
  @@ -70,7 +70,7 @@
        <target name="test" depends="compile,genstore" description="Run unit 
tests">
                <delete dir="${test.results}" />
                <mkdir dir="${test.results}" />
  -             <junit fork="yes" failureProperty="test.failure">
  +             <junit fork="yes" failureProperty="test.failure" 
filtertrace="false" >
                        <jvmarg value="-Dcatalina.base=${basedir}" />
                        <jvmarg value="-Dcatalina.home=${catalina.home}" />
                        <jvmarg 
value="-Dlog4j.configuration=file:conf/log4j.xml" />
  
  
  
  1.2       +25 -12    
jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/ConnectorSFTest.java
  
  Index: ConnectorSFTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/ConnectorSFTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectorSFTest.java      8 Jan 2005 11:14:07 -0000       1.1
  +++ ConnectorSFTest.java      16 May 2005 18:34:31 -0000      1.2
  @@ -15,8 +15,10 @@
    */
   package org.apache.catalina.storeconfig;
   
  +import java.beans.IntrospectionException;
   import java.io.PrintWriter;
   import java.io.StringWriter;
  +import java.util.List;
   
   import junit.framework.TestCase;
   
  @@ -108,6 +110,22 @@
       }
   
       public void testSSL() throws Exception {
  +        setupSecureConnector();
  +        String aspectedResult = "<Connector" + LF.LINE_SEPARATOR
  +                + "    port=\"8443\"" + LF.LINE_SEPARATOR
  +                + "    scheme=\"https\"" + LF.LINE_SEPARATOR
  +                + "    secure=\"true\"" + LF.LINE_SEPARATOR
  +                + "    minSpareThreads=\"30\"" + LF.LINE_SEPARATOR
  +                + "    clientAuth=\"false\"" + LF.LINE_SEPARATOR
  +                + "    keystorePass=\"changeit\"" + LF.LINE_SEPARATOR
  +                + "    keystoreFile=\"conf/catalina.keystore\""
  +                + LF.LINE_SEPARATOR + "    maxSpareThreads=\"175\""
  +                + LF.LINE_SEPARATOR + "    sslProtocol=\"TLS\">"
  +                + LF.LINE_SEPARATOR + "</Connector>" + LF.LINE_SEPARATOR;
  +        check(aspectedResult);
  +    }
  +
  +    protected void setupSecureConnector() {
           connector.setPort(8443);
           connector.setProperty("minSpareThreads", "30");
           connector.setProperty("maxSpareThreads", "175");
  @@ -120,20 +138,15 @@
           connector.setProperty("sslProtocol", "TLS");
           connector.setProperty("keystoreFile", "conf/catalina.keystore");
           connector.setProperty("keystorePass", "changeit");
  -
  -        String aspectedResult = "<Connector" + LF.LINE_SEPARATOR
  -                + "    port=\"8443\"" + LF.LINE_SEPARATOR
  -                + "    scheme=\"https\"" + LF.LINE_SEPARATOR
  -                + "    secure=\"true\"" + LF.LINE_SEPARATOR
  -                + "    minSpareThreads=\"30\"" + LF.LINE_SEPARATOR
  -                + "    clientAuth=\"false\"" + LF.LINE_SEPARATOR
  -                + "    keystorePass=\"changeit\"" + LF.LINE_SEPARATOR
  -                + "    keystoreFile=\"conf/catalina.keystore\""
  -                + LF.LINE_SEPARATOR + "    maxSpareThreads=\"175\">"
  -                + LF.LINE_SEPARATOR + "</Connector>" + LF.LINE_SEPARATOR;
  -        check(aspectedResult);
       }
   
  +    public void testConnectorAppender() throws IntrospectionException {
  +        setupSecureConnector();
  +        ConnectorStoreAppender appender = 
(ConnectorStoreAppender)desc.getStoreFactory().getStoreAppender();
  +        List propertyList = appender.getPropertyKeys(connector);
  +        assertTrue(propertyList.contains("protocol"));   
  +    }
  +    
       public void testStoreEmpty() throws Exception {
           String aspectedResult = "<Connector>" + LF.LINE_SEPARATOR
                   + "</Connector>" + LF.LINE_SEPARATOR;
  
  
  
  1.4       +0 -1      
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StandardHostSFTest.java   15 Apr 2005 20:14:46 -0000      1.3
  +++ StandardHostSFTest.java   16 May 2005 18:34:31 -0000      1.4
  @@ -99,7 +99,6 @@
           String skippables[] = { "org.apache.catalina.core.StandardHostValve",
                   "org.apache.catalina.valves.CertificatesValve",
                   "org.apache.catalina.valves.ErrorReportValve",
  -                "org.apache.catalina.cluster.tcp.ReplicationValve",
                   "org.apache.catalina.valves.RequestListenerValve", };
           for (int i = 0; i < skippables.length; i++)
               valvedesc.addTransientChild(skippables[i]);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to