cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h jk_worker.h jk_vm.h jk_uriMap.h jk_uriEnv.h jk_shm.h jk_service.h jk_requtil.h jk_pool.h jk_objCache.h jk_mutex.h jk_msg.h jk_md5.h jk_map.h jk_logger.h jk_handler.h jk_global.h jk_env.h jk_endpoint.h jk_config.h jk_channel.h jk_bean.h

2004-03-21 Thread mturk
mturk   2004/03/21 01:39:58

  Modified:jk/native2/include jk_workerEnv.h jk_worker.h jk_vm.h
jk_uriMap.h jk_uriEnv.h jk_shm.h jk_service.h
jk_requtil.h jk_pool.h jk_objCache.h jk_mutex.h
jk_msg.h jk_md5.h jk_map.h jk_logger.h jk_handler.h
jk_global.h jk_env.h jk_endpoint.h jk_config.h
jk_channel.h jk_bean.h
  Log:
  Apply the Apache-wide conding style.
  See http://www.apache.org/dev/styleguide.html for details.
  
  Revision  ChangesPath
  1.33  +161 -158  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h.diff?r1=1.32r2=1.33
  
  
  1.37  +117 -115  jakarta-tomcat-connectors/jk/native2/include/jk_worker.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h.diff?r1=1.36r2=1.37
  
  
  1.8   +10 -9 jakarta-tomcat-connectors/jk/native2/include/jk_vm.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_vm.h.diff?r1=1.7r2=1.8
  
  
  1.20  +53 -52jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h.diff?r1=1.19r2=1.20
  
  
  1.22  +89 -87jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h.diff?r1=1.21r2=1.22
  
  
  1.11  +75 -67jakarta-tomcat-connectors/jk/native2/include/jk_shm.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_shm.h.diff?r1=1.10r2=1.11
  
  
  1.24  +196 -192  jakarta-tomcat-connectors/jk/native2/include/jk_service.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_service.h.diff?r1=1.23r2=1.24
  
  
  1.11  +33 -34jakarta-tomcat-connectors/jk/native2/include/jk_requtil.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_requtil.h.diff?r1=1.10r2=1.11
  
  
  1.12  +52 -45jakarta-tomcat-connectors/jk/native2/include/jk_pool.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_pool.h.diff?r1=1.11r2=1.12
  
  
  1.11  +33 -29jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h.diff?r1=1.10r2=1.11
  
  
  1.7   +31 -26jakarta-tomcat-connectors/jk/native2/include/jk_mutex.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_mutex.h.diff?r1=1.6r2=1.7
  
  
  1.17  +87 -87jakarta-tomcat-connectors/jk/native2/include/jk_msg.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_msg.h.diff?r1=1.16r2=1.17
  
  
  1.4   +13 -10jakarta-tomcat-connectors/jk/native2/include/jk_md5.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_md5.h.diff?r1=1.3r2=1.4
  
  
  1.19  +56 -57jakarta-tomcat-connectors/jk/native2/include/jk_map.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_map.h.diff?r1=1.18r2=1.19
  
  
  1.11  +38 -41jakarta-tomcat-connectors/jk/native2/include/jk_logger.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_logger.h.diff?r1=1.10r2=1.11
  
  
  1.10  +34 -31jakarta-tomcat-connectors/jk/native2/include/jk_handler.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_handler.h.diff?r1=1.9r2=1.10
  
  
  1.23  +100 -99   jakarta-tomcat-connectors/jk/native2/include/jk_global.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_global.h.diff?r1=1.22r2=1.23
  
  
  1.24  +95 -87jakarta-tomcat-connectors/jk/native2/include/jk_env.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_env.h.diff?r1=1.23r2=1.24
  
  
  1.21  +92 -89jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h.diff?r1=1.20r2=1.21
  
  
  1.12  +65 -59jakarta-tomcat-connectors/jk/native2/include/jk_config.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_config.h.diff?r1=1.11r2=1.12
  
  
  1.21  +71 -63jakarta-tomcat-connectors/jk/native2/include/jk_channel.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_channel.h.diff?r1=1.20r2=1.21
  
  
  1.11  +88 -81jakarta-tomcat-connectors/jk/native2/include/jk_bean.h
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/jk/native2/include/jk_bean.h.diff?r1=1.10r2=1.11
  
  

-
To 

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2004-03-15 Thread mturk
mturk   2004/03/15 03:53:15

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Removed the childGeneration checking
  
  Revision  ChangesPath
  1.32  +0 -1  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- jk_workerEnv.h13 Mar 2004 08:46:26 -  1.31
  +++ jk_workerEnv.h15 Mar 2004 11:53:15 -  1.32
  @@ -122,7 +122,6 @@
   */
   int childId;
   int childProcessId;
  -int childGeneration;
   /* maximum configured number of child processes */
   int maxDaemons;
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2004-03-13 Thread mturk
mturk   2004/03/13 00:46:26

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Add the maxDaemons to the workerEnv struct.
  So we can know if we are inside single or muti child server.
  
  Revision  ChangesPath
  1.31  +3 -1  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- jk_workerEnv.h24 Feb 2004 08:44:39 -  1.30
  +++ jk_workerEnv.h13 Mar 2004 08:46:26 -  1.31
  @@ -123,6 +123,8 @@
   int childId;
   int childProcessId;
   int childGeneration;
  +/* maximum configured number of child processes */
  +int maxDaemons;
   
   struct jk_env *globalEnv;
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h jk_worker.h jk_vm.h jk_uriMap.h jk_uriEnv.h jk_shm.h jk_service.h jk_requtil.h jk_pool.h jk_objCache.h jk_mutex.h jk_map.h jk_logger.h jk_handler.h jk_global.h jk_env.h jk_endpoint.h jk_config.h jk_channel.h jk_bean.h

2003-02-03 Thread mturk
mturk   2003/02/03 23:40:33

  Modified:jk/native2/include jk_workerEnv.h jk_worker.h jk_vm.h
jk_uriMap.h jk_uriEnv.h jk_shm.h jk_service.h
jk_requtil.h jk_pool.h jk_objCache.h jk_mutex.h
jk_map.h jk_logger.h jk_handler.h jk_global.h
jk_env.h jk_endpoint.h jk_config.h jk_channel.h
jk_bean.h
  Log:
  Update license to 2003.
  
  Revision  ChangesPath
  1.28  +2 -2  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- jk_workerEnv.h26 Oct 2002 12:41:29 -  1.27
  +++ jk_workerEnv.h4 Feb 2003 07:40:32 -   1.28
  @@ -2,7 +2,7 @@
*   *
* The Apache Software License,  Version 1.1 *
*   *
  - *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
  + *  Copyright (c) 1999-2003 The Apache Software Foundation.  *
*   All rights reserved.*
*   *
* = *
  
  
  
  1.29  +2 -2  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.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- jk_worker.h   18 Oct 2002 15:21:01 -  1.28
  +++ jk_worker.h   4 Feb 2003 07:40:32 -   1.29
  @@ -2,7 +2,7 @@
*   *
* The Apache Software License,  Version 1.1 *
*   *
  - *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
  + *  Copyright (c) 1999-2003 The Apache Software Foundation.  *
*   All rights reserved.*
*   *
* = *
  
  
  
  1.6   +1 -1  jakarta-tomcat-connectors/jk/native2/include/jk_vm.h
  
  Index: jk_vm.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_vm.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_vm.h   15 Oct 2002 13:59:28 -  1.5
  +++ jk_vm.h   4 Feb 2003 07:40:32 -   1.6
  @@ -2,7 +2,7 @@
*   *
* The Apache Software License,  Version 1.1 *
*   *
  - *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
  + *  Copyright (c) 1999-2003 The Apache Software Foundation.  *
*   All rights reserved.*
*   *
* = *
  
  
  
  1.18  +1 -1  jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h
  
  Index: jk_uriMap.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- jk_uriMap.h   15 Oct 2002 12:15:51 -  1.17
  +++ jk_uriMap.h   4 Feb 2003 07:40:32 -   1.18
  @@ -2,7 +2,7 @@
*   *
* The Apache Software License,  Version 1.1 *
*   *
  - *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
  + *  Copyright (c) 1999-2003 The Apache Software Foundation.  *
*   All rights reserved.*
*   *
* 

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2002-10-26 Thread mturk
mturk   2002/10/26 05:41:29

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Add the childGeneration variable to the worken env that is
  readed from scoreboard for multiprocess servers, and gives the
  child generation number. This is used to prevent the initialization if
  the jvm fails with killing its own process.
  
  Revision  ChangesPath
  1.27  +2 -1  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- jk_workerEnv.h31 May 2002 17:49:07 -  1.26
  +++ jk_workerEnv.h26 Oct 2002 12:41:29 -  1.27
   -160,6 +160,7 
   */
   int childId;
   int childProcessId;
  +int childGeneration;
   
   struct jk_env *globalEnv;
   
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2002-05-23 Thread costin

costin  02/05/23 21:35:17

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Added the dispatch code for mutex.
  
  As mentioned in the comment, a dynamic mechanism to handle IDs and
  allow use of names must be added ( someday ). Unless we switch to
  XPCOM or a similar object model first.
  
  At this moment I don't have any urge to compile IDLs, and the
  overhead seems too big, we can still keep it simple.
  
  Revision  ChangesPath
  1.23  +6 -3  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- jk_workerEnv.h16 May 2002 20:49:53 -  1.22
  +++ jk_workerEnv.h24 May 2002 04:35:17 -  1.23
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.22 $   *
  + * Version: $Revision: 1.23 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -118,11 +118,14 @@
   /* Dispatcher for jni channel ( JNI - web server ) */
   #define JK_HANDLE_JNI_DISPATCH 0x15
   
  -/* Dispatcher for shm ( JNI - web server ) */
  +/* Dispatcher for shm object ( java-C) */
   #define JK_HANDLE_SHM_DISPATCH 0x16
   
  -/* Dispatcher for unix socket channel ( JNI - web server ) */
  +/* Dispatcher for unix socket channel ( java-C )*/
   #define JK_HANDLE_UN_DISPATCH 0x17
  +
  +/* Dispatcher for mutex object  ( java-C ) */
  +#define JK_HANDLE_MUTEX_DISPATCH 0x18
   
   
   /*
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2002-04-25 Thread costin

costin  02/04/25 11:44:41

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Simplified the registration of ajp handlers.
  
  Moved the hadnler definition to workerEnv. We'll eventually move to
  a dynamic mechanism ( instead of hardcoded values ), but later.
  
  Revision  ChangesPath
  1.16  +40 -3 jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_workerEnv.h11 Apr 2002 19:28:01 -  1.15
  +++ jk_workerEnv.h25 Apr 2002 18:44:37 -  1.16
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.15 $   *
  + * Version: $Revision: 1.16 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -92,6 +92,39 @@
   struct jk_handler;
   struct jk_ws_service;
   
  +/* Temporary hardcoded handler IDs. Will be replaced with a name based dynamic 
mechanism */
  +
  +/* Write a body chunk from the servlet container to the web server */
  +#define JK_HANDLE_AJP13_SEND_BODY_CHUNK3
  +
  +/* Send response headers from the servlet container to the web server. */
  +#define JK_HANDLE_AJP13_SEND_HEADERS   4
  +
  +/* Marks the end of response. */
  +#define JK_HANDLE_AJP13_GET_BODY_CHUNK 6
  +
  +/*  Marks the end of response. */
  +#define JK_HANDLE_AJP13_END_RESPONSE   5
  +
  +/* Second Login Phase (servlet engine - web server), md5 seed is received */
  +#define JK_HANDLE_LOGON_SEED 0x11
  +
  +/* Login Accepted (servlet engine - web server) */
  +#define JK_HANDLE_LOGON_OK   0x13
  +
  +/* Login Rejected (servlet engine - web server) */
  +#define JK_HANDLE_LOGON_ERR  0x14
  +
  +/* Dispatcher for jni channel ( JNI - web server ) */
  +#define JK_HANDLE_JNI_DISPATCH 0x15
  +
  +/* Dispatcher for shm ( JNI - web server ) */
  +#define JK_HANDLE_SHM_DISPATCH 0x16
  +
  +/* Dispatcher for apr channel ( JNI - web server ) */
  +#define JK_HANDLE_CHANNELAPR_DISPATCH 0x17
  +
  +
   /*
* Jk configuration and global methods. 
* 
  @@ -215,9 +248,13 @@
   
   /*  Methods  */
   
  +/* Register a callback handler, for methods from java to C
  + */
   int (*registerHandler)(struct jk_env *env,
  struct jk_workerEnv *_this,
  -   struct jk_handler *h);
  +   const char *type, const char *name, int id,
  +   jk_handler_callback callback,
  +   char *signature);
   
   
   int (*addWorker)(struct jk_env *env,
  @@ -234,7 +271,7 @@
   /** Call the handler associated with the message type.
*/
   int (*dispatch)(struct jk_env *env, struct jk_workerEnv *_this,
  -struct jk_endpoint *e, struct jk_ws_service *r );
  +void *target, struct jk_endpoint *ep, int code, struct jk_msg 
*msg);
   
   /** Utility method for stream-based workers. It'll read
*  messages, dispatch, send the response if any until
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2002-04-10 Thread costin

costin  02/04/10 16:48:03

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Added a pointer to the shm object.
  
  Note that the 'shm' doesn't depend directly on APR or shared memory availability.
  Other implementations are possible to support 'strange' OSes or
  workarounds, or 'native' libraries.
  
  For what we need it may not even be necesary to use shared memory -
  another form of IPC could also work as long as it allow some way to
  keep some data in (relative) sync among processes.
  
  Revision  ChangesPath
  1.14  +3 -1  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_workerEnv.h18 Mar 2002 17:56:40 -  1.13
  +++ jk_workerEnv.h10 Apr 2002 23:48:03 -  1.14
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.13 $   *
  + * Version: $Revision: 1.14 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -73,6 +73,7 @@
   #include jk_uriEnv.h
   #include jk_handler.h
   #include jk_service.h
  +#include jk_shm.h
   #include jk_vm.h
   
   #ifdef __cplusplus
  @@ -187,6 +188,7 @@
   struct jk_map * envvars;
   
   struct jk_config *config;
  +struct jk_shm *shm;
   
   /* Handlers. This is a dispatch table for messages, for
* each message id we have an entry containing the jk_handler_t.
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2002-01-25 Thread costin

costin  02/01/25 22:43:11

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Added dispatch - process a single incoming message.
  
  ProcessCallbacks is all wrong - it doesn't work with non-stream channels like jni
  and it's to coarse. And it should be moved in channel - since each channel may
  have it's own method of handling requests ( thread-wise especially )
  
  Revision  ChangesPath
  1.9   +13 -1 jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_workerEnv.h12 Jan 2002 04:44:32 -  1.8
  +++ jk_workerEnv.h26 Jan 2002 06:43:11 -  1.9
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.8 $   *
  + * Version: $Revision: 1.9 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -229,6 +229,18 @@
 const char *name, 
 struct jk_map *init_data);
   
  +/** Call the handler associated with the message type.
  + */
  +int (*dispatch)(struct jk_env *env, struct jk_workerEnv *_this,
  +struct jk_endpoint *e, struct jk_ws_service *r );
  +
  +/** Utility method for stream-based workers. It'll read
  + *  messages, dispatch, send the response if any until
  + *  done. This assumes one native server thread talking
  + *  with a different client thread ( on the java side ).
  + *  It does not work for jni or doors or other transports
  + *  where a single thread is used for the whole processing.
  + */
   int (*processCallbacks)(struct jk_env *env,
   struct jk_workerEnv *_this,
   struct jk_endpoint *e,
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2002-01-11 Thread costin

costin  02/01/11 20:44:32

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Pointer to the vm. ( not sure if this is the best place, or if it should
  be a singleton - but different components will use the vm ).
  
  Revision  ChangesPath
  1.8   +8 -1  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_workerEnv.h16 Dec 2001 23:17:23 -  1.7
  +++ jk_workerEnv.h12 Jan 2002 04:44:32 -  1.8
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.7 $   *
  + * Version: $Revision: 1.8 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -72,6 +72,7 @@
   #include jk_webapp.h
   #include jk_handler.h
   #include jk_service.h
  +#include jk_vm.h
   
   #ifdef __cplusplus
   extern C {
  @@ -196,6 +197,12 @@
*/
   struct jk_handler **handlerTable;
   int lastMessageId;
  +
  +/* The vm - we support a single instance per process
  + * ( i.e can't have both jdk1.1 and jdk1.2 at the same time,
  + *  or 2 instances of the same vm. )
  + */
  +struct jk_vm *vm;
   
   /** Private data, associated with the 'real' server
*  server_rec * in apache
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2001-12-12 Thread costin

costin  01/12/12 14:02:08

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Added the handler table and processCallback.
  
  Revision  ChangesPath
  1.5   +16 -1 jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_workerEnv.h2001/12/06 22:48:49 1.4
  +++ jk_workerEnv.h2001/12/12 22:02:08 1.5
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.4 $   *
  + * Version: $Revision: 1.5 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -70,6 +70,8 @@
   #include jk_map.h
   #include jk_uriMap.h
   #include jk_webapp.h
  +#include jk_handler.h
  +#include jk_service.h
   
   #ifdef __cplusplus
   extern C {
  @@ -81,6 +83,8 @@
   struct jk_uriMap;
   struct jk_webapp;
   struct jk_map;
  +struct jk_handler;
  +struct jk_ws_service;
   
   /*
* Jk configuration and global methods. 
  @@ -187,6 +191,13 @@
   int envvars_in_use;
   jk_map_t * envvars;
   
  +/* Handlers. This is a dispatch table for messages, for
  + * each message id we have an entry containing the jk_handler_t.
  + * lastMessageId is the size of the table.
  + */
  +struct jk_handler **handlerTable;
  +int lastMessageId;
  +
   /** Private data, associated with the 'real' server
*  server_rec * in apache
*/
  @@ -208,6 +219,10 @@
 const char *vhost,
 const char *name, 
 struct jk_map *init_data);
  +
  +int (*processCallbacks)(struct jk_workerEnv *_this,
  +struct jk_endpoint *e,
  +struct jk_ws_service *r );
   
   /**
*  Init the workers, prepare the worker environment.
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2001-12-01 Thread costin

costin  01/12/01 14:01:02

  Added:   jk/native2/include jk_workerEnv.h
  Log:
  WorkerEnv interface. It'll manage most configuration options for jk2.
  
  It's the result of moving jk_worker_env out of jk_service.h, plus
  most of the options that are duplicated in most server adapters.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *notice, this list of conditions and the following disclaimer.  *
   *   *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *notice,  this list of conditions  and the following  disclaimer in the *
   *documentation and/or other materials provided with the distribution.   *
   *   *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *must include the following acknowlegement: *
   *   *
   *   This product includes  software developed  by the Apache  Software *
   *Foundation http://www.apache.org/.  *
   *   *
   *Alternately, this acknowlegement may appear in the software itself, if *
   *and wherever such third-party acknowlegements normally appear. *
   *   *
   * 4. The names  The  Jakarta  Project,  Jk,  and  Apache  Software *
   *Foundation  must not be used  to endorse or promote  products derived *
   *from this  software without  prior  written  permission.  For  written *
   *permission, please contact [EMAIL PROTECTED].*
   *   *
   * 5. Products derived from this software may not be called Apache nor may *
   *Apache appear in their names without prior written permission of the *
   *Apache Software Foundation.*
   *   *
   * THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.   *
   *   *
   * = *
   *   *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see http://www.apache.org/.   *
   *   *
   * 

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2001-12-01 Thread costin

costin  01/12/01 17:04:51

  Modified:jk/native2/common jk_workerEnv.c
   jk/native2/include jk_workerEnv.h
  Log:
  Added a 'perThreadWorker' option to replace the #ifdef REUSE_WORKER.
  
  This is the experimental option that uses per thread data instead of
  object pool to recycle connections.
  
  It's usually better to use runtime options instead of compile preprocessing.
  
  Revision  ChangesPath
  1.2   +30 -23jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c
  
  Index: jk_workerEnv.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_workerEnv.c2001/12/01 22:35:27 1.1
  +++ jk_workerEnv.c2001/12/02 01:04:51 1.2
  @@ -59,7 +59,7 @@
* Description: Workers controller *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.1 $   *
  + * Version: $Revision: 1.2 $   *
***/
   
   #include jk_workerEnv.h 
  @@ -77,6 +77,7 @@
   {
   jk_map_t *init_data=_this-init_data;
   char **worker_list  = NULL;
  +jk_logger_t *l=_this-l;
   unsigned i;
   int err;
   
  @@ -91,10 +92,12 @@
   for(i = 0 ; i  _this-num_of_workers ; i++) {
   jk_worker_t *w = NULL;
   jk_worker_t *oldw = NULL;
  +const char *name=(const char*)worker_list[i];
   
  -w=_this-createWorker(_this, worker_list[i], init_data);
  +w=_this-createWorker(_this, name, init_data);
  +w-channel=NULL;
   if( w==NULL ) {
  -jk_log(_this-l, JK_LOG_ERROR,
  +l-jkLog(_this-l, JK_LOG_ERROR,
  init failed to create worker %s\n, 
  worker_list[i]);
   /* Ignore it, other workers may be ok.
  @@ -103,7 +106,7 @@
   map_put(_this-worker_map, worker_list[i], w, (void *)oldw);
   
   if(oldw!=NULL) {
  -jk_log(_this-l, JK_LOG_DEBUG, 
  +l-jkLog(_this-l, JK_LOG_DEBUG, 
  build_worker_map, removing old %s worker \n,
  worker_list[i]);
   oldw-destroy(oldw, _this-l);
  @@ -113,9 +116,9 @@
   }
   }
   
  -jk_log(_this-l, JK_LOG_DEBUG, build_worker_map, done\n); 
  +l-jkLog(_this-l, JK_LOG_DEBUG, build_worker_map, done\n); 
   
  -jk_log(_this-l, JK_LOG_DEBUG,
  +l-jkLog(_this-l, JK_LOG_DEBUG,
  workerEnv.init() done: %d %s\n, _this-num_of_workers, 
worker_list[0]); 
   return JK_TRUE;
   }
  @@ -136,13 +139,13 @@
   for(i = 0 ; i  sz ; i++) {
   jk_worker_t *w = map_value_at(_this-worker_map, i);
   if(w) {
  -jk_log(l, JK_LOG_DEBUG,
  +l-jkLog(l, JK_LOG_DEBUG,
  destroy worker %s\n,
  map_name_at(_this-worker_map, i));
   w-destroy(w, l);
   }
   }
  -jk_log(_this-l, JK_LOG_DEBUG, workerEnv.close() done %d\n, sz); 
  +l-jkLog(_this-l, JK_LOG_DEBUG, workerEnv.close() done %d\n, sz); 
   map_free(_this-worker_map);
   }
   
  @@ -150,16 +153,17 @@
 const char *name )
   {
   jk_worker_t * rc;
  -
  +jk_logger_t *l=_this-l;
  +
   if(!name) {
  -jk_log(_this-l, JK_LOG_ERROR, wc_get_worker_for_name NULL name\n);
  +l-jkLog(l, JK_LOG_ERROR, wc_get_worker_for_name NULL name\n);
   return NULL;
   }
   
   rc = map_get(_this-worker_map, name, NULL);
   
   if( rc==NULL ) {
  -jk_log(_this-l, JK_LOG_ERROR, getWorkerForName: no worker found for %s 
\n, name);
  +l-jkLog(l, JK_LOG_ERROR, getWorkerForName: no worker found for %s \n, 
name);
   } 
   return rc;
   }
  @@ -171,6 +175,7 @@
   int err;
   char *type;
   jk_env_objectFactory_t fac;
  +jk_logger_t *l=_this-l;
   jk_worker_t *w = NULL;
   
   type=map_getStrProp( init_data,worker,name,type,NULL );
  @@ -178,7 +183,7 @@
   w=(jk_worker_t *)_this-env-getInstance(_this-env, worker, type );
   
   if( w == NULL ) {
  -jk_log(_this-l, JK_LOG_ERROR,
  +l-jkLog(l, JK_LOG_ERROR,
  workerEnv.createWorker(): factory can't create worker %s:%s\n,
  type, name); 
   return JK_FALSE;
  @@ -187,24 +192,24 @@
   w-name=(char *)name;
   w-workerEnv=_this;
   
  -err=w-validate(w, init_data, _this, _this-l);
  +err=w-validate(w, init_data, _this, l);
   
   if( err!=JK_TRUE )