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

2002-10-15 Thread mturk

mturk   2002/10/15 05:15:51

  Modified:jk/native2/include jk_uriMap.h
  Log:
  Add host map cache.
  
  Revision  ChangesPath
  1.17  +6 -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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_uriMap.h   23 Sep 2002 17:36:25 -  1.16
  +++ jk_uriMap.h   15 Oct 2002 12:15:51 -  1.17
  @@ -109,7 +109,12 @@
* level.
*/
   struct jk_map *vhosts;
  -
  +
  +/* Virtual host map cache. Once processed the mapped host
  + * will be cached for performance reasons.
  + */
  +struct jk_map *vhcache;
  +
   /* -- Methods -- */
   
   /** Initialize the map. This should be called after all workers
  
  
  

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




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

2002-09-23 Thread mturk

mturk   2002/09/23 10:36:25

  Modified:jk/native2/include jk_uriMap.h
  Log:
  Remove the defaultVhost, and add the port to the uriMap call.
  
  Revision  ChangesPath
  1.16  +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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_uriMap.h   15 Aug 2002 11:21:47 -  1.15
  +++ jk_uriMap.h   23 Sep 2002 17:36:25 -  1.16
  @@ -109,7 +109,6 @@
* level.
*/
   struct jk_map *vhosts;
  -struct jk_uriEnv *defaultVhost;
   
   /* -- Methods -- */
   
  @@ -142,6 +141,7 @@
   
   struct jk_uriEnv *(*mapUri)(struct jk_env *env, jk_uriMap_t *_this,
   const char *vhost,
  +int port,
   const char *uri);
   
   /*  @deprecated  */
  
  
  

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




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

2002-08-15 Thread mturk

mturk   2002/08/15 02:22:16

  Modified:jk/native2/include jk_uriMap.h
  Log:
  Add the reverse mapping flag to the mapUri call
  
  Revision  ChangesPath
  1.14  +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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_uriMap.h   9 May 2002 20:52:54 -   1.13
  +++ jk_uriMap.h   15 Aug 2002 09:22:16 -  1.14
  @@ -141,7 +141,7 @@
   */
   struct jk_uriEnv *(*mapUri)(struct jk_env *env, jk_uriMap_t *_this,
   const char *vhost,
  -const char *uri );
  +const char *uri, int reverse );
   
   /*  @deprecated  */
   /* used by the mapper, temp storage ( ??? )*/
  
  
  

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




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

2002-08-15 Thread mturk

mturk   2002/08/15 04:21:47

  Modified:jk/native2/include jk_uriMap.h
  Log:
  Remove the reverse flag from uriMap call.
  
  Revision  ChangesPath
  1.15  +2 -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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_uriMap.h   15 Aug 2002 09:22:16 -  1.14
  +++ jk_uriMap.h   15 Aug 2002 11:21:47 -  1.15
  @@ -139,9 +139,10 @@
   to do what we need ). Even when we'll know, uriMap will be needed
   for other servers. 
   */
  +
   struct jk_uriEnv *(*mapUri)(struct jk_env *env, jk_uriMap_t *_this,
   const char *vhost,
  -const char *uri, int reverse );
  +const char *uri);
   
   /*  @deprecated  */
   /* used by the mapper, temp storage ( ??? )*/
  
  
  

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




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

2002-04-30 Thread costin

costin  02/04/29 23:42:35

  Modified:jk/native2/include jk_uriMap.h
  Log:
  Changed the struct - now uriMap only has a table with the vhosts and
  the default vhost - the uriEnv representing each host will have a table
  of contexts, etc.
  
  We use the jk_map object instead of char[][].
  Probably a bit less efficient but cleaner.
  
  Revision  ChangesPath
  1.12  +6 -10 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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- jk_uriMap.h   29 Apr 2002 19:14:25 -  1.11
  +++ jk_uriMap.h   30 Apr 2002 06:42:35 -  1.12
  @@ -99,10 +99,9 @@
   struct jk_uriMap {
   struct jk_bean *mbean;
   
  -/* map URI-WORKER */
  -struct jk_uriEnv **maps;
  -int size;
  -int capacity;
  +/* All mappings */
  +struct jk_map *maps;
  +
   struct jk_workerEnv *workerEnv;
   int debug;
   
  @@ -111,11 +110,8 @@
* level.
*/
   struct jk_map *vhosts;
  -
  -/** Managed webapps. Key is VHOST/CONTEXT, value is the
  - *  uriEnv that corresponds to the top level of the webapp.
  - */
  -struct jk_map *webapps;
  +struct jk_uriEnv *defaultVhost;
  +
   /* -- Methods -- */
   
   /** Initialize the map. This should be called after all workers
  @@ -124,7 +120,7 @@
   int (*init)( struct jk_env *env, jk_uriMap_t *_this);
   
   void (*destroy)( struct jk_env *env, jk_uriMap_t *_this );
  -
  +
   int (*addUriEnv)(struct jk_env *env,
struct jk_uriMap *uriMap,
struct jk_uriEnv *uriEnv);
  
  
  

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




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

2002-04-29 Thread costin

costin  02/04/29 12:14:25

  Modified:jk/native2/include jk_uriMap.h
  Log:
  Added 2 maps to better support vhost mappings ( code merged from the
  original IIS connector ) and to support the new autoconf.
  
  Revision  ChangesPath
  1.11  +11 -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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_uriMap.h   18 Mar 2002 17:56:40 -  1.10
  +++ jk_uriMap.h   29 Apr 2002 19:14:25 -  1.11
  @@ -105,7 +105,17 @@
   int capacity;
   struct jk_workerEnv *workerEnv;
   int debug;
  -
  +
  +/* Virtual host map. For each host and alias there is one
  + * entry, the value is a uriEnv that corresponds to the vhost top
  + * level.
  + */
  +struct jk_map *vhosts;
  +
  +/** Managed webapps. Key is VHOST/CONTEXT, value is the
  + *  uriEnv that corresponds to the top level of the webapp.
  + */
  +struct jk_map *webapps;
   /* -- Methods -- */
   
   /** Initialize the map. This should be called after all workers
  
  
  

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




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

2002-03-01 Thread costin

costin  02/03/01 22:14:25

  Modified:jk/native2/include jk_uriMap.h
  Log:
  Forgot to update the init() method here.
  
  init() is consistent in all objects - it takes no params
  (except the env and _this, of course )
  
  Revision  ChangesPath
  1.9   +4 -3  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_uriMap.h   28 Feb 2002 22:08:21 -  1.8
  +++ jk_uriMap.h   2 Mar 2002 06:14:25 -   1.9
  @@ -106,12 +106,13 @@
   
   /* -- Methods -- */
   
  +int (*setProperty)( struct jk_env *env, jk_uriMap_t *_this,
  +char *name, char *value );
  +
   /** Initialize the map. This should be called after all workers
   were added. It'll check if mappings have valid workers.
   */
  -int (*init)( struct jk_env *env, jk_uriMap_t *_this,
  - struct jk_workerEnv *workerEnv,
  - struct jk_map *init_data );
  +int (*init)( struct jk_env *env, jk_uriMap_t *_this);
   
   void (*destroy)( struct jk_env *env, jk_uriMap_t *_this );
   
  
  
  

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




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

2002-02-28 Thread costin

costin  02/02/28 14:08:21

  Modified:jk/native2/include jk_uriMap.h jk_workerEnv.h
  Log:
  Few more changes in cleaning up the uri mapping and config.
  
  Revision  ChangesPath
  1.8   +5 -0  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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_uriMap.h   16 Dec 2001 23:17:23 -  1.7
  +++ jk_uriMap.h   28 Feb 2002 22:08:21 -  1.8
  @@ -115,6 +115,11 @@
   
   void (*destroy)( struct jk_env *env, jk_uriMap_t *_this );
   
  +struct jk_uriEnv *(*createUriEnv)(struct jk_env *env,
  +  struct jk_uriMap *_this,
  +  const char *vhost,
  +  const char *name );
  +
   /** Add a servlet mapping. Can be done before init()
*/
   jk_uriEnv_t *(*addMapping)( struct jk_env *env, jk_uriMap_t *_this,
  
  
  
  1.11  +42 -18jakarta-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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_workerEnv.h6 Feb 2002 19:19:16 -   1.10
  +++ jk_workerEnv.h28 Feb 2002 22:08:21 -  1.11
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.10 $   *
  + * Version: $Revision: 1.11 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -69,7 +69,7 @@
   #include jk_worker.h
   #include jk_map.h
   #include jk_uriMap.h
  -#include jk_webapp.h
  +#include jk_uriEnv.h
   #include jk_handler.h
   #include jk_service.h
   #include jk_vm.h
  @@ -82,7 +82,7 @@
   struct jk_endpoint;
   struct jk_env;
   struct jk_uriMap;
  -struct jk_webapp;
  +struct jk_uriEnv;
   struct jk_map;
   struct jk_logger;
   struct jk_handler;
  @@ -129,7 +129,10 @@
   
   /** Initialization properties, set via native options or workers.properties.
*/
  -struct jk_map *init_data;
  +/* XXX renamed from init_data to force all code to use setProperty
  +   This is private property !
  +*/
  +struct jk_map *initData;
   
   /** Root env, used to register object types, etc
*/
  @@ -141,18 +144,12 @@
   char *log_file;
   int  log_level;
   
  -/*
  - * Worker stuff
  - */
  -char *worker_file;
  -
   char *secret_key;
   /* jk_map_t *automount; */
   
   struct jk_uriMap *uriMap;
   
  -struct jk_webapp *rootWebapp;
  -struct jk_map *webapps;
  +struct jk_uriEnv *rootWebapp;
   
   /** If 'global' server mappings will be visible in virtual hosts
   as well. XXX Not sure this is needed
  @@ -205,6 +202,38 @@
   void *_private;
   
   /*  Methods  */
  +/** Set a jk property. This is similar with the mechanism
  + *  used by java side ( with individual setters for
  + *  various properties ), except we use a single method
  + *  and a big switch
  + *
  + *  As in java beans, setting a property may have side effects
  + *  like changing the log level or reading a secondary
  + *  properties file.
  + *
  + *  Changing a property at runtime will also be supported for
  + *  some properties.
  + *  XXX Document supported properties as part of
  + *  workers.properties doc.
  + *  XXX Implement run-time change in the status/ctl workers.
  + */
  +int (*setProperty)( struct jk_env *env,
  + struct jk_workerEnv *_this,
  + const char *name, char *value);
  +
  +char *(*getProperty)( struct jk_env *env,
  +  struct jk_workerEnv *_this,
  +  const char *name);
  +
  +/** Return a list of supported properties.
  +Not all properties can be set ( some may be runtime
  +status ).
  +@experimental This is not a final API, I would use
  +an external config ( DTD/schema or even MIB-like ?  )
  +*/
  +char **(*getPropertyNames)( struct jk_env *env,
  +struct jk_workerEnv *_this );
  +
   
   /** Get worker by name
*/
  @@ -218,12 +247,6 @@
   

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

2001-12-01 Thread costin

costin  01/12/01 14:06:29

  Added:   jk/native2/include jk_uriMap.h
  Log:
  UriMap is the uri-worker mapper.
  
  It is based on jk_uri_map, with some important changes.
  - mapUri() now returns a jk_uriEnv. From that you can extract the
  worker name ( for old style mapping ) or the worker ( and avoid another
  lookup in the handler ).
  
  - addMapping, mapUri now take a host parameter, for better support
  of virtual hosts. ( the old solution was based on some config tricks )
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h
  
  Index: jk_uriMap.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