Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-13 Thread Mladen Turk
Peter Rossbach wrote:
Cool,
after you intergrate that xml mode  I wrote the Ant task
OK, I've made xml dump for config.
To see the xml config you need to set the param:
http://localhost/jkstatus/?mime=xml
I have also removed the txtupdate, so you should use:
http://localhost/jkstatus/?cmd=update&mime=txt
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-13 Thread Peter Rossbach
Cool,
after you intergrate that xml mode  I wrote the Ant task
Great :-)
peter
Mladen Turk schrieb:
Peter Rossbach wrote:
Hello Mladen,
OK, I made a try to extract the jk status information from html.
I hope I can do that in the next week
There is no need to do that.
I'll make a complete xml dump for jkstatus.
We already have xml mode for mod_proxy so in that
case this will be reusable.
Html should be used only in standalone mode.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-13 Thread Mladen Turk
Peter Rossbach wrote:
Hello Mladen,
OK, I made a try to extract the jk status information from html.
I hope I can do that in the next week
There is no need to do that.
I'll make a complete xml dump for jkstatus.
We already have xml mode for mod_proxy so in that
case this will be reusable.
Html should be used only in standalone mode.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-13 Thread Peter Rossbach
Hello Mladen,
OK, I made a try to extract the jk status information from html.
I hope I can do that in the next week
Peter
Mladen Turk schrieb:
Peter Rossbach wrote:
I have not implement multi output mode. I have made a very straigth 
forward
implementation to JkStatusUpdateTask. The current implementation 
can't read the current Apache jk config

Any chance to enable reading jkstatus, so that manager can display
mod_jk config. I was thinking that we would build that in such
a way. I know it's a lot of work, but ...
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-13 Thread Mladen Turk
Peter Rossbach wrote:
I have not implement multi output mode. I have made a very straigth forward
implementation to JkStatusUpdateTask. The current implementation can't 
read the current Apache jk config

Any chance to enable reading jkstatus, so that manager can display
mod_jk config. I was thinking that we would build that in such
a way. I know it's a lot of work, but ...
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-13 Thread Peter Rossbach
Hello Mladen,
I have not implement multi output mode. I have made a very straigth forward
implementation to JkStatusUpdateTask. The current implementation can't 
read the current Apache jk config

The following statements are used
loadbalancer update
http://localhost/status?cmd=textupdate&w=lb&lf=false&ls=true
   lr is int >= 1
   lt is int >= 59
worker update
http://localhost/status?cmd=textupdate&w=node1&l=lb&wf=1&wd=false
   here I used for the parameter l for the name of the loadbalancer! I 
not need it for textupdate command

I also thing that next stepfor jk_status is a multi channel output mode! :-)
All worker names are URLEncoded and you can setup the charset at the ant 
task.
I wan't deal directly with the worker names at my script and not with 
the internal id's.

Peter

Mladen Turk schrieb:
Hey this is cool :).
[EMAIL PROTECTED] wrote:
  Log:
  add JkStausUpdate task for mod:jk status worker (greater mod_jk 
1.2.9 only)
  

I thought it was meant to be an XML, to pick up the config from apache.
Also, can you keep the cmd=update and add something like:
"&mime=html|xml|txt" ?
Further more 'lr' and 'lb' params are using integer values (worker id's)
so you will need to use integers or change the code to accept strings.
The reason why I choose the integers or id's was because in that case
there is no need to url encode worker names. Of course we can what
documentation says accept only alnums for worker names, but that will
break backward compatibility in some cases.
I would like for this version to add ERROR message in the log if
worker name is non-url safe, but still allow it for now.
IMO ant task should pick up default values from apache directly by
parsing xml output.
Regards,
Mladen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-12 Thread Mladen Turk
Hey this is cool :).
[EMAIL PROTECTED] wrote:
  Log:
  add JkStausUpdate task for mod:jk status worker (greater mod_jk 1.2.9 only)
  
I thought it was meant to be an XML, to pick up the config from apache.
Also, can you keep the cmd=update and add something like:
"&mime=html|xml|txt" ?
Further more 'lr' and 'lb' params are using integer values (worker id's)
so you will need to use integers or change the code to accept strings.
The reason why I choose the integers or id's was because in that case
there is no need to url encode worker names. Of course we can what
documentation says accept only alnums for worker names, but that will
break backward compatibility in some cases.
I would like for this version to add ERROR message in the log if
worker name is non-url safe, but still allow it for now.
IMO ant task should pick up default values from apache directly by
parsing xml output.
Regards,
Mladen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java catalina.tasks

2005-03-12 Thread pero
pero2005/03/12 22:39:16

  Modified:catalina/src/share/org/apache/catalina/ant catalina.tasks
  Added:   catalina/src/share/org/apache/catalina/ant
JKStatusUpdateTask.java
  Log:
  add JkStausUpdate task for mod:jk status worker (greater mod_jk 1.2.9 only)
  
  Revision  ChangesPath
  1.2   +1 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/catalina.tasks
  
  Index: catalina.tasks
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/catalina.tasks,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- catalina.tasks10 Apr 2004 15:32:56 -  1.1
  +++ catalina.tasks13 Mar 2005 06:39:16 -  1.2
  @@ -8,6 +8,7 @@
   stop=org.apache.catalina.ant.StopTask
   undeploy=org.apache.catalina.ant.UndeployTask
   validator=org.apache.catalina.ant.ValidatorTask
  +jkstatus=org.apache.catalina.ant.JKStatusUpdateTask
   
   # Jasper tasks
   jasper2=org.apache.jasper.JspC
  
  
  
  1.1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/JKStatusUpdateTask.java
  
  Index: JKStatusUpdateTask.java
  ===
  /*
   * Copyright 2002,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *  http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.apache.catalina.ant;
  
  import java.io.UnsupportedEncodingException;
  import java.net.URLEncoder;
  
  import org.apache.tools.ant.BuildException;
  
  /**
   * Ant task that implements the /status command, supported by the
   * mod_jk status (1.2.9) application.
   * 
   * @author Peter Rossbach
   * @version $Revision: 1.1 $
   * @since 5.5.9
   */
  public class JKStatusUpdateTask extends AbstractCatalinaTask {
  
  private String worker = "lb";
  
  private String workerType = "lb";
  
  private int internalid = 0;
  
  private Integer lbRetries;
  
  private Integer lbRecovertime;
  
  private Boolean lbStickySession = Boolean.TRUE;
  
  private Boolean lbForceSession = Boolean.FALSE;
  
  private Integer workerLoadFactor;
  
  private String workerRedirect;
  
  private String workerClusterDomain;
  
  private Boolean workerDisabled = Boolean.FALSE;
  
  private boolean isLBMode = true;
  
  private String workerLb;
  
  /**
   *  
   */
  public JKStatusUpdateTask() {
  super();
  setUrl("http://localhost/status";);
  }
  
  /**
   * @return Returns the internalid.
   */
  public int getInternalid() {
  return internalid;
  }
  
  /**
   * @param internalid
   *The internalid to set.
   */
  public void setInternalid(int internalid) {
  this.internalid = internalid;
  }
  
  /**
   * @return Returns the lbForceSession.
   */
  public Boolean getLbForceSession() {
  return lbForceSession;
  }
  
  /**
   * @param lbForceSession
   *The lbForceSession to set.
   */
  public void setLbForceSession(Boolean lbForceSession) {
  this.lbForceSession = lbForceSession;
  }
  
  /**
   * @return Returns the lbRecovertime.
   */
  public Integer getLbRecovertime() {
  return lbRecovertime;
  }
  
  /**
   * @param lbRecovertime
   *The lbRecovertime to set.
   */
  public void setLbRecovertime(Integer lbRecovertime) {
  this.lbRecovertime = lbRecovertime;
  }
  
  /**
   * @return Returns the lbRetries.
   */
  public Integer getLbRetries() {
  return lbRetries;
  }
  
  /**
   * @param lbRetries
   *The lbRetries to set.
   */
  public void setLbRetries(Integer lbRetries) {
  this.lbRetries = lbRetries;
  }
  
  /**
   * @return Returns the lbStickySession.
   */
  public Boolean getLbStickySession() {
  return lbStickySession;
  }
  
  /**
   * @param lbStickySession
   *The lbStickySession to set.
   */
  public void setLbStickySession(Boolean lbStickySession) {
  this.lbStickySession = lbStickySession;
  }
  
  /**
   * @return Returns the worker.
   */
  public String getWorker() {