tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core Handler.java
Date Sun, 10 Sep 2000 21:41:09 GMT
larryi      00/09/10 14:41:09

  Modified:    src/facade22/org/apache/tomcat/facade ServletWrapper.java
               src/share/org/apache/tomcat/context
                        LoadOnStartupInterceptor.java
               src/share/org/apache/tomcat/core Handler.java
  Log:
  Update to handle <load-on-startup></load-on-startup> and
  <load-on-startup>0</load-on-startup>
  
  Revision  Changes    Path
  1.3       +8 -5      jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletWrapper.java
  
  Index: ServletWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletWrapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServletWrapper.java	2000/08/23 06:53:05	1.2
  +++ ServletWrapper.java	2000/09/10 21:41:04	1.3
  @@ -124,16 +124,19 @@
       // -------------------- Servlet specific properties 
       public void setLoadOnStartUp( int level ) {
   	loadOnStartup=level;
  +	// here setting a level implies loading
  +	loadingOnStartup=true;
       }
   
       public void setLoadOnStartUp( String level ) {
  -	loadOnStartup=new Integer(level).intValue();
  +	if (level.length() > 0)
  +	    loadOnStartup=new Integer(level).intValue();
  +	else
  +	    loadOnStartup=-1;
  +	// here setting a level implies loading
  +	loadingOnStartup=true;
       }
   
  -    public int getLoadOnStartUp() {
  -	return loadOnStartup;
  -    }
  -    
       void setReloadable(boolean reloadable) {
   	isReloadable = reloadable;
       }
  
  
  
  1.22      +2 -3      jakarta-tomcat/src/share/org/apache/tomcat/context/LoadOnStartupInterceptor.java
  
  Index: LoadOnStartupInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/context/LoadOnStartupInterceptor.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- LoadOnStartupInterceptor.java	2000/08/23 06:53:06	1.21
  +++ LoadOnStartupInterceptor.java	2000/09/10 21:41:04	1.22
  @@ -177,9 +177,8 @@
   	while(enum.hasMoreElements()) {
   	    String name=(String)enum.nextElement();
   	    Handler sw= ctx.getServletByName( name );
  -	    int i=sw.getLoadOnStartUp();
  -	    Integer level=new Integer(i);
  -	    if( i!= 0) {
  +	    if( sw.getLoadingOnStartUp() ) {
  +		Integer level=new Integer(sw.getLoadOnStartUp());
   		Vector v;
   		if( loadableServlets.get(level) != null ) 
   		    v=(Vector)loadableServlets.get(level);
  
  
  
  1.13      +15 -6     jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java
  
  Index: Handler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Handler.java	2000/08/27 20:37:29	1.12
  +++ Handler.java	2000/09/10 21:41:08	1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java,v 1.12
2000/08/27 20:37:29 costin Exp $
  - * $Revision: 1.12 $
  - * $Date: 2000/08/27 20:37:29 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java,v 1.13
2000/09/10 21:41:08 larryi Exp $
  + * $Revision: 1.13 $
  + * $Date: 2000/09/10 21:41:08 $
    *
    * ====================================================================
    *
  @@ -103,7 +103,7 @@
   	cases
       */
       public static final int ORIGIN_DYNAMIC=3;
  -    /** The servlet was added by the admin, it should be safed
  +    /** The servlet was added by the admin, it should be saved
   	preferably in web.xml
       */
       public static final int ORIGIN_ADMIN=4;
  @@ -114,7 +114,8 @@
       protected String path;
       protected String servletClassName;
       protected String servletName;
  -    protected int loadOnStartup;
  +    protected int loadOnStartup=-1;
  +    protected boolean loadingOnStartup=false;
       
       // Debug
       protected int debug=0;
  @@ -177,6 +178,14 @@
   	return loadOnStartup;
       }
   
  +    public void setLoadingOnStartUp( boolean load ) {
  +	loadingOnStartup=load;
  +    }
  +
  +    public boolean getLoadingOnStartUp() {
  +	return loadingOnStartup;
  +    }
  +
       // -------------------- Jsp specific code
       
       public String getPath() {
  @@ -357,7 +366,7 @@
   
       // -------------------- Accounting --------------------
   
  -    /** ServletWrapper counts. The accounting desing is not
  +    /** ServletWrapper counts. The accounting design is not
   	final, but all this is needed to tune up tomcat
   	( and to understand and be able to implement a good
   	solution )
  
  
  

Mime
View raw message