tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_uriEnv.c
Date Wed, 05 Mar 2003 00:00:24 GMT
costin      2003/03/04 16:00:24

  Modified:    jk/native2/common jk_uriEnv.c
  Log:
  Add a normal init method.
  
  Adding uris at runtime is not as important ( and it will only work for the slower
  config ), but for consistency.
  
  Revision  Changes    Path
  1.44      +24 -2     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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- jk_uriEnv.c	1 Mar 2003 05:49:58 -0000	1.43
  +++ jk_uriEnv.c	5 Mar 2003 00:00:23 -0000	1.44
  @@ -284,6 +284,22 @@
   }
   
   
  +static int jk2_uriEnv_beanInit(jk_env_t *env, jk_bean_t *bean)
  +{
  +    jk_uriEnv_t *uriEnv=bean->object;
  +    int res=JK_OK;
  +
  +    if( bean->state == JK_STATE_INIT ) return JK_OK;
  +    
  +    if( uriEnv->init ) {
  +        res=uriEnv->init( env, uriEnv );
  +    }
  +    if( res==JK_OK ) {
  +        bean->state=JK_STATE_INIT;
  +    }
  +    return res;
  +}
  +
   static int jk2_uriEnv_init(jk_env_t *env, jk_uriEnv_t *uriEnv)
   {
   /*    int err; */
  @@ -299,12 +315,16 @@
       if( uriEnv->workerName == NULL ) {
           /* The default worker */
           uriEnv->workerName=uriEnv->uriMap->workerEnv->defaultWorker->mbean->name;;
  +        wname=uriEnv->workerName;
           uriEnv->worker=uriEnv->uriMap->workerEnv->defaultWorker;
   
           if( uriEnv->mbean->debug > 0 )
               env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  -                          "uriEnv.init() map %s %s\n",
  -                          uriEnv->uri, uriEnv->uriMap->workerEnv->defaultWorker->mbean->name);
  +                          "uriEnv.init() map %s %s %s\n",
  +                          uriEnv->uri, uriEnv->uriMap->workerEnv->defaultWorker->mbean->name,
uriEnv->workerName);
  +        if( uriEnv->workerName == NULL ) {
  +            uriEnv->workerName="lb:lb";
  +        }
       }
   
       /* No further init - will be called by uriMap.init() */
  @@ -467,6 +487,7 @@
                          uriEnv->mbean->name, uriEnv->virtual, uriEnv->uri,
                          uriEnv->match_type, uriEnv->contextPath, uriEnv->prefix,
uriEnv->suffix );
       
  +    uriEnv->mbean->state=JK_STATE_INIT;
       return JK_OK;
   }
   
  @@ -487,6 +508,7 @@
       
       jk2_map_default_create(env, &uriEnv->properties, uriPool);
   
  +    result->init = jk2_uriEnv_beanInit;
       uriEnv->init = jk2_uriEnv_init;
   
       result->setAttribute = jk2_uriEnv_setAttribute;
  
  
  

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


Mime
View raw message