nacho       01/10/21 08:43:04

  Modified:    src/share/org/apache/tomcat/modules/config BaseJkConfig.java
  Log:
  Fix: regenerarion of auto config file was triggered by context reloads..
  now is only triggered when "jkconf" is present command line option
  
  Revision  Changes    Path
  1.7       +14 -8     
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/BaseJkConfig.java
  
  Index: BaseJkConfig.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/BaseJkConfig.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BaseJkConfig.java 2001/10/08 05:27:18     1.6
  +++ BaseJkConfig.java 2001/10/21 15:43:04     1.7
  @@ -1,4 +1,4 @@
  -/* $Id: BaseJkConfig.java,v 1.6 2001/10/08 05:27:18 larryi Exp $
  +/* $Id: BaseJkConfig.java,v 1.7 2001/10/21 15:43:04 nacho Exp $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -121,7 +121,7 @@
       <p>
       @author Costin Manolache
       @author Larry Isaacs
  -     @version $Revision: 1.6 $
  +     @version $Revision: 1.7 $
    */
   public class BaseJkConfig  extends BaseInterceptor { 
       protected File configHome = null;
  @@ -136,7 +136,7 @@
   
       protected String tomcatHome;
       protected boolean regenerate=false;
  -    
  +
       // -------------------- Tomcat callbacks --------------------
   
       public void addInterceptor( ContextManager cm,
  @@ -150,7 +150,7 @@
            //???           cm.setNote("nostart", this );
        }
       }
  -     
  +
       // Auto-config should be able to react to dynamic config changes,
       // and regenerate the config.
   
  @@ -179,14 +179,20 @@
               // a context has been added after the server was started.
               // regenerate the config ( XXX send a restart signal to
               // the server )
  -            execute( cm );
  +            // Generate the config only if "regenerate" property is
  +            // set on the module or if an explicit "jkconf" option has
  +            // been set on context manager.
  +            if( regenerate ||
  +                cm.getProperty("jkconf") !=null) {
  +                    execute( cm );
  +            }
           }
       }
   
       /** Generate configuration files.  Override with method to generate
           web server specific configuration.
        */
  -    public void execute(ContextManager cm) throws TomcatException 
  +    public void execute(ContextManager cm) throws TomcatException
       {
       }
   
  @@ -196,7 +202,7 @@
       /** If false, we'll try to generate a config that will
        *  let apache serve static files.
        *  The default is true, forward all requests in a context
  -     *  to tomcat. 
  +     *  to tomcat.
        */
       public void setForwardAll( boolean b ) {
           forwardAll=b;
  @@ -257,7 +263,7 @@
       public void setJkLog(String path){
           jkLog= ( path==null?null:new File(path));
       }
  -    
  +
       /** Set the verbosity level
           ( use debug, error, etc. ) If not set, no log is written.
        */
  
  
  


Reply via email to