tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/config AutoSetup.java
Date Thu, 01 Feb 2001 07:09:24 GMT
costin      01/01/31 23:09:24

  Modified:    src/share/org/apache/tomcat/modules/config AutoSetup.java
  Log:
  - removed Larry's patch ( the context shouldn't be initialized when
  AutoSetup.engineInit is called - expanding the wars and adding webapps
  is part of the server configuration, and before we have a fully configured
  server we can't proceed with context initialization )
  
  - don't call context.init in AutoSetup - it's not going to be executed
  anyway ( since the server is not yet fully configured )
  
  Revision  Changes    Path
  1.6       +14 -14    jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoSetup.java
  
  Index: AutoSetup.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoSetup.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AutoSetup.java	2001/02/01 05:17:59	1.5
  +++ AutoSetup.java	2001/02/01 07:09:23	1.6
  @@ -121,7 +121,7 @@
   		    // Expand war file
   		    try {
   			FileUtil.expand(home + "/webapps/" + name,
  -			       home + "/webapps/" + fname);
  +					home + "/webapps/" + fname);
                           expanded=true;
   		    } catch( IOException ex) {
   			log("expanding webapp " + name, ex);
  @@ -131,12 +131,7 @@
   		// we will add the directory to the path
   		name=fname;
   	    }
  -
  -	    // XXX XXX Add a .xml case
  -	    // If a "path.xml" file is found in webapps/, it will be loaded
  -	    // as a <context> fragment ( what will allow setting options
  -	    // for contexts or automatic config for contexts with different base)
  -
  +	    
   	    // Decode path
   
   	    // Path will be based on the War name
  @@ -149,6 +144,9 @@
   
   	    Context ctx = (Context)definedContexts.get(path);
   	    // if context is defined and was expanded
  +	    /* Not needed any more - the context are expanded and added
  +	       during server configuration, init and context config is done later,
  +	       after the server is stable
   	    if( ctx != null && expanded ) {
   		// we need to reload the context since it was initialized
   		// before its directories existed. At minimum, its classloader
  @@ -166,7 +164,8 @@
   		    ctx=null;
   		}
   	    }
  -
  +	    */
  +	    
               // if context not defined
   	    if( ctx  == null ) {
   		// if no explicit set up and is a directory
  @@ -184,13 +183,14 @@
   		    if( debug > 0 )
   			log("automatic add " + ctx.toString() + " " + path);
   		    cm.addContext(ctx);
  -		    ctx.init();
  -		} else {
  -		    if( debug>0)
  -			log("Already set up: " + path + " "
  -				+ definedContexts.get(path));
  +		    // no init -  the manager is not initailized itself
  +		    // ctx.init();
   		}
  -            }
  +	    } else {
  +		if( debug>0)
  +		    log("Already set up: " + path + " "
  +			+ definedContexts.get(path));
  +	    }
   	}
       }
   }
  
  
  

Mime
View raw message