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_worker_ajp13.c
Date Thu, 09 May 2002 21:03:45 GMT
costin      02/05/09 14:03:45

  Modified:    jk/native2/common jk_worker_ajp13.c
  Log:
  Clean up the debuging.
  
  Started to add the 'introspection' info, it'll be exposed in the status.
  
  Revision  Changes    Path
  1.16      +14 -7     jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c
  
  Index: jk_worker_ajp13.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_worker_ajp13.c	8 May 2002 23:57:16 -0000	1.15
  +++ jk_worker_ajp13.c	9 May 2002 21:03:45 -0000	1.16
  @@ -105,7 +105,7 @@
           return buf;
       } else if (strcmp( name, "lb_value" )==0 ) {
           char *buf=env->tmpPool->calloc( env, env->tmpPool, 20 );
  -        sprintf( buf, "%f", worker->lb_value );
  +        sprintf( buf, "%d", worker->lb_value );
           return buf;
       } else if (strcmp( name, "reqCnt" )==0 ) {
           char *buf=env->tmpPool->calloc( env, env->tmpPool, 20 );
  @@ -117,7 +117,7 @@
           return buf;
       } else if (strcmp( name, "lb_factor" )==0 ) {
           char *buf=env->tmpPool->calloc( env, env->tmpPool, 20 );
  -        sprintf( buf, "%f", worker->lb_factor );
  +        sprintf( buf, "%d", worker->lb_factor );
           return buf;
       } else if (strcmp( name, "errorState" )==0 ) {
           if( worker->in_error_state ) 
  @@ -140,6 +140,11 @@
       }
   }
   
  +static char *jk2_worker_ajp_multiValueInfo[]={"group", NULL };
  +
  +static char *jk2_worker_ajp_setAttributeInfo[]={"debug", "channel", "tomcatId", "lb_factor",
NULL };
  +
  +
   /*
    * Initialize the worker.
    */
  @@ -164,12 +169,10 @@
       } else if( strcmp( name, "cachesize" )==0 ) {
           ajp14->cache_sz=atoi( value );
       } else if( strcmp( name, "lb_factor" )==0 ) {
  -        ajp14->lb_factor=atof( value );
  +        ajp14->lb_factor=atoi( value );
       } else if( strcmp( name, "channel" )==0 ) {
           ajp14->channelName=value;
       } else {
  -        env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.setProperty() Unknown property %s %s %s\n", mbean->name,
name, value );
           return JK_ERR;
       }
   
  @@ -606,6 +609,10 @@
       int size;
       int i;
   
  +    if(ajp14->channel != NULL &&
  +       ajp14->channel->mbean->debug > 0 )
  +        ajp14->mbean->debug = 1;
  +    
       if( ajp14->cache_sz == -1 )
           ajp14->cache_sz=JK_OBJCACHE_DEFAULT_SZ;
   
  @@ -637,7 +644,7 @@
           /* No explicit groups, it'll go to default lb */
           jk_worker_t *lb=ajp14->workerEnv->defaultWorker;
           
  -        lb->mbean->setAttribute(env, lb->mbean, "balanced_workers",
  +        lb->mbean->setAttribute(env, lb->mbean, "worker",
                                   ajp14->mbean->name);
           if( ajp14->mbean->debug > 0 ) 
               env->l->jkLog(env, env->l, JK_LOG_INFO,
  @@ -666,7 +673,7 @@
                       return JK_ERR;
                   }
               }
  -            lb->mbean->setAttribute(env, lb->mbean, "balanced_workers",
  +            lb->mbean->setAttribute(env, lb->mbean, "worker",
                                       ajp14->mbean->name);
           }
   
  
  
  

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


Mime
View raw message