cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-07-08 Thread mturk

mturk   2002/07/08 06:40:02

  Modified:jk/native2/common jk_env.c
  Log:
  no message
  
  Revision  ChangesPath
  1.37  +7 -7  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- jk_env.c  11 Jun 2002 02:51:18 -  1.36
  +++ jk_env.c  8 Jul 2002 13:40:02 -   1.37
  @@ -154,7 +154,7 @@
   if( env->l == NULL ) 
   fprintf( stderr, "env:Create child env %#lx %#lx\n", parentEnv, 
env);
   else 
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  +env->l->jkLog(env, env->l, JK_LOG_DEBUG,
 "env:Create child env %#lx %#lx\n", parentEnv, env);
   }
   }
  @@ -245,7 +245,7 @@
   
   if( env->debug > 0 ) {
   if( env->l != NULL ) {
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  +env->l->jkLog(env, env->l, JK_LOG_DEBUG,
 "env.createBean2(): Create [%s] %s\n", type, localName);
   } else {
   fprintf(stderr, "env.createBean2(): Create [%s] %s\n", type, localName);
  @@ -309,7 +309,7 @@
   if( env->l == NULL ) 
   fprintf(stderr,"env.createBean2(): register %s %#lx\n", result->name, 
result->object);
   else 
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  +env->l->jkLog(env, env->l, JK_LOG_DEBUG,
 "env.createBean2(): register %s %#lx\n", result->name, 
result->object);
   }
   
  @@ -342,7 +342,7 @@
   if( env->debug > 0 )
   fprintf(stderr,"env.alias(): Not found %s\n", name);
   } else {
  -env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +env->l->jkLog(env, env->l, JK_LOG_DEBUG,
 "env.alias(): Not found %s\n", name);
   }
   return ;
  @@ -352,7 +352,7 @@
   if( env->l == NULL ) 
   fprintf(stderr,"env.alias(): alias %s %s\n", name, alias);
   else 
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  +env->l->jkLog(env, env->l, JK_LOG_DEBUG,
 "env.alias(): alias %s %s\n", name, alias);
   }
   
  @@ -370,7 +370,7 @@
   if( env->l == NULL ) 
   fprintf(stderr,"env.getByName(): Can't find %#lx %s\n", env, name);
   else 
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  +env->l->jkLog(env, env->l, JK_LOG_DEBUG,
 "env.getByName(): Can't find %#lx %s\n", env, name);
   }
   return NULL;
  @@ -380,7 +380,7 @@
   if( env->l == NULL ) 
   fprintf(stderr,"env.getByName(): Get by name %s %#lx\n", name, 
result->object);
   else 
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  +env->l->jkLog(env, env->l, JK_LOG_DEBUG,
 "env.getByName(): Get by name %s %#lx\n", name, 
result->object);
   }
   return result->object;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-06-09 Thread nacho

nacho   2002/06/09 11:52:07

  Modified:jk/native2/common jk_env.c
  Log:
  * Deleting a apr_initialize call left at a wrong place when debugging for IIS..
  
  Revision  ChangesPath
  1.34  +0 -2  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- jk_env.c  31 May 2002 18:09:13 -  1.33
  +++ jk_env.c  9 Jun 2002 18:52:06 -   1.34
  @@ -83,8 +83,6 @@
   if( jkGlobalAprPool==NULL ) {
   int rc;
   
  -/* Make sure apr is initialized */
  -apr_initialize(); 
   rc = apr_pool_create(( apr_pool_t **)&jkGlobalAprPool, NULL);
   if (rc != APR_SUCCESS || jkGlobalAprPool==NULL ) {
   env->l->jkLog(env, env->l, JK_LOG_ERROR, 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-05-27 Thread nacho

nacho   02/05/27 14:56:19

  Modified:jk/native2/common jk_env.c
  Log:
  * Fixed build in win32
  
  Thanks to Mladen Turk
  
  Revision  ChangesPath
  1.29  +2 -1  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- jk_env.c  24 May 2002 04:26:00 -  1.28
  +++ jk_env.c  27 May 2002 21:56:19 -  1.29
  @@ -58,6 +58,7 @@
   #include "jk_global.h"
   #include "jk_env.h"
   #include "jk_objCache.h"
  +#include "apr_general.h"
   
   jk_env_t *jk_env_globalEnv;
   void *jkGlobalAprPool;
  @@ -72,7 +73,7 @@
   
   /*  Env management  */
   
  -static void JK_METHOD *jk2_env_getAprPool( jk_env_t *env ) {
  +static void * JK_METHOD jk2_env_getAprPool( jk_env_t *env ) {
   #ifdef HAS_APR
   /* We don't want to have to recreate the scoreboard after
* restarts, so we'll create a global pool and never clean it.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-05-03 Thread costin

costin  02/05/03 10:41:06

  Modified:jk/native2/common jk_env.c
  Log:
  Filter the messages if debug is not enabled.
  
  Most of the time they don't matter, but in case of error they are
  very usefull to debug.
  
  Revision  ChangesPath
  1.21  +52 -12jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_env.c  30 Apr 2002 06:49:45 -  1.20
  +++ jk_env.c  3 May 2002 17:41:06 -   1.21
  @@ -78,6 +78,7 @@
 jk_env_globalEnv=(jk_env_t *)pool->calloc( NULL, pool, sizeof( jk_env_t ));
 jk_env_globalEnv->globalPool = pool;
 jk2_env_initEnv( (jk_env_t *)jk_env_globalEnv, id );
  +
 fprintf( stderr, "env: top level env %p\n", jk_env_globalEnv);
 }
 return jk_env_globalEnv;
  @@ -114,8 +115,15 @@
   env->l=parentEnv->l;
   env->globalPool=parentEnv->globalPool;
   env->envCache=parentEnv->envCache;
  -
  -fprintf( stderr, "env:Create child env %p %p\n", parentEnv, env);
  +env->debug=parentEnv->debug;
  +
  +if( env->debug > 0 ) {
  +if( env->l == NULL ) 
  +fprintf( stderr, "env:Create child env %p %p\n", parentEnv, env);
  +else 
  +env->l->jkLog(env, env->l, JK_LOG_INFO,
  +  "env:Create child env %p %p\n", parentEnv, env);
  +}
   }
   return env;
   }
  @@ -186,6 +194,10 @@
   return NULL;
   }
   
  +if( strcmp( "disabled", type ) == 0 ) {
  +return NULL;
  +}
  +
   if( localName!=NULL && strncmp( localName, type, strlen( type )) == 0 ) {
   /* Common error, make it 'localName' */
   if( strcmp( type, localName ) == 0 ) {
  @@ -195,11 +207,13 @@
   }
   }
   
  -if( env->l != NULL ) {
  -env->l->jkLog(env, env->l, JK_LOG_INFO,
  -  "env.createBean2(): Create [%s] %s\n", type, localName);
  -} else {
  +if( env->debug > 0 ) {
  +if( env->l != NULL ) {
  +env->l->jkLog(env, env->l, JK_LOG_INFO,
  +  "env.createBean2(): Create [%s] %s\n", type, localName);
  +} else {
   fprintf(stderr, "env.createBean2(): Create [%s] %s\n", type, localName);
  +}
   }
   
   fac=(jk_env_objectFactory_t)env->_registry->get( env, env->_registry, type);
  @@ -251,7 +265,13 @@
   return NULL;
   }
   
  -fprintf(stderr,"env.createBean2(): register %s %p\n", result->name, 
result->object);
  +if( env->debug > 0 ) {
  +if( env->l == NULL ) 
  +fprintf(stderr,"env.createBean2(): register %s %p\n", result->name, 
result->object);
  +else 
  +env->l->jkLog(env, env->l, JK_LOG_INFO,
  +  "env.createBean2(): register %s %p\n", result->name, 
result->object);
  +}
   
   jk_env_globalEnv->_objects->put( env, jk_env_globalEnv->_objects, result->name, 
result, NULL );
   
  @@ -272,15 +292,23 @@
   
   if( jkb==NULL ) {
   if( env->l==NULL ) {
  -fprintf(stderr,"env.alias(): Not found %s\n", name);
  +if( env->debug > 0 )
  +fprintf(stderr,"env.alias(): Not found %s\n", name);
   } else {
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
 "env.alias(): Not found %s\n", name);
   }
   return ;
   }
  +
  +if( env->debug > 0 ) {
  +if( env->l == NULL ) 
  +fprintf(stderr,"env.alias(): alias %s %s\n", name, alias);
  +else 
  +env->l->jkLog(env, env->l, JK_LOG_INFO,
  +  "env.alias(): alias %s %s\n", name, alias);
  +}
   
  -fprintf(stderr,"env.alias(): alias %s %s\n", name, alias);
   jk_env_globalEnv->_objects->put( env, jk_env_globalEnv->_objects, alias, jkb, 
NULL );
   }
   
  @@ -291,11 +319,23 @@
   jk_bean_t *result=env->getBean( env, name );
   
   if( result==NULL ) {
  -fprintf(stderr,"env.alias(): Can't find %p %s\n", env, name);
  +if( env->debug > 0 ) {
  +if( env->l == NULL ) 
  +fprintf(stderr,"env.getByName(): Can't find %p %s\n", env, name);
  +else 
  +env->l->jkLog(env, env->l, JK_LOG_INFO,
  +  "env.getByName(): Can't find %p %s\n", env, name);
  +}
   return NULL;
   }
   
  -fprintf(stderr,"env.alias(): Get by name %s %p\n", name, result->object);
  +if( env->debug > 0 ) {
  +if( env->l == NULL ) 
  +fprintf(stderr,"env.getByName(): Get by name %s %p\n", name, 
result->object);
  +else 
  +   

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-04-25 Thread costin

costin  02/04/25 12:12:58

  Modified:jk/native2/common jk_env.c
  Log:
  Added the recycle.
  
  jk_env has now some extra printf() debugging to test it's use from
  java, will go away soon.
  
  Revision  ChangesPath
  1.19  +27 -5 jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- jk_env.c  12 Apr 2002 21:49:03 -  1.18
  +++ jk_env.c  25 Apr 2002 19:12:57 -  1.19
  @@ -74,9 +74,11 @@
*/
   jk_env_t* JK_METHOD jk2_env_getEnv( char *id, jk_pool_t *pool ) {
 if( jk_env_globalEnv == NULL ) {
  +  if( pool == NULL ) return NULL;
 jk_env_globalEnv=(jk_env_t *)pool->calloc( NULL, pool, sizeof( jk_env_t ));
 jk_env_globalEnv->globalPool = pool;
 jk2_env_initEnv( (jk_env_t *)jk_env_globalEnv, id );
  +  fprintf( stderr, "env: top level env %p\n", jk_env_globalEnv);
 }
 return jk_env_globalEnv;
   }
  @@ -113,17 +115,25 @@
   env->globalPool=parentEnv->globalPool;
   env->envCache=parentEnv->envCache;
   
  -fprintf( stderr, "Create env %d\n", env->id);
  +fprintf( stderr, "env:Create child env %p %p\n", parentEnv, env);
   }
   return env;
   }
   
   /** Release the env ( clean and recycle )
*/
  +static int JK_METHOD jk2_env_recycleEnv( jk_env_t *env )
  +{
  +env->tmpPool->reset(env, env->tmpPool);
  +env->jkClearException(env);
  +return JK_OK;
  +}
  +
  +/** Release the env ( clean and recycle )
  + */
   static int JK_METHOD jk2_env_put( jk_env_t *parent, jk_env_t *chld )
   {
  -chld->tmpPool->reset(parent, chld->tmpPool);
  -chld->jkClearException(chld);
  +jk2_env_recycleEnv( chld );
   return parent->envCache->put( parent, parent->envCache, chld);
   }
   
  @@ -225,13 +235,19 @@
   fac( env, workerPool, result, result->type, result->name );
   
   if( result->object==NULL ) {
  -if( env->l )
  +if( env->l ) {
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
 "env.createBean2(): Factory error creating %s ( %s, 
%s)\n", name,
 type, localName);
  +} else {
  +fprintf(stderr, "env.createBean2(): Factory error creating %s ( %s, 
%s)\n", name,
  +type, localName);
  +}
   return NULL;
   }
   
  +fprintf(stderr,"env.createBean2(): register %s %p\n", result->name, 
result->object);
  +
   jk_env_globalEnv->_objects->put( env, jk_env_globalEnv->_objects, result->name, 
result, NULL );
   
   if( strcmp(localName,"")==0 ) {
  @@ -259,6 +275,7 @@
   return ;
   }
   
  +fprintf(stderr,"env.alias(): alias %s %s\n", name, alias);
   jk_env_globalEnv->_objects->put( env, jk_env_globalEnv->_objects, alias, jkb, 
NULL );
   }
   
  @@ -268,8 +285,12 @@
   {
   jk_bean_t *result=env->getBean( env, name );
   
  -if( result==NULL ) return NULL;
  +if( result==NULL ) {
  +fprintf(stderr,"env.alias(): Can't find %p %s\n", env, name);
  +return NULL;
  +}
   
  +fprintf(stderr,"env.alias(): Get by name %s %p\n", name, result->object);
   return result->object;
   }
   
  @@ -380,6 +401,7 @@
   env->createBean= jk2_env_createBean;
   env->alias= jk2_env_alias;
   env->getEnv= jk2_env_get; 
  +env->recycleEnv= jk2_env_recycleEnv; 
   env->releaseEnv= jk2_env_put; 
   
   env->jkClearException=jk_env_jkClearException;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-04-11 Thread costin

costin  02/04/11 12:32:32

  Modified:jk/native2/common jk_env.c
  Log:
  Prevent NPE when no pool is specified.
  
  Revision  ChangesPath
  1.17  +5 -1  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_env.c  26 Mar 2002 03:02:32 -  1.16
  +++ jk_env.c  11 Apr 2002 19:32:32 -  1.17
  @@ -161,6 +161,10 @@
   jk_pool_t *workerPool;
   char *name;
   
  +if( pool==NULL ) {
  +pool=env->globalPool;
  +}
  +
   if( type==NULL ) {
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
 "env.createBean2(): NullPointerException\n");
  @@ -235,7 +239,7 @@
*/
   jk_env_globalEnv->_objects->put( env, jk_env_globalEnv->_objects, 
result->type, result, NULL );
   }
  -
  +
   return result;
   }
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-03-25 Thread costin

costin  02/03/25 19:02:32

  Modified:jk/native2/common jk_env.c
  Log:
  Clean up, reorganization, implement missing features.
  
  The code calling env must get an env ( at least once per thread ). The env
  object is recycled and includes a tmp pool ( to be used for temp allocations,
  the pool is recycled when the env is released ). It also includes minimal
  support for exceptions, JNI style. ( not used right now )
  
  The code to create and manage instances is more consistent and hopefully
  cleaner.
  
  Revision  ChangesPath
  1.16  +220 -102  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_env.c  25 Mar 2002 03:35:11 -  1.15
  +++ jk_env.c  26 Mar 2002 03:02:32 -  1.16
  @@ -64,10 +64,14 @@
   */
   static void jk2_env_initEnv( jk_env_t *env, char *id );
   
  -/* XXX We should have one env per thread to avoid sync problems. 
  -   The env will provide access to pools, etc 
  +/* We should have one env per thread to avoid sync problems. 
  +   The env provides access to tmp pools, exception 
   */
   
  +/*  Env management  */
  +
  +/** Public method, creates/get the global env
  + */
   jk_env_t* JK_METHOD jk2_env_getEnv( char *id, jk_pool_t *pool ) {
 if( jk_env_globalEnv == NULL ) {
 jk_env_globalEnv=(jk_env_t *)pool->calloc( NULL, pool, sizeof( jk_env_t ));
  @@ -77,30 +81,53 @@
 return jk_env_globalEnv;
   }
   
  -/*  Implementation  */
   
  -static jk_env_t * JK_METHOD jk2_env_get( jk_env_t *env )
  +/** Get a local env - either a new one or a recycled one
  + *  XXX Try TLD too 
  + */
  +static jk_env_t * JK_METHOD jk2_env_get( jk_env_t *parentEnv )
   {
  -return NULL;
  +jk_env_t *env=(jk_env_t *)parentEnv->envCache->get( parentEnv, 
parentEnv->envCache);
  +if( env == NULL ) {
  +jk_pool_t *parentPool=parentEnv->globalPool;
  +env=(jk_env_t *)parentPool->calloc( parentEnv, parentPool, sizeof( jk_env_t 
));
  +
  +env->tmpPool=parentPool->create(parentEnv, parentPool, HUGE_POOL_SIZE);;
  +
  +env->registerFactory= parentEnv->registerFactory;
  +env->getByName= parentEnv->getByName; 
  +env->getByName2= parentEnv->getByName2; 
  +env->getBean2= parentEnv->getBean2; 
  +env->getBean= parentEnv->getBean; 
  +env->alias= parentEnv->alias; 
  +env->createBean2= parentEnv->createBean2;
  +env->createBean= parentEnv->createBean;
  +env->getEnv= parentEnv->getEnv; 
  +env->releaseEnv= parentEnv->releaseEnv; 
  +env->jkClearException=parentEnv->jkClearException;
  +env->jkException=parentEnv->jkException;
  +
  +env->_registry=parentEnv->_registry;
  +env->_objects=parentEnv->_objects;
  +env->l=parentEnv->l;
  +env->globalPool=parentEnv->globalPool;
  +env->envCache=parentEnv->envCache;
  +
  +fprintf( stderr, "Create env %d\n", env->id);
  +}
  +return env;
   }
   
  +/** Release the env ( clean and recycle )
  + */
   static int JK_METHOD jk2_env_put( jk_env_t *parent, jk_env_t *chld )
   {
  -
  -return JK_TRUE;
  +chld->tmpPool->reset(parent, chld->tmpPool);
  +chld->jkClearException(chld);
  +return parent->envCache->put( parent, parent->envCache, chld);
   }
   
  -static jk_env_objectFactory_t JK_METHOD jk2_env_getFactory(jk_env_t *env, 
  -   const char *type )
  -{
  -  if( type==NULL ) {
  -  env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -  "env.getFactory(): NullPointerException\n");
  -  return NULL;
  -  }
  -
  -  return (jk_env_objectFactory_t)env->_registry->get( env, env->_registry, type);
  -}
  +/*  Object management  */
   
   /** Create a jk component, using only the name.
*  Now things are simpler - the 'type' is the prefix, separated by ':' - no
  @@ -108,8 +135,6 @@
*/
   static jk_bean_t *jk2_env_createBean( jk_env_t *env, jk_pool_t *pool, char *objName 
)
   {
  -jk_bean_t *w=NULL;
  -int i;
   char *type=NULL;
   void *obj;
   char *localName;
  @@ -119,122 +144,141 @@
   type=objName;
   } else {
   /* Funny pointer arithmetic. I hope I got it right */
  -type=pool->calloc( env, pool, localName - objName + 2 );
  +type=env->tmpPool->calloc( env, env->tmpPool, localName - objName + 2 );
   strncpy( type, objName, localName - objName );
   }
   
  -/* for( i=0; i< env->_registry->size( env, env->_registry ) ; i++ ) { */
  -/* char *factName=env->_regi

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_logger_file.c

2002-03-23 Thread costin

costin  02/03/23 09:23:15

  Modified:jk/native2/common jk_env.c jk_logger_file.c
  Log:
  Added support for saving unparsed property values
  
  Make the parse_log_level 'public' - not nice, but the apache2 logger needs
  to parse it as well. Yes, inheritance and 'protected' are usefull.
  
  Revision  ChangesPath
  1.13  +2 -1  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jk_env.c  20 Mar 2002 23:44:37 -  1.12
  +++ jk_env.c  23 Mar 2002 17:23:15 -  1.13
  @@ -107,7 +107,7 @@
   {
   jk_env_objectFactory_t fac;
   jk_bean_t *result;
  -
  +
   if( type==NULL  ) {
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
   "env.createInstance(): NullPointerException\n");
  @@ -133,6 +133,7 @@
   result=(jk_bean_t *)pool->calloc( NULL, pool, sizeof( jk_bean_t ));
   result->type=type;
   result->name=name;
  +result->settings=NULL;
   
   fac( env, pool, result, type, name );
   if( result->object==NULL ) {
  
  
  
  1.15  +2 -2  jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c
  
  Index: jk_logger_file.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_logger_file.c  20 Mar 2002 23:44:37 -  1.14
  +++ jk_logger_file.c  23 Mar 2002 17:23:15 -  1.15
  @@ -59,7 +59,7 @@
* Description: Utility functions (mainly configuration)   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.14 $   *
  + * Version: $Revision: 1.15 $   *
***/
   
   #include "jk_env.h"
  @@ -123,7 +123,7 @@
   return JK_FALSE;
   }
   
  -static int jk2_logger_file_parseLogLevel(jk_env_t *env, const char *level)
  +int jk2_logger_file_parseLogLevel(jk_env_t *env, const char *level)
   {
   if( level == NULL ) return JK_LOG_ERROR_LEVEL;
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_logger_file.c jk_uriEnv.c jk_workerEnv.c

2002-03-20 Thread costin

costin  02/03/20 15:44:37

  Modified:jk/native2/common jk_env.c jk_logger_file.c jk_uriEnv.c
jk_workerEnv.c
  Log:
  Various small fixes.
  
  Revision  ChangesPath
  1.12  +1 -1  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- jk_env.c  18 Mar 2002 18:28:37 -  1.11
  +++ jk_env.c  20 Mar 2002 23:44:37 -  1.12
  @@ -116,7 +116,7 @@
   
   if( name==NULL ) {
   name=pool->calloc( env, pool, 10 );
  -snprintf( name, 10, "%s.%d", type, env->id++ );
  +snprintf( (char *)name, 10, "%s.%d", type, env->id++ );
   }
   
   fac=jk2_env_getFactory( env, type);
  
  
  
  1.14  +26 -25jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c
  
  Index: jk_logger_file.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_logger_file.c  19 Mar 2002 04:53:40 -  1.13
  +++ jk_logger_file.c  20 Mar 2002 23:44:37 -  1.14
  @@ -59,7 +59,7 @@
* Description: Utility functions (mainly configuration)   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.13 $   *
  + * Version: $Revision: 1.14 $   *
***/
   
   #include "jk_env.h"
  @@ -142,30 +142,6 @@
   return JK_LOG_DEBUG_LEVEL;
   }
   
  -static int JK_METHOD
  -jk2_logger_file_setProperty(jk_env_t *env, jk_bean_t *mbean, 
  -char *name,  void *valueP )
  -{
  -jk_logger_t *_this=mbean->object;
  -char *value=valueP;
  -if( strcmp( name, "name" )==0 ) {
  -_this->name=(char *)value;
  -} else if( strcmp( name, "file" )==0 ) {
  -_this->name=(char *)value;
  -/* Set the file imediately */
  -jk2_logger_file_init(env, (jk_logger_t *)mbean->object );
  -
  -} else if( strcmp( name, "timeFormat" )==0 ) {
  -jk2_logger_file_logFmt = value;
  -} else if( strcmp( name, "level" )==0 ) {
  -_this->level = jk2_logger_file_parseLogLevel(env, value);
  -if( _this->level == 0 ) {
  -_this->jkLog( env, _this, JK_LOG_ERROR,
  -  "Level %s %d \n", value, _this->level );
  -}
  -}
  -}
  -
   
   static int jk2_logger_file_init(jk_env_t *env,jk_logger_t *_this )
   {
  @@ -202,6 +178,31 @@
   /* free(_this); */
   return JK_TRUE;
   }
  +
  +static int JK_METHOD
  +jk2_logger_file_setProperty(jk_env_t *env, jk_bean_t *mbean, 
  +char *name,  void *valueP )
  +{
  +jk_logger_t *_this=mbean->object;
  +char *value=valueP;
  +if( strcmp( name, "name" )==0 ) {
  +_this->name=(char *)value;
  +} else if( strcmp( name, "file" )==0 ) {
  +_this->name=(char *)value;
  +/* Set the file imediately */
  +jk2_logger_file_init(env, (jk_logger_t *)mbean->object );
  +
  +} else if( strcmp( name, "timeFormat" )==0 ) {
  +jk2_logger_file_logFmt = value;
  +} else if( strcmp( name, "level" )==0 ) {
  +_this->level = jk2_logger_file_parseLogLevel(env, value);
  +if( _this->level == 0 ) {
  +_this->jkLog( env, _this, JK_LOG_ERROR,
  +  "Level %s %d \n", value, _this->level );
  +}
  +}
  +}
  +
   
   static int jk2_logger_file_jkLog(jk_env_t *env, jk_logger_t *l,
const char *file,
  
  
  
  1.3   +3 -1  jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c
  
  Index: jk_uriEnv.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_uriEnv.c   18 Mar 2002 18:43:53 -  1.2
  +++ jk_uriEnv.c   20 Mar 2002 23:44:37 -  1.3
  @@ -69,6 +69,8 @@
   #include "jk_uriMap.h"
   #include "jk_registry.h"
   
  +static int jk2_uriEnv_init(jk_env_t *env, jk_uriEnv_t *uriEnv);
  +
   static int jk2_uriEnv_parseUri( jk_env_t *env, jk_uriEnv_t *uriEnv,
   char *name)
   {
  @@ -274,7 +276,7 @@
   
   /* The name is a path */
   if( strchr( name, '/' ) != NULL ) {
  -jk2_uriEnv_setProperty( env, result, "uri", name );
  +jk2_

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c

2002-03-18 Thread costin

costin  02/03/18 10:28:37

  Modified:jk/native2/common jk_env.c
  Log:
  Update for the new config mechanism.
  
  Each jk component is created using jk_env->createInstance(), which registers
  the name of the component. You can then set(and soon get) attributes for
  each component transparently.
  
  Type 'dcop' on a KDE computer to get an idea how it'll work ( or use the
  openjmx html interface )
  
  Revision  ChangesPath
  1.11  +74 -49jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_env.c  21 Feb 2002 11:10:12 -  1.10
  +++ jk_env.c  18 Mar 2002 18:28:37 -  1.11
  @@ -91,87 +91,112 @@
   }
   
   static jk_env_objectFactory_t JK_METHOD jk2_env_getFactory(jk_env_t *env, 
  -   const char *type,
  -   const char *name)
  +   const char *type )
   {
  -  jk_env_objectFactory_t result;
  -  /* malloc/free: this is really temporary, and is executed only at setup
  - time, not during request execution. We could create a subpool or alloc
  - from stack */
  -  char *typeName=
  -  (char *)malloc( (strlen(name) + strlen(type) + 2 ) * sizeof( char ));
  -
  -  strcpy(typeName, type );
  -  strcat( typeName, "/" );
  -  strcat( typeName, name );
  -
  -  if( type==NULL || name==NULL ) {
  -// throw NullPointerException
  -return NULL;
  +  if( type==NULL ) {
  +  env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +  "env.getFactory(): NullPointerException\n");
  +  return NULL;
 }
   
  -  /** XXX add check for the type */
  -  result=(jk_env_objectFactory_t)env->_registry->get( env, env->_registry,
  -  typeName);
  -  free( typeName );
  -  return result;
  +  return (jk_env_objectFactory_t)env->_registry->get( env, env->_registry, type);
   }
   
  -static void *jk2_env_getInstance(jk_env_t *_this, jk_pool_t *pool,
  - const char *type, const char *name)
  +static void *jk2_env_createInstance(jk_env_t *env, jk_pool_t *pool,
  +const char *type, const char *name)
   {
   jk_env_objectFactory_t fac;
  -void *result;
  +jk_bean_t *result;
  +
  +if( type==NULL  ) {
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +"env.createInstance(): NullPointerException\n");
  +return NULL;
  +}
   
  -/* prevent core... */
  -if (name==NULL)
  -return(NULL);
  +if( name==NULL ) {
  +name=pool->calloc( env, pool, 10 );
  +snprintf( name, 10, "%s.%d", type, env->id++ );
  +}
   
  -fac=_this->getFactory( _this, type, name);
  +fac=jk2_env_getFactory( env, type);
   if( fac==NULL ) {
  -if( _this->l )
  -_this->l->jkLog(_this, _this->l, JK_LOG_ERROR,
  +if( env->l ) {
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
   "Error getting factory for %s:%s\n", type, name);
  +} else {
  +fprintf( stderr, "Error getting factory for %s \n",  type );
  +}
   return NULL;
   }
   
  -fac( _this, pool, &result, type, name );
  -if( result==NULL ) {
  -if( _this->l )
  -_this->l->jkLog(_this, _this->l, JK_LOG_ERROR,
  +result=(jk_bean_t *)pool->calloc( NULL, pool, sizeof( jk_bean_t ));
  +result->type=type;
  +result->name=name;
  +
  +fac( env, pool, result, type, name );
  +if( result->object==NULL ) {
  +if( env->l )
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
   "Error getting instance for %s:%s\n", type, name);
   return NULL;
   }
  +
  +env->_objects->put( env, env->_objects, name, result, NULL );
   
  -return result;
  +return result->object;
   }
   
  +static void *jk2_env_getByName(jk_env_t *env, const char *name)
  +{
  +jk_bean_t *result;
  +
  +if( name==NULL ) {
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +"env.getByName(): NullPointerException\n");
  +return NULL;
  +}
  +
  +
  +result=(jk_bean_t *)env->_objects->get( env, env->_objects, name );
  +if( result==NULL ) return NULL;
  +
  +return result->object;
  +}
  +
  +static jk_bean_t JK_METHOD *jk2_env_getBean(jk_env_t *env, const char *name)
  +{
  +if( name==NULL ) {
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +"env.getByName(): NullPointerException\n");
  +return NULL;
  +}
  

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_handler_discovery.c jk_handler_logon.c jk_handler_response.c

2002-02-21 Thread hgomez

hgomez  02/02/21 03:10:12

  Modified:jk/native2/common jk_env.c jk_handler_discovery.c
jk_handler_logon.c jk_handler_response.c
  Log:
  Second batch of jk2 renaming
  
  Revision  ChangesPath
  1.10  +17 -17jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_env.c  6 Feb 2002 19:20:41 -   1.9
  +++ jk_env.c  21 Feb 2002 11:10:12 -  1.10
  @@ -62,37 +62,37 @@
   
   /* Private methods 
   */
  -static void jk_env_initEnv( jk_env_t *env, char *id );
  +static void jk2_env_initEnv( jk_env_t *env, char *id );
   
   /* XXX We should have one env per thread to avoid sync problems. 
  The env will provide access to pools, etc 
   */
   
  -jk_env_t* JK_METHOD jk_env_getEnv( char *id, jk_pool_t *pool ) {
  +jk_env_t* JK_METHOD jk2_env_getEnv( char *id, jk_pool_t *pool ) {
 if( jk_env_globalEnv == NULL ) {
 jk_env_globalEnv=(jk_env_t *)pool->calloc( NULL, pool, sizeof( jk_env_t ));
 jk_env_globalEnv->globalPool = pool;
  -  jk_env_initEnv( (jk_env_t *)jk_env_globalEnv, id );
  +  jk2_env_initEnv( (jk_env_t *)jk_env_globalEnv, id );
 }
 return jk_env_globalEnv;
   }
   
   /*  Implementation  */
   
  -static jk_env_t * JK_METHOD jk_env_get( jk_env_t *env )
  +static jk_env_t * JK_METHOD jk2_env_get( jk_env_t *env )
   {
   return NULL;
   }
   
  -static int JK_METHOD jk_env_put( jk_env_t *parent, jk_env_t *chld )
  +static int JK_METHOD jk2_env_put( jk_env_t *parent, jk_env_t *chld )
   {
   
   return JK_TRUE;
   }
   
  -static jk_env_objectFactory_t JK_METHOD jk_env_getFactory(jk_env_t *env, 
  -  const char *type,
  -  const char *name )
  +static jk_env_objectFactory_t JK_METHOD jk2_env_getFactory(jk_env_t *env, 
  +   const char *type,
  +   const char *name)
   {
 jk_env_objectFactory_t result;
 /* malloc/free: this is really temporary, and is executed only at setup
  @@ -117,8 +117,8 @@
 return result;
   }
   
  -static void *jk_env_getInstance( jk_env_t *_this, jk_pool_t *pool,
  - const char *type, const char *name )
  +static void *jk2_env_getInstance(jk_env_t *_this, jk_pool_t *pool,
  + const char *type, const char *name)
   {
   jk_env_objectFactory_t fac;
   void *result;
  @@ -147,7 +147,7 @@
   }
   
   
  -static void JK_METHOD jk_env_registerFactory(jk_env_t *env, 
  +static void JK_METHOD jk2_env_registerFactory(jk_env_t *env, 
const char *type,
const char *name, 
jk_env_objectFactory_t fact)
  @@ -165,14 +165,14 @@
 env->_registry->put( env, env->_registry, typeName, fact, &old );
   }
   
  -static void jk_env_initEnv( jk_env_t *env, char *id ) {
  +static void jk2_env_initEnv( jk_env_t *env, char *id ) {
 /*   env->logger=NULL; */
 /*   map_alloc( & env->properties ); */
  -  env->getFactory= jk_env_getFactory; 
  -  env->registerFactory= jk_env_registerFactory;
  -  env->getInstance= jk_env_getInstance; 
  -  jk_map_default_create( env, & env->_registry, env->globalPool );
  -  jk_registry_init(env);
  +  env->getFactory= jk2_env_getFactory; 
  +  env->registerFactory= jk2_env_registerFactory;
  +  env->getInstance= jk2_env_getInstance; 
  +  jk2_map_default_create( env, & env->_registry, env->globalPool );
  +  jk2_registry_init(env);
   }
   
   
  
  
  
  1.11  +8 -8  
jakarta-tomcat-connectors/jk/native2/common/jk_handler_discovery.c
  
  Index: jk_handler_discovery.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_discovery.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_handler_discovery.c16 Dec 2001 23:18:11 -  1.10
  +++ jk_handler_discovery.c21 Feb 2002 11:10:12 -  1.11
  @@ -58,7 +58,7 @@
   /**
* Description: AJP14 Discovery handler
* Author:  Henri Gomez <[EMAIL PROTECTED]>
  - * Version: $Revision: 1.10 $  
  + * Version: $Revision: 1.11 $  
*/
   
   #include "jk_global.h"
  @@ -72,7 +72,7 @@
   #include "jk_workerEnv.h"
   #include "jk_registry.h"
   
  -int JK_METHOD jk_handler_discovery_factory( jk_env_t *env, jk_pool_t *pool,
  +int JK_METHOD j

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_worker_jni.c

2002-02-06 Thread costin

costin  02/02/06 11:20:42

  Modified:jk/native2/common jk_env.c jk_worker_jni.c
  Log:
  Updates/fixes.
  
  Revision  ChangesPath
  1.9   +19 -8 jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_env.c  31 Dec 2001 22:25:03 -  1.8
  +++ jk_env.c  6 Feb 2002 19:20:41 -   1.9
  @@ -56,9 +56,9 @@
* = */

   #include "jk_env.h"
  +#include "jk_objCache.h"
   
  -/* Singleton for now */
  -jk_env_t *jk_env_singleton;
  +jk_env_t *jk_env_globalEnv;
   
   /* Private methods 
   */
  @@ -69,16 +69,26 @@
   */
   
   jk_env_t* JK_METHOD jk_env_getEnv( char *id, jk_pool_t *pool ) {
  -  if( jk_env_singleton == NULL ) {
  -  jk_env_singleton=(jk_env_t *)pool->calloc( NULL, pool, sizeof( jk_env_t ));
  -  jk_env_singleton->globalPool = pool;
  -  jk_env_initEnv( (jk_env_t *)jk_env_singleton, id );
  +  if( jk_env_globalEnv == NULL ) {
  +  jk_env_globalEnv=(jk_env_t *)pool->calloc( NULL, pool, sizeof( jk_env_t ));
  +  jk_env_globalEnv->globalPool = pool;
  +  jk_env_initEnv( (jk_env_t *)jk_env_globalEnv, id );
 }
  -  return jk_env_singleton;
  +  return jk_env_globalEnv;
   }
   
   /*  Implementation  */
   
  +static jk_env_t * JK_METHOD jk_env_get( jk_env_t *env )
  +{
  +return NULL;
  +}
  +
  +static int JK_METHOD jk_env_put( jk_env_t *parent, jk_env_t *chld )
  +{
  +
  +return JK_TRUE;
  +}
   
   static jk_env_objectFactory_t JK_METHOD jk_env_getFactory(jk_env_t *env, 
 const char *type,
  @@ -107,7 +117,8 @@
 return result;
   }
   
  -static void *jk_env_getInstance( jk_env_t *_this, jk_pool_t *pool, const char 
*type, const char *name )
  +static void *jk_env_getInstance( jk_env_t *_this, jk_pool_t *pool,
  + const char *type, const char *name )
   {
   jk_env_objectFactory_t fac;
   void *result;
  
  
  
  1.2   +2 -1  jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c
  
  Index: jk_worker_jni.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_worker_jni.c   26 Jan 2002 06:48:17 -  1.1
  +++ jk_worker_jni.c   6 Feb 2002 19:20:41 -   1.2
  @@ -198,7 +198,8 @@
   
   if( jniWorker->jk_java_bridge_class == NULL ) {
   env->l->jkLog(env, env->l, JK_LOG_EMERG,
  -  "Can't find class %s\n", str_config);
  +  "Can't find class %s in %s\n", str_config,
  +  jniWorker->vm->tomcat_classpath );
   /* [V] the detach here may segfault on 1.1 JVM... */
   jniWorker->vm->detach(env,  jniWorker->vm);
   return JK_FALSE;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_map.c jk_registry.c jk_registry.h

2001-12-31 Thread jfclere

jfclere 01/12/31 14:25:03

  Modified:jk/native2 build.xml
   jk/native2/common jk_env.c jk_map.c jk_registry.c
jk_registry.h
  Log:
  Add a piece of APR. And arrange build.xml for Linux (Sun JVM).
  
  Revision  ChangesPath
  1.8   +13 -1 jakarta-tomcat-connectors/jk/native2/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.xml 31 Dec 2001 20:03:41 -  1.7
  +++ build.xml 31 Dec 2001 22:25:03 -  1.8
  @@ -16,7 +16,9 @@
 
 
 
  +  
 
   
 
  @@ -60,6 +62,7 @@
 
   
 
  +
   
   
 
  +  
 


  - 
  + 
 
 

  @@ -83,6 +88,7 @@



  +
 
 

  @@ -121,6 +127,7 @@
   
   
   
  +
 
 

  @@ -192,6 +199,8 @@

   
   
  +
  +
 
 

  @@ -260,6 +269,8 @@
   

   
  +
  +
   
   
 
  @@ -318,6 +329,7 @@


   
  +
   
 
 
  
  
  
  1.8   +4 -0  jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_env.c  16 Dec 2001 23:18:11 -  1.7
  +++ jk_env.c  31 Dec 2001 22:25:03 -  1.8
  @@ -112,6 +112,10 @@
   jk_env_objectFactory_t fac;
   void *result;
   
  +/* prevent core... */
  +if (name==NULL)
  +return(NULL);
  +
   fac=_this->getFactory( _this, type, name);
   if( fac==NULL ) {
   if( _this->l )
  
  
  
  1.11  +4 -3  jakarta-tomcat-connectors/jk/native2/common/jk_map.c
  
  Index: jk_map.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_map.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_map.c  31 Dec 2001 19:17:51 -  1.10
  +++ jk_map.c  31 Dec 2001 22:25:03 -  1.11
  @@ -58,7 +58,7 @@
   /***
* Description: General purpose map object *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.10 $   *
  + * Version: $Revision: 1.11 $   *
***/
   
   #include "jk_global.h"
  @@ -134,9 +134,10 @@
   /* XXX this is wrong - either we take ownership and copy both
  name and value,
  or none. The caller should do that if he needs !
  -*/
  -/* mPriv->names[mPriv->size] = m->pool->pstrdup(m->pool, name); */
  +   Sure, but we should have our copy...
   mPriv->names[mPriv->size] =  (char *)name; 
  +*/
  +mPriv->names[mPriv->size] = m->pool->pstrdup(env,m->pool, name);
   mPriv->size ++;
   rc = JK_TRUE;
   }
  
  
  
  1.8   +5 -1  jakarta-tomcat-connectors/jk/native2/common/jk_registry.c
  
  Index: jk_registry.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_registry.c 31 Dec 2001 20:37:01 -  1.7
  +++ jk_registry.c 31 Dec 2001 22:25:03 -  1.8
  @@ -63,7 +63,7 @@
   #include "jk_registry.h"
   /***
* Description: Worker list*
  - * Version: $Revision: 1.7 $   *
  + * Version: $Revision: 1.8 $   *
***/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  @@ -112,7 +112,11 @@
 env->registerFactory( env, "worker", "ajp14", jk_worker_ajp14_factory );
 env->registerFactory( env, "worker", "lb",jk_worker_lb_factory );
 env->registerFactory( env, "worker", "status", jk_worker_status_factory );
  +#ifdef HAS_APR
  +  env->registerFactory( env, "channel", "socket", jk_channel_apr_socket_factory );
  +#else
 env->registerFactory(