You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/05/03 19:36:46 UTC

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_endpoint.h jk_env.h jk_msg.h jk_worker.h

costin      02/05/03 10:36:46

  Modified:    jk/native2/include jk_endpoint.h jk_env.h jk_msg.h
                        jk_worker.h
  Log:
  Added 'reqCnt' and 'errCnt' and reorganize the worker struct.
  
  Few minor improvements (debug for env to filter out the low level messages),
  
  Revision  Changes    Path
  1.12      +3 -1      jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h
  
  Index: jk_endpoint.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- jk_endpoint.h	23 Mar 2002 16:52:18 -0000	1.11
  +++ jk_endpoint.h	3 May 2002 17:36:46 -0000	1.12
  @@ -61,7 +61,7 @@
    * Author:      Gal Shachor <sh...@il.ibm.com>                           
    * Author:      Dan Milstein <da...@shore.net>                            
    * Author:      Henri Gomez <hg...@slib.fr>                               
  - * Version:     $Revision: 1.11 $                                          
  + * Version:     $Revision: 1.12 $                                          
    ***************************************************************************/
   
   #ifndef JK_ENDPOINT_H
  @@ -85,6 +85,8 @@
   struct jk_map;
   typedef struct jk_endpoint   jk_endpoint_t;
   
  +/* XXX replace worker with channel, endpoints are specific to channels not workers */
  +    
   /*
    * The endpoint 'class', which represents one end of a connection to the
    * servlet engine.  Basically, supports nothing other than forwarding the
  
  
  
  1.14      +1 -0      jakarta-tomcat-connectors/jk/native2/include/jk_env.h
  
  Index: jk_env.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_env.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_env.h	25 Apr 2002 18:37:44 -0000	1.13
  +++ jk_env.h	3 May 2002 17:36:46 -0000	1.14
  @@ -306,6 +306,7 @@
       struct jk_objCache *envCache; 
       struct jk_exception *lastException;
       int id;
  +    int debug;
   };
   
   void JK_METHOD jk2_registry_init(jk_env_t *env);
  
  
  
  1.7       +10 -6     jakarta-tomcat-connectors/jk/native2/include/jk_msg.h
  
  Index: jk_msg.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_msg.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_msg.h	2 May 2002 03:13:05 -0000	1.6
  +++ jk_msg.h	3 May 2002 17:36:46 -0000	1.7
  @@ -146,7 +146,7 @@
                            const char *param);
   
       int (*appendMap)(struct jk_env *env, struct jk_msg *_this, 
  -                     struct jk_map map);
  +                     struct jk_map *map);
   
       unsigned char (*getByte)(struct jk_env *env, struct jk_msg *_this);
   
  @@ -165,18 +165,22 @@
       unsigned char *(*getString)(struct jk_env *env, struct jk_msg *_this);
   
       /** Return a byte[] and it's length.
  -        The buffer is internal to the message, you must save
  -        or make sure the message lives long enough.
  +     *  The buffer is internal to the message, you must save
  +     * or make sure the message lives long enough.
        */ 
       unsigned char *(*getBytes)(struct jk_env *env,
                                  struct jk_msg *_this,
                                  int *len);
   
       /** Read a map structure from the message. The map is encoded
  -        as an int count and then the NV pairs
  -    */
  +     *  as an int count and then the NV pairs.
  +     *
  +     *  The content will not be copied - but point to the msg's buffer.
  +     *  If you want to use the map after the msg becomes invalid, you need
  +     *  to copy it.
  +     */
       int (*getMap)(struct jk_env *env, struct jk_msg *_this, 
  -                  struct jk_map map);
  +                  struct jk_map *map);
   
       /** 
        * Special method. Will read data from the server and add them as
  
  
  
  1.17      +30 -18    jakarta-tomcat-connectors/jk/native2/include/jk_worker.h
  
  Index: jk_worker.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_worker.h	25 Apr 2002 18:43:29 -0000	1.16
  +++ jk_worker.h	3 May 2002 17:36:46 -0000	1.17
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Workers controller header file                             *
    * Author:      Gal Shachor <sh...@il.ibm.com>                           * 
  - * Version:     $Revision: 1.16 $                                           *
  + * Version:     $Revision: 1.17 $                                           *
    ***************************************************************************/
   
   #ifndef JK_WORKER_H
  @@ -128,16 +128,7 @@
       
       struct jk_workerEnv *workerEnv;
       
  -    /** The id of the tomcat instance we connect to. We may have multiple
  -        workers connecting to a single tomcat. If no route is defined,
  -        the worker name will be the route name. The route can be the
  -        name of another worker. 
  -     */
  -    char *route;
  -
  -    /** Pool for worker specific informations.
  -        In future we may start/stop/reload workers at runtime, but that's
  -        far away
  +    /** Pool for worker specific informations. XXX to be removed, is duplicated
       */
       struct jk_pool *pool;
   
  @@ -165,6 +156,25 @@
       /* Private key used to connect to the remote side2.*/
       char * secret;
   
  +    /* -------------------- Information used for load balancing ajp workers -------------------- */
  +
  +    /* Worker is in gracefull shutdown
  +     */
  +    int  disabled;
  +    
  +    /** The id of the tomcat instance we connect to. We may have multiple
  +        workers connecting to a single tomcat. If no route is defined,
  +        the worker name will be the route name. The route can be the
  +        name of another worker. 
  +     */
  +    char *route;
  +
  +    int reqCnt;
  +    int errCnt;
  +    
  +    /** lb groups in which this worker belongs */
  +    struct jk_map *groups;
  +
       /* Each worker can be part of a load-balancer scheme.
        * The information can be accessed by other components -
        * for example to report status, etc.
  @@ -175,17 +185,18 @@
       int     in_recovering;
       int     retry_count;
       time_t  error_time;
  -    /** Last exception recorded on this worker, the reason for
  -     *  which this worker is in error state and can't perform.
  -     */
  -    struct jk_exception *lastError;
   
  -    /* 'Version' or generation. Used to update the workers dynamically
  -       at runtime */
  -    int     ver;
  +    
  +    /* -------------------- Information for reconfiguration -------------------- */
  +    
       /* Only one thread can update the config
        */
       JK_CRIT_SEC cs;
  +    /* 'Version' or generation. Used to update the workers dynamically
  +       at runtime */
  +    int     ver;
  +
  +    /* -------------------- Information specific to the lb worker -------------------- */
   
       /** For load balancing workers
        */
  @@ -196,6 +207,7 @@
       int lb_workers_size;
       int num_of_workers;
   
  +    /* -------------------- Methods supported by all workers -------------------- */
       /*
        * Do whatever initialization needs to be done to start this worker up.
        * Configuration options are passed in via the props parameter.  
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>