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-connectors/jk/java/org/apache/jk/server JkMain.java
Date Wed, 06 Feb 2002 20:33:54 GMT
costin      02/02/06 12:33:54

  Modified:    jk/java/org/apache/jk/common ChannelSocket.java
               jk/java/org/apache/jk/server JkMain.java
  Log:
  Set the default port, improve the arg parsing for JkMain ( used for debugging
   and tunning mostly, but since a lot of time is spent on that it should be nice )
  
  Revision  Changes    Path
  1.5       +1 -1      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java
  
  Index: ChannelSocket.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ChannelSocket.java	6 Feb 2002 17:43:08 -0000	1.4
  +++ ChannelSocket.java	6 Feb 2002 20:33:54 -0000	1.5
  @@ -96,7 +96,7 @@
    */
   public class ChannelSocket extends Channel {
   
  -    int port;
  +    int port=8009;
       InetAddress inet;
       int serverTimeout;
       boolean tcpNoDelay;
  
  
  
  1.11      +12 -6     jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java
  
  Index: JkMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JkMain.java	6 Feb 2002 20:24:45 -0000	1.10
  +++ JkMain.java	6 Feb 2002 20:33:54 -0000	1.11
  @@ -130,6 +130,10 @@
           wEnv.setJkHome(s);
       }
   
  +    public void setDebug( int i ) {
  +        dL=i;
  +        d("set debug " + i );
  +    }
       
       // -------------------- Initialization --------------------
       
  @@ -173,9 +177,10 @@
           String workers=props.getProperty( "handler.list",
                                             "channel,request,container" );
           Vector workerNamesV= split( workers, ",");
  -
  +        if( dL > 0 ) d("workers: " + workers + " " + workerNamesV.size() );
           for( int i=0; i<workerNamesV.size(); i++ ) {
               String name= (String)workerNamesV.elementAt( i );
  +            if( dL > 0 ) d("Configuring " + name );
               JkHandler w=wEnv.getHandler( name );
               if( w==null )
                   w=(JkHandler)newInstance( "handler", name, null );
  @@ -232,8 +237,9 @@
               if( args.length == 1 &&
                   ( "-?".equals(args[0]) || "-h".equals( args[0])) ) {
                   System.out.println("Usage: ");
  -                System.out.println("  JkMain [workers.properties]");
  +                System.out.println("  JkMain [args]");
                   System.out.println();
  +                System.out.println("  Each bean setter corresponds to an arg ( like -debug
10 )");
                   System.out.println("  System properties:");
                   System.out.println("    jk2.home    Base dir of jk2");
                   return;
  @@ -241,11 +247,11 @@
   
               JkMain jkMain=new JkMain();
   
  +            IntrospectionUtils.processArgs( jkMain, args, new String[] {},
  +                                            null, new Hashtable());
  +
               jkMain.guessHome();
               
  -            if( args.length > 0  ) 
  -                jkMain.setPropertiesFile(args[0]);
  -            
               jkMain.init();
               jkMain.start();
           } catch( Exception ex ) {
  @@ -312,7 +318,7 @@
           }
       }
       
  -    private static final int dL=0;
  +    private static int dL=0;
       private static void d(String s ) {
           System.err.println( "JkMain: " + s );
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message