tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hari...@hyperreal.org
Subject cvs commit: jakarta-tomcat/src/shell runtest.sh
Date Fri, 15 Oct 1999 03:20:36 GMT
harishp     99/10/14 20:20:36

  Modified:    src/share/org/apache/tomcat/core Context.java
                        InterceptorException.java LifecycleInterceptor.java
                        RequestSecurityProvider.java
                        ServiceInterceptor.java ServletLoader.java
                        ServletWrapper.java
               src/share/org/apache/tomcat/net
                        DefaultServerSocketFactory.java
                        ServerSocketFactory.java
               src/share/org/apache/tomcat/server EndpointManager.java
                        HttpServer.java
               src/shell runtest.sh
  Log:
  Comments & warnings about the internal APIs used by J2EE.... These
  need to be factored into a couple of classes/interfaces at some-point
  in time...
  
  I have added warnings so that developers are aware of these *sensitive*
  classes APIs. I would like to discuss the changes with them before they
  make in into the tomcat workspace.
  
  Fixed a bug with loadOnStartup & JSPs a problem found while integrating
  tomcat with J2EE.
  
  I have also modified the runtest script to be more in line with the
  latest "moo" et. al.
  
  Revision  Changes    Path
  1.4       +18 -4     jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
  
  Index: Context.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Context.java	1999/10/14 23:57:33	1.3
  +++ Context.java	1999/10/15 03:20:25	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v 1.3
1999/10/14 23:57:33 akv Exp $
  - * $Revision: 1.3 $
  - * $Date: 1999/10/14 23:57:33 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v 1.4
1999/10/15 03:20:25 harishp Exp $
  + * $Revision: 1.4 $
  + * $Date: 1999/10/15 03:20:25 $
    *
    * ====================================================================
    *
  @@ -80,6 +80,11 @@
    * @author Harish Prabandham
    */
   
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
  +
   public class Context {
       
       private StringManager sm =
  @@ -920,8 +925,17 @@
   	        loadServlets.addElement(lse.nextElement());
   	    }
   	}
  +
  +        // Changed because this is exactly opposite of what we want....
  +        // Servlets were being loaded in the exact opposite order.
  +        // Priorities IMO, should start with 0.
  +        // Only System Servlets should be at 0 and rest of the servlets
  +        // should be +ve integers.
  +        // WARNING: Please do not change this without talking to:
  +        // harishp@eng.sun.com (J2EE impact)
  +	// for (int i = loadServlets.size() - 1; i >= 0; i--) {
   
  -	for (int i = loadServlets.size() - 1; i >= 0; i--) {
  +	for(int i = 0; i < loadServlets.size(); ++i) {
               String servletName = (String)loadServlets.elementAt(i);
   	    LookupResult result =
   	        container.lookupServletByName(servletName);
  
  
  
  1.2       +8 -3      jakarta-tomcat/src/share/org/apache/tomcat/core/InterceptorException.java
  
  Index: InterceptorException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/InterceptorException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InterceptorException.java	1999/10/09 00:30:10	1.1
  +++ InterceptorException.java	1999/10/15 03:20:25	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/InterceptorException.java,v
1.1 1999/10/09 00:30:10 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:30:10 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/InterceptorException.java,v
1.2 1999/10/15 03:20:25 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:25 $
    *
    * ====================================================================
    *
  @@ -70,6 +70,11 @@
    *
    * @author Harish Prabandham
    */
  +
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   
   public final class InterceptorException
   extends java.lang.Exception {
  
  
  
  1.2       +8 -5      jakarta-tomcat/src/share/org/apache/tomcat/core/LifecycleInterceptor.java
  
  Index: LifecycleInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/LifecycleInterceptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LifecycleInterceptor.java	1999/10/09 00:30:12	1.1
  +++ LifecycleInterceptor.java	1999/10/15 03:20:25	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/LifecycleInterceptor.java,v
1.1 1999/10/09 00:30:12 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:30:12 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/LifecycleInterceptor.java,v
1.2 1999/10/15 03:20:25 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:25 $
    *
    * ====================================================================
    *
  @@ -63,6 +63,7 @@
   
   
   package org.apache.tomcat.core;
  +import javax.servlet.Servlet;
   
   /**
    * For intercepting calls before & after the init() destroy()
  @@ -70,9 +71,11 @@
    *
    * @author Harish Prabandham
    */
  -
  -import javax.servlet.Servlet;
   
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   public interface LifecycleInterceptor {
       // called immediately before calling init() or destroy() method
   
  
  
  
  1.2       +7 -3      jakarta-tomcat/src/share/org/apache/tomcat/core/RequestSecurityProvider.java
  
  Index: RequestSecurityProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestSecurityProvider.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestSecurityProvider.java	1999/10/09 00:30:16	1.1
  +++ RequestSecurityProvider.java	1999/10/15 03:20:26	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestSecurityProvider.java,v
1.1 1999/10/09 00:30:16 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:30:16 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestSecurityProvider.java,v
1.2 1999/10/15 03:20:26 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:26 $
    *
    * ====================================================================
    *
  @@ -71,6 +71,10 @@
    * @author Harish Prabandham
    */
   
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   public interface RequestSecurityProvider {
       public boolean isUserInRole(Context context,
           HttpServletRequest req, String role);
  
  
  
  1.2       +7 -3      jakarta-tomcat/src/share/org/apache/tomcat/core/ServiceInterceptor.java
  
  Index: ServiceInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServiceInterceptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceInterceptor.java	1999/10/09 00:30:19	1.1
  +++ ServiceInterceptor.java	1999/10/15 03:20:26	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServiceInterceptor.java,v
1.1 1999/10/09 00:30:19 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:30:19 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServiceInterceptor.java,v
1.2 1999/10/15 03:20:26 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:26 $
    *
    * ====================================================================
    *
  @@ -74,6 +74,10 @@
    * @author Harish Prabandham
    */
   
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   public interface ServiceInterceptor {
       // called immediately before calling the service() method
   
  
  
  
  1.2       +9 -5      jakarta-tomcat/src/share/org/apache/tomcat/core/ServletLoader.java
  
  Index: ServletLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletLoader.java	1999/10/09 00:30:20	1.1
  +++ ServletLoader.java	1999/10/15 03:20:26	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletLoader.java,v
1.1 1999/10/09 00:30:20 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:30:20 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletLoader.java,v
1.2 1999/10/15 03:20:26 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:26 $
    *
    * ====================================================================
    *
  @@ -73,10 +73,14 @@
    * 
    * @author James Duncan Davidson [duncan@eng.sun.com]
    * @author James Todd [gonzo@eng.sun.com]
  + * @author Harish Prabandham
    */
   
  -class ServletLoader
  -extends ClassLoader {
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
  +class ServletLoader extends ClassLoader {
       private StringManager sm =
           StringManager.getManager(Constants.Package);
       private Container container;
  
  
  
  1.2       +23 -7     jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java
  
  Index: ServletWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletWrapper.java	1999/10/09 00:30:20	1.1
  +++ ServletWrapper.java	1999/10/15 03:20:26	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java,v
1.1 1999/10/09 00:30:20 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:30:20 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java,v
1.2 1999/10/15 03:20:26 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:26 $
    *
    * ====================================================================
    *
  @@ -81,6 +81,10 @@
    * @author Harish Prabandham
    */
   
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   class ServletWrapper {
   
       private StringManager sm =
  @@ -539,6 +543,11 @@
       }
   }
   
  +
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   abstract class InvocationHandler {
       protected Servlet servlet;
       protected Context context;
  @@ -557,9 +566,13 @@
       abstract void postInvoke(Object interceptor)
       throws InterceptorException;
   }
  +
   
  -abstract class LifecycleInvocationHandler
  -extends InvocationHandler {
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
  +abstract class LifecycleInvocationHandler extends InvocationHandler {
       LifecycleInvocationHandler(Context context, Servlet servlet) {
   	super(context, servlet);
       }
  @@ -575,8 +588,11 @@
       }
   }
   
  -class ServiceInvocationHandler
  -extends InvocationHandler {
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
  +class ServiceInvocationHandler extends InvocationHandler {
       private HttpServletRequestFacade request;
       private HttpServletResponseFacade response;
   
  
  
  
  1.2       +8 -3      jakarta-tomcat/src/share/org/apache/tomcat/net/DefaultServerSocketFactory.java
  
  Index: DefaultServerSocketFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/net/DefaultServerSocketFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultServerSocketFactory.java	1999/10/09 00:20:47	1.1
  +++ DefaultServerSocketFactory.java	1999/10/15 03:20:28	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/net/DefaultServerSocketFactory.java,v
1.1 1999/10/09 00:20:47 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:20:47 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/net/DefaultServerSocketFactory.java,v
1.2 1999/10/15 03:20:28 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:28 $
    *
    * ====================================================================
    *
  @@ -76,6 +76,11 @@
    */
   
   // Default implementation of server sockets.
  +
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   class DefaultServerSocketFactory extends ServerSocketFactory {
   
       DefaultServerSocketFactory () {
  
  
  
  1.2       +9 -3      jakarta-tomcat/src/share/org/apache/tomcat/net/ServerSocketFactory.java
  
  Index: ServerSocketFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/net/ServerSocketFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServerSocketFactory.java	1999/10/09 00:20:47	1.1
  +++ ServerSocketFactory.java	1999/10/15 03:20:29	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/net/ServerSocketFactory.java,v
1.1 1999/10/09 00:20:47 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:20:47 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/net/ServerSocketFactory.java,v
1.2 1999/10/15 03:20:29 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:29 $
    *
    * ====================================================================
    *
  @@ -92,6 +92,11 @@
    * @author Harish Prabandham
    */
   
  +
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   public abstract class ServerSocketFactory implements Cloneable {
   
       //
  @@ -184,3 +189,4 @@
           int backlog, InetAddress ifAddress)
       throws IOException, InstantiationException;
   }
  +
  
  
  
  1.2       +7 -3      jakarta-tomcat/src/share/org/apache/tomcat/server/EndpointManager.java
  
  Index: EndpointManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/server/EndpointManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EndpointManager.java	1999/10/09 00:20:48	1.1
  +++ EndpointManager.java	1999/10/15 03:20:31	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/server/EndpointManager.java,v
1.1 1999/10/09 00:20:48 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:20:48 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/server/EndpointManager.java,v
1.2 1999/10/15 03:20:31 harishp Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/10/15 03:20:31 $
    *
    * ====================================================================
    *
  @@ -80,6 +80,10 @@
    * @author Harish Prabandham
    */
   
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   public class EndpointManager {
   
       private StringManager sm =
  
  
  
  1.3       +8 -3      jakarta-tomcat/src/share/org/apache/tomcat/server/HttpServer.java
  
  Index: HttpServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/server/HttpServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpServer.java	1999/10/12 06:15:11	1.2
  +++ HttpServer.java	1999/10/15 03:20:33	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/server/HttpServer.java,v
1.2 1999/10/12 06:15:11 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 1999/10/12 06:15:11 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/server/HttpServer.java,v
1.3 1999/10/15 03:20:33 harishp Exp $
  + * $Revision: 1.3 $
  + * $Date: 1999/10/15 03:20:33 $
    *
    * ====================================================================
    *
  @@ -97,6 +97,11 @@
    *  and options.
    *  
    */
  +
  +//
  +// WARNING: Some of the APIs in this class are used by J2EE. 
  +// Please talk to harishp@eng.sun.com before making any changes.
  +//
   public class HttpServer implements Server {
       // XXX move to Constants
       public static final String VHOST_PORT="vhost_port";
  
  
  
  1.2       +11 -9     jakarta-tomcat/src/shell/runtest.sh
  
  Index: runtest.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/shell/runtest.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- runtest.sh	1999/10/09 00:20:56	1.1
  +++ runtest.sh	1999/10/15 03:20:35	1.2
  @@ -1,6 +1,6 @@
   #! /bin/sh
   #
  -# $Id: runtest.sh,v 1.1 1999/10/09 00:20:56 duncan Exp $
  +# $Id: runtest.sh,v 1.2 1999/10/15 03:20:35 harishp Exp $
   
   # Shell script to run test harness
    
  @@ -8,13 +8,15 @@
   port=8080
   test=testlist.txt
   
  -baseDir=../../dist/tomcat
  +baseDir=../../..
  +tomcatBuildDir=$baseDir/build/tomcat
  +toolsDir=$baseDir/jakarta-tools
   
  -jsdkJars=${baseDir}/webserver.jar:${baseDir}/lib/servlet.jar
  -jspJars=${baseDir}/lib/jasper.jar
  +jsdkJars=${tomcatBuildDir}/webserver.jar:${tomcatBuildDir}/lib/servlet.jar
  +jspJars=${tomcatBuildDir}/lib/jasper.jar
   beanJars=
  -miscJars=${baseDir}/lib/xml.jar:./lib/moo.jar
  -appJars=${jsdkJars}:${jspJars}:${miscJars}
  +miscJars=${toolsDir}/projectx-tr2.jar:${toolsDir}/moo.jar
  +appJars=${jsdkJars}:${jspJars}:${miscJars}:${tomcatBuildDir}/classes
   sysJars=${JAVA_HOME}/lib/tools.jar
   
   appClassPath=./classes:${appJars}
  @@ -31,11 +33,11 @@
   echo Using classpath: ${CLASSPATH}
   echo
   
  -java org.apache.tomcat.shell.Startup $* &
  +java org.apache.tomcat.shell.Startup "$@" &
   sleep 5
  -java -Dtest.hostname=$host -Dtest.port=$port com.sun.moo.Main \
  +java -Dtest.hostname=$host -Dtest.port=$port org.apache.tools.moo.Main \
       -testfile $test -debug
  -java org.apache.tomcat.shell.Shutdown $*
  +java org.apache.tomcat.shell.Shutdown "$@"
   
   if [ "$cp" != "" ]; then
       CLASSPATH=${cp}
  
  
  

Mime
View raw message