billbarker    2004/02/14 18:08:42

  Modified:    src/share/org/apache/tomcat/startup EmbededTomcat.java
  Log:
  Add a command line option to specify the 'modules.xml' file.
  
  Fix for bug #8634
  
  Revision  Changes    Path
  1.68      +13 -0     
jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java
  
  Index: EmbededTomcat.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- EmbededTomcat.java        12 Feb 2004 08:24:03 -0000      1.67
  +++ EmbededTomcat.java        15 Feb 2004 02:08:41 -0000      1.68
  @@ -156,6 +156,7 @@
       boolean help;
       boolean blocking=false;
   
  +    String modulesFile = null;
       // prevent tomcat from starting.
       boolean nostart=false;
       
  @@ -220,6 +221,14 @@
        attributes.put("config", s);
       }
   
  +    /**
  +     * Set the location of the <code>modules.xml</code> file, to be used by
  +     * ServXml reader.  <code>-modulesFile foo</code> on the command line.
  +     */
  +    public void setModulesFile(String mf) {
  +     modulesFile = mf;
  +    }
  +
       /** Tomcat will run in a sandboxed environment, under SecurityManager.
        *  "-sandbox" on the command line
        */
  @@ -412,6 +421,10 @@
        if( null!=conf ) {
            if( dL>0) debug( "Using config file " + conf);
            setModuleProperty( mid, "config",conf );
  +     }
  +     if( null != modulesFile ) {
  +            if( dL > 0 ) debug("Using modules file " + modulesFile);
  +         setModuleProperty(mid,"moduleConfig", modulesFile);
        }
       }
   
  
  
  

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

Reply via email to