costin      02/05/14 10:25:24

  Modified:    jk/native2/common jk_worker_status.c
  Log:
  - fix the display of object properties ( html )
  
  - the status page will also check for config updates.
  
  It is very easy to separate the 2, and to add more 'control' functionality,
  but for now that should be enough.
  
  Revision  Changes    Path
  1.19      +19 -4     jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c
  
  Index: jk_worker_status.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- jk_worker_status.c        9 May 2002 21:09:41 -0000       1.18
  +++ jk_worker_status.c        14 May 2002 17:25:24 -0000      1.19
  @@ -182,8 +182,11 @@
           if( propCount==0 ) {
               s->jkprintf(env, s, "<tr><th>%s</th><td></td></tr>", mbean->name );
           } else {
  -            s->jkprintf(env, s, "<tr><th rowspan='%d'>%s</th></tr>", propCount, 
mbean->name );
  -            for( j=0; j < propCount ; j++ ) {
  +            s->jkprintf(env, s, "<tr><th 
rowspan='%d'>%s</th><td>%s</td><td>%s</td></tr>",
  +                        propCount, mbean->name,
  +                        mbean->settings->nameAt( env, mbean->settings, 0),
  +                        mbean->settings->valueAt( env, mbean->settings, 0));
  +            for( j=1; j < propCount ; j++ ) {
                   char *pname=mbean->settings->nameAt( env, mbean->settings, j);
                   /* Don't save redundant information */
                   if( strcmp( pname, "name" ) != 0 ) {
  @@ -202,6 +205,8 @@
   {
       char *uri=s->req_uri;
       jk_map_t *queryMap;
  +    int status;
  +    int didUpdate;
   
       if( w->mbean->debug > 0 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO, "status.service() %s %s\n",
  @@ -219,6 +224,18 @@
       if( s->query_string == NULL ) {
           s->query_string="get=*";
       }
  +
  +    w->workerEnv->config->update( env, w->workerEnv->config, &didUpdate );
  +    if( didUpdate ) {
  +        jk_shm_t *shm=w->workerEnv->shm;
  +        
  +        /* Update the scoreboard's version - all other
  +           jk2 processes will see this and update
  +        */
  +        if( shm!=NULL && shm->head!=NULL )
  +            shm->head->lbVer++;
  +    }
  +    
       
       /* Body */
       jk2_worker_status_displayRuntimeType(env, s, s->workerEnv, "ajp13" );
  @@ -245,8 +262,6 @@
                         "status_worker.factory() OutOfMemoryException\n");
           return JK_ERR;
       }
  -
  -    _this->pool           = pool;
   
       _this->service        = jk2_worker_status_service;
   
  
  
  

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

Reply via email to