Re: jk2 and debug on specials uri

2004-04-05 Thread NormW
Good morning Henri,
Being 'in between employment' as they say, I do have some hours, but my
first step would be to buy a 'small' book to see what it is all about.
Beyond general browsing of the Tomcat xdocs I have little experience with
the technology and no experience creating an xml document. Provided the task
remains open to allcomers and doesn't stop on the assumption that 'the ball
is in my court', I can have a look at it if someone gets it finished
first, so much the better.

Regards,
Norm

- Original Message - 
From: "Henri Gomez" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Monday, April 05, 2004 10:03 PM
Subject: Re: jk2 and debug on specials uri


> NormW wrote:
>
> > Good evening Henri,
> > Thanks for taking the patch.
> >
> > The pseudo-code (now below) is mostly an 'analysis' of what I would
expect
> > JkUriSet to do based on understanding of the process. From this it is
mostly
> > a check list of what to expect to find when looking at what the code
> > actually does. In looking at the uri records the current process
creates, I
> > noticed the 'name' and 'uri' now lacks the added numbers, yet when I
tried
> > the get= command I couldn't retrieve the object;  a dmp= showed the uri
> > records still get an object name that has a number added on, which is a
> > little confusing.
> >
> > As mentioned previously, it's my understanding the uri records are meant
to
> > aim a url at a designated worker, and if the uri record is first created
in
> > workers2.properties then the 'comment' in the mod_jk2.c source that "all
> > entries passed in [via jkuriset] are unique" clearly _may_ not apply. In
> > that sense the uri objects are much like database records with a primary
key
> > that includes the host, port and context... [uri:/examples/*] says to
use
> > the 'default' host and port, and if the  block isn't inside a
> > virtual host directive, then  effectively means
the
> > same thing, so there really isn't a need to create an extra uri
object
> >
> > As I said, it's mostly meant as a checklist, and is only valid if I
> > understand the requirements. While I would like to be able to code a
patch
> > for this, my C skills are such that I limited my pseudo-code to use
enough
> > to make it easier to understand it doesn't necessarily make it
right.
>
> Thanks Norm.
>
> Any patch welcome.
>
> Also what about working on an XML version of jkstatus ?
>
> Could you save some hours on it ?
>
>
> -
> 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: jk2 and debug on specials uri

2004-04-05 Thread Henri Gomez
NormW wrote:

Good evening Henri,
Thanks for taking the patch.
The pseudo-code (now below) is mostly an 'analysis' of what I would expect
JkUriSet to do based on understanding of the process. From this it is mostly
a check list of what to expect to find when looking at what the code
actually does. In looking at the uri records the current process creates, I
noticed the 'name' and 'uri' now lacks the added numbers, yet when I tried
the get= command I couldn't retrieve the object;  a dmp= showed the uri
records still get an object name that has a number added on, which is a
little confusing.
As mentioned previously, it's my understanding the uri records are meant to
aim a url at a designated worker, and if the uri record is first created in
workers2.properties then the 'comment' in the mod_jk2.c source that "all
entries passed in [via jkuriset] are unique" clearly _may_ not apply. In
that sense the uri objects are much like database records with a primary key
that includes the host, port and context... [uri:/examples/*] says to use
the 'default' host and port, and if the  block isn't inside a
virtual host directive, then  effectively means the
same thing, so there really isn't a need to create an extra uri object
As I said, it's mostly meant as a checklist, and is only valid if I
understand the requirements. While I would like to be able to code a patch
for this, my C skills are such that I limited my pseudo-code to use enough
to make it easier to understand it doesn't necessarily make it right.
Thanks Norm.

Any patch welcome.

Also what about working on an XML version of jkstatus ?

Could you save some hours on it ?

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


Re: jk2 and debug on specials uri

2004-04-05 Thread NormW
Good evening Henri,
Thanks for taking the patch.

The pseudo-code (now below) is mostly an 'analysis' of what I would expect
JkUriSet to do based on understanding of the process. From this it is mostly
a check list of what to expect to find when looking at what the code
actually does. In looking at the uri records the current process creates, I
noticed the 'name' and 'uri' now lacks the added numbers, yet when I tried
the get= command I couldn't retrieve the object;  a dmp= showed the uri
records still get an object name that has a number added on, which is a
little confusing.

As mentioned previously, it's my understanding the uri records are meant to
aim a url at a designated worker, and if the uri record is first created in
workers2.properties then the 'comment' in the mod_jk2.c source that "all
entries passed in [via jkuriset] are unique" clearly _may_ not apply. In
that sense the uri objects are much like database records with a primary key
that includes the host, port and context... [uri:/examples/*] says to use
the 'default' host and port, and if the  block isn't inside a
virtual host directive, then  effectively means the
same thing, so there really isn't a need to create an extra uri object

As I said, it's mostly meant as a checklist, and is only valid if I
understand the requirements. While I would like to be able to code a patch
for this, my C skills are such that I limited my pseudo-code to use enough
to make it easier to understand it doesn't necessarily make it right.

Thanks for the time.
Norm

> NormW wrote:
>
> > Good afternoon Henri.
> > In visualising the process of JkUriSet, arrived at the following in
> > pseudo-code. Shame I can't translate it to C otherwise I would offer a
diff.
> > :-)
> > Regards,
> > Norm
> >
> > JkUriSet property, value
> > /* Only allow inside a Location block */
> > if (! block) {
> >  log "error, JkUriSet not allowed here"
> >  return CONFIG_ERROR
> > }
> > /* 2 Parameters - property and value */
> > if (!property or !value) {
> >  log "error, missing parameter(s) - property and value"
> >  return CONFIG_ERROR
> > }
> > /* The property must be in the setAttrInfo list */
> > if(!property in setAttrInfo() ) {
> >  log "error, property not settable-", property
> >  return CONFIG_ERROR
> > }
> > /* Create uri name using host, port, location */
> >  .. ()
> > if(!valid name) {
> >  log "error, missing or invalid data - ", host,port,context
> >  return CONFIG_ERROR
> > }
> > /* Check for existing uri object - update it or create a new one */
> > if(exist uri name) {
> > point to it;
> > log "warning, using existing uri object - ", name
> > } else {
> > status = create_uri()
> > if(status !=OK) {
> > log "emerg, create uri object failed - ", status
> > return CONFIG_ERROR
> > }
> > set uri object
> > (name,host,port,context,match_type,timing,disabled,debug)
> > if(default_worker != NULL) {
> > set group = default_worker
> > }
> > }
> > /* Set passed property value but first set if it is set already */
> > if (getAttr(property) != NULL) {
> >   log "warning, updating existing uri object property - ",
> > property,value
> > }
> > if(setAttr(property, value)!=OK) {
> >  log "error, setting property failed - ", property,value
> >  return CONFIG_ERROR
> > }
> > return OK.
>
> Thanks to send a diff to latest code so I could commit it.
>
>
> -
> 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: jk2 and debug on specials uri

2004-04-04 Thread Henri Gomez
Henri Gomez wrote:



Thanks to send a diff to latest code so I could commit it.
Oh, you allready provided a patch.

Thanks, I commit it ASAP

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


Re: jk2 and debug on specials uri

2004-04-04 Thread Henri Gomez
NormW wrote:

Good afternoon Henri.
In visualising the process of JkUriSet, arrived at the following in
pseudo-code. Shame I can't translate it to C otherwise I would offer a diff.
:-)
Regards,
Norm
JkUriSet property, value
/* Only allow inside a Location block */
if (! block) {
 log "error, JkUriSet not allowed here"
 return CONFIG_ERROR
}
/* 2 Parameters - property and value */
if (!property or !value) {
 log "error, missing parameter(s) - property and value"
 return CONFIG_ERROR
}
/* The property must be in the setAttrInfo list */
if(!property in setAttrInfo() ) {
 log "error, property not settable-", property
 return CONFIG_ERROR
}
/* Create uri name using host, port, location */
 .. ()
if(!valid name) {
 log "error, missing or invalid data - ", host,port,context
 return CONFIG_ERROR
}
/* Check for existing uri object - update it or create a new one */
if(exist uri name) {
point to it;
log "warning, using existing uri object - ", name
} else {
status = create_uri()
if(status !=OK) {
log "emerg, create uri object failed - ", status
return CONFIG_ERROR
}
set uri object
(name,host,port,context,match_type,timing,disabled,debug)
if(default_worker != NULL) {
set group = default_worker
}
}
/* Set passed property value but first set if it is set already */
if (getAttr(property) != NULL) {
  log "warning, updating existing uri object property - ",
property,value
}
if(setAttr(property, value)!=OK) {
 log "error, setting property failed - ", property,value
 return CONFIG_ERROR
}
return OK.
Thanks to send a diff to latest code so I could commit it.

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


Re: jk2 and debug on specials uri

2004-04-03 Thread NormW
Good afternoon Henri.
In visualising the process of JkUriSet, arrived at the following in
pseudo-code. Shame I can't translate it to C otherwise I would offer a diff.
:-)
Regards,
Norm

JkUriSet property, value
/* Only allow inside a Location block */
if (! block) {
 log "error, JkUriSet not allowed here"
 return CONFIG_ERROR
}
/* 2 Parameters - property and value */
if (!property or !value) {
 log "error, missing parameter(s) - property and value"
 return CONFIG_ERROR
}
/* The property must be in the setAttrInfo list */
if(!property in setAttrInfo() ) {
 log "error, property not settable-", property
 return CONFIG_ERROR
}
/* Create uri name using host, port, location */
 .. ()
if(!valid name) {
 log "error, missing or invalid data - ", host,port,context
 return CONFIG_ERROR
}
/* Check for existing uri object - update it or create a new one */
if(exist uri name) {
point to it;
log "warning, using existing uri object - ", name
} else {
status = create_uri()
if(status !=OK) {
log "emerg, create uri object failed - ", status
return CONFIG_ERROR
}
set uri object
(name,host,port,context,match_type,timing,disabled,debug)
if(default_worker != NULL) {
set group = default_worker
}
}
/* Set passed property value but first set if it is set already */
if (getAttr(property) != NULL) {
  log "warning, updating existing uri object property - ",
property,value
}
if(setAttr(property, value)!=OK) {
 log "error, setting property failed - ", property,value
 return CONFIG_ERROR
}
return OK.
--


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



Re: jk2 and debug on specials uri

2004-04-03 Thread NormW
Good morning All.
A little slower than some, plus intervening activities...
A check of jk_uriEnv.c shows neither "debug" or "disabled" are 'settable'
properties, so using a standard set approach (using setAttr) currently isn't
possible; perhaps these could be added to the setAttributes list and
function? From a JMX viewpoint these should also then be visible via
getAttr, in which case they should be at the end of the Info lists so they
are at the right hand end of the /jkstatus page uri table
Lastly, being able to control these flags during normal service might be of
some operational benefit also. (using /jkstatus?set= ).

Norm


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



Re: jk2 and debug on specials uri

2004-04-02 Thread NormW
Good morning Henri.
I was speaking from theory, as the only JkSet/JkUriSet entries that I've
used so far are setting the worker and some logger values, and they work
without problem. One thing you might see is that the JkUriSet/JkSet/JkSet2
directives only update the actual object referred to and not the
configuration space, so these settings are not seen on the 'OrigConf'
jkstatus page.

Also, if you are looking at this closely, consider what should happen if
there is duplication of a uri in both workers2.properties and Apache .conf
files. As mentioned previously, if both files contain settings that result
in the same uri->name, then a second uri object should be omitted and a log
warning created. Similarly, if a conf entry updates a non-NULL value then a
log warning would be good for that also.

[uri:/examples/*]
group=lb:worker1
-

  JkUriSet info "some details"
  JkUriSet group lb:worker2

should show as 2 warnings:
1. Because the uri object already exists,
2. Because the 'group' setting was updated.


Norm



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



Re: jk2 and debug on specials uri

2004-04-02 Thread Henri Gomez
Henri Gomez wrote:

NormW wrote:

Good evening Henri,
Wouldn't it be
  
 JkUriSet group lb
 JkUriSet debug 1
  


I tried but it didn't works ;(


or
JkSet uri:/examples/*.debug 1
or
JkSet2 uri:/examples/* debug 1


Well it didn't works neither.

I'm using these 2 on a VirtualHost

I'm looking to fix a problem with charset encoding and
it seems that in jk2_service_apache2_head(),
s->uriEnv->mbean->debug is 0 ;(

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


Re: jk2 and debug on specials uri

2004-04-02 Thread Henri Gomez
NormW wrote:
Good evening Henri,
Wouldn't it be
  
 JkUriSet group lb
 JkUriSet debug 1
  
I tried but it didn't works ;(


or
JkSet uri:/examples/*.debug 1
or
JkSet2 uri:/examples/* debug 1


Well it didn't works neither.

I'm using these 2 on a VirtualHost



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


Re: jk2 and debug on specials uri

2004-04-02 Thread NormW
Good evening Henri,
Wouldn't it be
  
 JkUriSet group lb
 JkUriSet debug 1
  
or
JkSet uri:/examples/*.debug 1
or
JkSet2 uri:/examples/* debug 1

AFAIK of the docs.  :-)
Norm

- Original Message - 
From: "Henri Gomez" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Friday, April 02, 2004 4:11 PM
Subject: jk2 and debug on specials uri


> Hi to all,
> 
> A quick question :
> 
> I've got the following in a VirtualHost (Apache 2):
> 
> 
>   JkUriSet group lb
> 
> 
> I'd like to have this /examples/ uri in debug and wonder
> how to do it.
> 
> 
> -
> 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]



jk2 and debug on specials uri

2004-04-01 Thread Henri Gomez
Hi to all,

A quick question :

I've got the following in a VirtualHost (Apache 2):


 JkUriSet group lb

I'd like to have this /examples/ uri in debug and wonder
how to do it.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]