DO NOT REPLY [Bug 41124] - tcnative problem when streaming files large PDF files (ClientAbortException)

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41124





--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 10:35 ---
I can't reproduce this problem for the follwoing three setups. I used your
modjk.war with:

TC 5.5.17, apr lib 1.1.3 and apr 1.2.7. Connector setting default:

JVM 1.5.0_06
Apache 2.0.59/mod_jk 1.2.19
both on the same machine running SLES 9 SP2 x86_64

TC 5.5.20, apr lib 1.1.8-dev and apr 1.2.8-dev. Connector setting default:

JVM 1.5.0_07 on Solaris 10, Apache 2.0.59/mod_jk 1.2.19 on SLES 9 SP2 x86_64

TC 5.5.20, apr lib 1.1.8-dev and apr 1.2.8-dev. Connector setting default:

JVM 1.5.0_05 on SLES 9 SP2 i586, Apache 2.0.59/mod_jk 1.2.19 on SLES 9 SP2 
x86_64

mod_jk settings for the worker default apart from type=ajp13, host and port

In all cases I could retrive the five different PDF files and the results had
the correct checksum.

But: I didn't use acrobat. I simply used curl to retrieve the result, to make
sure, that it's not a combined problem with the client. Also the connection
between apache and tomcat was a fast one.

apr was compiled with enabled thread support in all cases.

Could you please check, if the problem can be reproduced using a simple client
like curl? How long does the download take (add %D to your LogFormat in apache)?
What are the exact mod_jk and the connector settings?



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r485049 - /tomcat/connectors/trunk/jk/xdocs/reference/status.xml

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 11:30:54 2006
New Revision: 485049

URL: http://svn.apache.org/viewvc?view=rev&rev=485049
Log:
Adding version information and compatibility disclaimers
to the new status worker documentation page.

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/status.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/status.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/status.xml?view=diff&rev=485049&r1=485048&r2=485049
==
--- tomcat/connectors/trunk/jk/xdocs/reference/status.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/status.xml Sat Dec  9 11:30:54 
2006
@@ -35,6 +35,9 @@
 complete coverage of the various request parameters and their meaning, so that 
you can
 include the status worker in your automation scripts. 
 
+
+The documentation of the status worker starts with jk 1.2.20
+
 
 
 
@@ -299,6 +302,13 @@
 
 
 
+
+This section should help you building automation scripts based on the jk status
+management interface. This interface is still not stable, we expect further
+improvements in the next releases. It is well possible, that the request 
parameters
+might change in an incompatible way. So be prepared to change you scripts when
+updating to future versions.
+
 
 
 



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



svn commit: r485059 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 12:49:27 2006
New Revision: 485059

URL: http://svn.apache.org/viewvc?view=rev&rev=485059
Log:
Don't use abbreviations in the output of the status worker.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=485059&r1=485058&r2=485059
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec  9 12:49:27 
2006
@@ -2433,7 +2433,7 @@
 jk_printf(s, "Balancer Workers: count=%d\n", count);
 }
 else if (mime == JK_STATUS_MIME_PROP) {
-jk_print_prop_att_int(s, w, NULL, "lb_cnt", count);
+jk_print_prop_att_int(s, w, NULL, "lb_count", count);
 }
 else {
 jk_printf(s, "Listing Load Balancing Worker%s (%d 
Worker%s) [",
@@ -2465,7 +2465,7 @@
 jk_printf(s, "AJP Workers: count=%d\n", count);
 }
 else if (mime == JK_STATUS_MIME_PROP) {
-jk_print_prop_att_int(s, w, NULL, "ajp_cnt", count);
+jk_print_prop_att_int(s, w, NULL, "ajp_count", count);
 }
 else {
 jk_printf(s, "Listing AJP Worker%s (%d Worker%s) [",
@@ -3228,18 +3228,18 @@
 else if (mime == JK_STATUS_MIME_XML) {
 jk_print_xml_start_elt(s, w, 2, 0, "result");
 jk_print_xml_att_string(s, 4, "type", "ERROR");
-jk_print_xml_att_string(s, 4, "msg", err);
+jk_print_xml_att_string(s, 4, "message", err);
 jk_print_xml_stop_elt(s, 2, 1);
 }
 else if (mime == JK_STATUS_MIME_TXT) {
 jk_puts(s, "Result:");
 jk_printf(s, " type=%s", "ERROR");
-jk_printf(s, " msg=\"%s\"", err);
+jk_printf(s, " message=\"%s\"", err);
 jk_puts(s, "\n");
 }
 else {
 jk_print_prop_att_string(s, w, "result", "type", "ERROR");
-jk_print_prop_att_string(s, w, "result", "msg", err);
+jk_print_prop_att_string(s, w, "result", "message", err);
 }
 }
 else {
@@ -3249,18 +3249,18 @@
 else if (mime == JK_STATUS_MIME_XML) {
 jk_print_xml_start_elt(s, w, 2, 0, "result");
 jk_print_xml_att_string(s, 4, "type", "OK");
-jk_print_xml_att_string(s, 4, "msg", "Action finished");
+jk_print_xml_att_string(s, 4, "message", "Action finished");
 jk_print_xml_stop_elt(s, 2, 1);
 }
 else if (mime == JK_STATUS_MIME_TXT) {
 jk_puts(s, "Result:");
 jk_printf(s, " type=%s", "OK");
-jk_printf(s, " msg=\"%s\"", "Action finished");
+jk_printf(s, " message=\"%s\"", "Action finished");
 jk_puts(s, "\n");
 }
 else {
 jk_print_prop_att_string(s, w, "result", "type", "OK");
-jk_print_prop_att_string(s, w, "result", "msg", "Action finished");
+jk_print_prop_att_string(s, w, "result", "message", "Action 
finished");
 }
 }
 if (mime == JK_STATUS_MIME_HTML) {



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



DO NOT REPLY [Bug 41124] - tcnative problem when streaming files large PDF files (ClientAbortException)

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41124





--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 14:45 ---
(In reply to comment #8)
> I can't reproduce this problem for the follwoing three setups. I used your
> modjk.war with:
> 

Hi Rainer,

Thanks for replying.

> [..snip..]
> 
> But: I didn't use acrobat. I simply used curl to retrieve the result, to make
> sure, that it's not a combined problem with the client. Also the connection
> between apache and tomcat was a fast one.
> 
> apr was compiled with enabled thread support in all cases.
> 
> Could you please check, if the problem can be reproduced using a simple client
> like curl?

That's the thing. I tried with both curl and wget and cannot get it to fail. If
I try with either IE or Firefox it starts failing (usually) for file4.pdf and
file10.pdf. Sometimes even file1.pdf fails. Even if you try to say "save"
instead of "open", the file size ends up truncated. Can you try your test again
with browsers?

> 
> How long does the download take (add %D to your LogFormat in apache)?
> 

For a few failed requests it was (I believe in microseconds):

3448705
3594590
857019

> 
> What are the exact mod_jk and the connector settings?
> 

I believe I mentioned the mod_jk settings in comment 0. Here they are again:

Here's my mod_jk.conf:

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkShmFile logs/mod_jk.shm
JkMount /jkstatus/ status
JkMount /sws/* local
JkMount /modjk/* local

(I forgot to type in the /modjk/* line last time).

Here's my workers.properties:

worker.list=local,status
worker.local.type=ajp13
worker.local.port=8009
worker.local.host=localhost
worker.status.type=status
worker.status.port=8009
worker.status.host=localhost

For the connector setting (from comment 3) is:



The only thing I have done from the default setup is to add the
connectionTimeout value. The rest is plain vanilla.

My apr was configured using:
./configure
My tcnative was configured using:
./configure --with-apr=/usr/local/apr
My apache was configured using:
./configure --prefix=/www --enable-ssl --enable-proxy 
--enable-mods-shared=all
My modjk was configured using:
./configure --with-apxs=/www/bin/apxs --enable-jni --with-java-platform=2

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r485089 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 15:32:04 2006
New Revision: 485089

URL: http://svn.apache.org/viewvc?view=rev&rev=485089
Log:
status worker fixes:
- use int format instead of unsigned int.
- update vars before logging them

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=485089&r1=485088&r2=485089
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec  9 15:32:04 
2006
@@ -1,4 +1,3 @@
-// & encoding+// versions with show (hide?), hr
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one or more
  *  contributor license agreements.  See the NOTICE file distributed with
@@ -222,12 +221,12 @@
"%" JK_UINT32_T_FMT "" \
"%s" \
"%s" \
-   "%u" \
-   "%u" \
+   "%d" \
+   "%d" \
"%s" \
"%s" \
"%s" \
-   "%u" \
+   "%d" \
"\n"
 
 typedef struct status_worker status_worker_t;
@@ -444,13 +443,6 @@
 jk_printf(s, "%*s%s=\"%d\"\n", indentation, "", key, value);
 }
 
-static void jk_print_xml_att_uint(jk_ws_service_t *s,
-  int indentation,
-  const char *key, unsigned value)
-{
-jk_printf(s, "%*s%s=\"%u\"\n", indentation, "", key, value);
-}
-
 static void jk_print_xml_att_uint32(jk_ws_service_t *s,
 int indentation,
 const char *key, jk_uint32_t value)
@@ -489,18 +481,6 @@
 }
 }
 
-static void jk_print_prop_att_uint(jk_ws_service_t *s, status_worker_t *w,
-   const char *name,
-   const char *key, unsigned value)
-{
-if (name) {
-jk_printf(s, "%s.%s.%s=%u\n", w->prefix, name, key, value);
-}
-else {
-jk_printf(s, "%s.%s=%u\n", w->prefix, key, value);
-}
-}
-
 static void jk_print_prop_att_uint32(jk_ws_service_t *s, status_worker_t *w,
  const char *name,
  const char *key, jk_uint32_t value)
@@ -1394,9 +1374,9 @@
 jk_print_xml_att_uint32(s, 8, "client_errors", 
wr->s->client_errors);
 jk_print_xml_att_uint64(s, 8, "transferred", 
wr->s->transferred);
 jk_print_xml_att_uint64(s, 8, "read", wr->s->readed);
-jk_print_xml_att_uint(s, 8, "busy", wr->s->busy);
-jk_print_xml_att_uint(s, 8, "max_busy", wr->s->max_busy);
-jk_print_xml_att_uint(s, 8, "time_to_recover", rs < 0 ? 0 : 
rs);
+jk_print_xml_att_int(s, 8, "busy", wr->s->busy);
+jk_print_xml_att_int(s, 8, "max_busy", wr->s->max_busy);
+jk_print_xml_att_int(s, 8, "time_to_recover", rs < 0 ? 0 : rs);
 /* Terminate the tag */
 jk_print_xml_stop_elt(s, 6, 1);
 
@@ -1423,9 +1403,9 @@
 jk_printf(s, " client_errors=%" JK_UINT32_T_FMT, 
wr->s->client_errors);
 jk_printf(s, " transferred=%" JK_UINT64_T_FMT, 
wr->s->transferred);
 jk_printf(s, " read=%" JK_UINT64_T_FMT, wr->s->readed);
-jk_printf(s, " busy=%u", wr->s->busy);
-jk_printf(s, " max_busy=%u", wr->s->max_busy);
-jk_printf(s, " time_to_recover=%u", rs < 0 ? 0 : rs);
+jk_printf(s, " busy=%d", wr->s->busy);
+jk_printf(s, " max_busy=%d", wr->s->max_busy);
+jk_printf(s, " time_to_recover=%d", rs < 0 ? 0 : rs);
 jk_puts(s, "\n");
 
 }
@@ -1450,9 +1430,9 @@
 jk_print_prop_att_uint32(s, w, wr->s->name, "client_errors", 
wr->s->client_errors);
 jk_print_prop_att_uint64(s, w, wr->s->name, "transferred", 
wr->s->transferred);
 jk_print_prop_att_uint64(s, w, wr->s->name, "read", 
wr->s->readed);
-jk_print_prop_att_uint(s, w, wr->s->name, "busy", wr->s->busy);
-jk_print_prop_att_uint(s, w, wr->s->name, "max_busy", 
wr->s->max_busy);
-jk_print_prop_att_uint(s, w, wr->s->name, "time_to_recover", 
rs < 0 ? 0 : rs);
+jk_print_prop_att_int(s, w, wr->s->name, "busy", wr->s->busy);
+ 

svn commit: r485091 - in /tomcat/connectors/trunk/jk/native/common: jk_map.c jk_status.c jk_util.c jk_util.h

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 15:41:01 2006
New Revision: 485091

URL: http://svn.apache.org/viewvc?view=rev&rev=485091
Log:
Introduce general pupose conversion function
int -> string and string -> int.
Use it in map and in status worker.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_map.c
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?view=diff&rev=485091&r1=485090&r2=485091
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.c Sat Dec  9 15:41:01 2006
@@ -234,21 +234,12 @@
 int jk_map_get_bool(jk_map_t *m, const char *name, int def)
 {
 char buf[100];
-size_t len;
 const char *rc;
-int rv = 0;
 
 sprintf(buf, "%d", def);
 rc = jk_map_get_string(m, name, buf);
 
-len = strlen(rc);
-if (len) {
-if (strcasecmp(rc, "true") == 0 ||
-*rc == 'Y' || *rc == 'y' || *rc == '1') {
-rv = 1;
-}
-}
-return rv;
+return jk_get_bool_code(rc, def);
 }
 
 char **jk_map_get_string_list(jk_map_t *m,

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=485091&r1=485090&r2=485091
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec  9 15:41:01 
2006
@@ -689,14 +689,6 @@
 }
 
 
-static const char *status_val_bool(int v)
-{
-if (v == 0)
-return "False";
-else
-return "True";
-}
-
 static int status_get_string(status_endpoint_t *p,
  const char *param,
  const char *def,
@@ -742,19 +734,11 @@
jk_logger_t *l)
 {
 const char *arg;
-int rv = def;
 
 if (status_get_string(p, param, NULL, &arg, l) == JK_TRUE) {
-if (strcasecmp(arg, "on") == 0 ||
-strcasecmp(arg, "true") == 0 ||
-strcasecmp(arg, "1") == 0)
-rv = 1;
-else if (strcasecmp(arg, "off") == 0 ||
-strcasecmp(arg, "false") == 0 ||
-strcasecmp(arg, "0") == 0)
-rv = 0;
+return jk_get_bool_code(arg, def);
 }
-return rv;
+return def;
 }
 
 const char *status_cmd_text(int cmd)
@@ -1213,8 +1197,8 @@
 jk_puts(s, "" JK_STATUS_SHOW_LB_HEAD);
 jk_printf(s, JK_STATUS_SHOW_LB_ROW,
   status_worker_type(JK_LB_WORKER_TYPE),
-  status_val_bool(lb->sticky_session),
-  status_val_bool(lb->sticky_session_force),
+  jk_get_bool(lb->sticky_session),
+  jk_get_bool(lb->sticky_session_force),
   lb->retries,
   jk_lb_get_method(lb, l),
   jk_lb_get_lock(lb, l),
@@ -1237,8 +1221,8 @@
 jk_print_xml_start_elt(s, w, 2, 0, "balancer");
 jk_print_xml_att_string(s, 4, "name", name);
 jk_print_xml_att_string(s, 4, "type", 
status_worker_type(JK_LB_WORKER_TYPE));
-jk_print_xml_att_string(s, 4, "sticky_session", 
status_val_bool(lb->sticky_session));
-jk_print_xml_att_string(s, 4, "sticky_session_force", 
status_val_bool(lb->sticky_session_force));
+jk_print_xml_att_string(s, 4, "sticky_session", 
jk_get_bool(lb->sticky_session));
+jk_print_xml_att_string(s, 4, "sticky_session_force", 
jk_get_bool(lb->sticky_session_force));
 jk_print_xml_att_int(s, 4, "retries", lb->retries);
 jk_print_xml_att_int(s, 4, "recover_time", lb->recover_wait_time);
 jk_print_xml_att_string(s, 4, "method", jk_lb_get_method(lb, l));
@@ -1257,8 +1241,8 @@
 jk_puts(s, "Balancer Worker:");
 jk_printf(s, " name=%s", name);
 jk_printf(s, " type=%s", status_worker_type(JK_LB_WORKER_TYPE));
-jk_printf(s, " sticky_session=%s", 
status_val_bool(lb->sticky_session));
-jk_printf(s, " sticky_session_force=%s", 
status_val_bool(lb->sticky_session_force));
+jk_printf(s, " sticky_session=%s", jk_get_bool(lb->sticky_session));
+jk_printf(s, " sticky_session_force=%s", 
jk_get_bool(lb->sticky_session_force));
 jk_printf(s, " retries=%d", lb->retries);
 jk_printf(s, " recover_time=%d", lb->recover_wait_time);
 jk_printf(s, " method=%s", jk_lb_get_method(lb, l));
@@ -1276,8 +1260,8 @@
 
 jk_print_prop_att_string(s, w, NULL, "list", name);
 jk_print_prop_att_string(s, w, name, "type", 
status_worker_type(JK_LB_WORKER_TYPE));
-jk_print_prop_att

svn commit: r485092 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h jk_status.c jk_util.c

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 15:50:44 2006
New Revision: 485092

URL: http://svn.apache.org/viewvc?view=rev&rev=485092
Log:
Introduce general purpose functions for parsing
activation, state, method and lock strings.
Use them in jk_util and in status worker.
This enables to update via status worker additionally with
the string values, that it shows when listing workers.
Reorder constant arrays for these attributes
to put the order in sync with the integers
one can use when configuring.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/native/common/jk_util.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=485092&r1=485091&r2=485092
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat Dec  9 15:50:44 
2006
@@ -44,36 +44,36 @@
 #define JK_WORKER_USABLE_STICKY(w)   ((w)->state != JK_LB_STATE_ERROR && 
(w)->activation != JK_LB_ACTIVATION_STOPPED)
 
 static const char *lb_locking_type[] = {
-"unknown",
 JK_LB_LOCK_TEXT_OPTIMISTIC,
 JK_LB_LOCK_TEXT_PESSIMISTIC,
+"unknown",
 NULL
 };
 
 static const char *lb_method_type[] = {
-"unknown",
 JK_LB_METHOD_TEXT_REQUESTS,
 JK_LB_METHOD_TEXT_TRAFFIC,
 JK_LB_METHOD_TEXT_BUSYNESS,
 JK_LB_METHOD_TEXT_SESSIONS,
+"unknown",
 NULL
 };
 
 static const char *lb_state_type[] = {
-"unknown",
 JK_LB_STATE_TEXT_NA,
 JK_LB_STATE_TEXT_OK,
 JK_LB_STATE_TEXT_RECOVER,
 JK_LB_STATE_TEXT_BUSY,
 JK_LB_STATE_TEXT_ERROR,
+"unknown",
 NULL
 };
 
 static const char *lb_activation_type[] = {
-"unknown",
 JK_LB_ACTIVATION_TEXT_ACTIVE,
 JK_LB_ACTIVATION_TEXT_DISABLED,
 JK_LB_ACTIVATION_TEXT_STOPPED,
+"unknown",
 NULL
 };
 
@@ -115,22 +115,85 @@
 return lb_locking_type[p->lblock];
 }
 
+/* Return the int representation of the lb lock type */
+int jk_lb_get_lock_code(const char *v)
+{
+if (!v)
+return JK_LB_LOCK_DEF;
+else if  (*v == 'o' || *v == 'O' || *v == '0')
+return JK_LB_LOCK_OPTIMISTIC;
+else if  (*v == 'p' || *v == 'P' || *v == '1')
+return JK_LB_LOCK_PESSIMISTIC;
+else
+return JK_LB_LOCK_DEF;
+}
+
 /* Return the string representation of the lb method type */
 const char *jk_lb_get_method(lb_worker_t *p, jk_logger_t *l)
 {
 return lb_method_type[p->lbmethod];
 }
 
+/* Return the int representation of the lb lock type */
+int jk_lb_get_method_code(const char *v)
+{
+if (!v)
+return JK_LB_METHOD_DEF;
+else if  (*v == 'r' || *v == 'R' || *v == '0')
+return JK_LB_METHOD_REQUESTS;
+else if  (*v == 't' || *v == 'T' || *v == '1')
+return JK_LB_METHOD_TRAFFIC;
+else if  (*v == 'b' || *v == 'B' || *v == '2')
+return JK_LB_METHOD_BUSYNESS;
+else if  (*v == 's' || *v == 'S' || *v == '3')
+return JK_LB_METHOD_SESSIONS;
+else
+return JK_LB_METHOD_DEF;
+}
+
 /* Return the string representation of the balance worker state */
 const char *jk_lb_get_state(worker_record_t *p, jk_logger_t *l)
 {
 return lb_state_type[p->s->state];
 }
 
+/* Return the int representation of the lb lock type */
+int jk_lb_get_state_code(const char *v)
+{
+if (!v)
+return JK_LB_STATE_DEF;
+else if  (*v == 'n' || *v == 'N' || *v == '0')
+return JK_LB_STATE_NA;
+else if  (*v == 'o' || *v == 'O' || *v == '1')
+return JK_LB_STATE_OK;
+else if  (*v == 'r' || *v == 'R' || *v == '2')
+return JK_LB_STATE_RECOVER;
+else if  (*v == 'b' || *v == 'B' || *v == '3')
+return JK_LB_STATE_BUSY;
+else if  (*v == 'e' || *v == 'E' || *v == '4')
+return JK_LB_STATE_ERROR;
+else
+return JK_LB_STATE_DEF;
+}
+
 /* Return the string representation of the balance worker activation */
 const char *jk_lb_get_activation(worker_record_t *p, jk_logger_t *l)
 {
 return lb_activation_type[p->s->activation];
+}
+
+int jk_lb_get_activation_code(const char *v)
+{
+if (!v)
+return JK_LB_ACTIVATION_DEF;
+else if (*v == 'a' || *v == 'A' || *v == '0')
+return JK_LB_ACTIVATION_ACTIVE;
+else if (*v == 'd' || *v == 'D' || *v == '1')
+return JK_LB_ACTIVATION_DISABLED;
+else if (*v == 's' || *v == 'S' || *v == '2')
+return JK_LB_ACTIVATION_STOPPED;
+else
+return JK_LB_ACTIVATION_DEF;
 }
 
 /* Update the load multipliers wrt. lb_factor */

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?view=diff&rev=485092&r1=485091&r2=485092
=

svn commit: r485093 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 15:54:54 2006
New Revision: 485093

URL: http://svn.apache.org/viewvc?view=rev&rev=485093
Log:
Replace Maps container in status worker by an additional attribute map_count.
This way maps and members are handled similarly.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=485093&r1=485092&r2=485093
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec  9 15:54:54 
2006
@@ -994,6 +994,26 @@
 return JK_TRUE;
 }
 
+static int count_maps(jk_ws_service_t *s,
+  const char *worker,
+  jk_logger_t *l)
+{
+unsigned int i;
+int count=0;
+jk_uri_worker_map_t *uw_map = s->uw_map;
+
+JK_TRACE_ENTER(l);
+for (i = 0; i < uw_map->size; i++) {
+uri_worker_record_t *uwr = uw_map->maps[i];
+if (strcmp(uwr->worker_name, worker)) {
+continue;
+}
+count++;
+}
+JK_TRACE_EXIT(l);
+return count;
+}
+
 static void display_maps(jk_ws_service_t *s,
  status_endpoint_t *p,
  const char *worker,
@@ -1013,13 +1033,7 @@
 mime = status_mime_int(arg);
 hide = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
   JK_STATUS_ARG_OPTION_NO_MAPS;
-for (i = 0; i < uw_map->size; i++) {
-uri_worker_record_t *uwr = uw_map->maps[i];
-if (strcmp(uwr->worker_name, worker)) {
-continue;
-}
-count++;
-}
+count = count_maps(s, worker, l);
 
 if (count) {
 
@@ -1040,17 +1054,6 @@
 jk_printf(s, JK_STATUS_TABLE_HEAD_3_STRING,
   "Match Type", "Uri", "Source");
 }
-else if (mime == JK_STATUS_MIME_XML) {
-jk_print_xml_start_elt(s, w, 6, 0, "maps");
-jk_print_xml_att_int(s, 8, "size", count);
-jk_print_xml_stop_elt(s, 6, 0);
-}
-else if (mime == JK_STATUS_MIME_TXT) {
-jk_printf(s, "Maps: size=%d\n", count);
-}
-else if (mime == JK_STATUS_MIME_PROP) {
-jk_print_prop_att_int(s, w, worker, "maps.size", count);
-}
 }
 }
 
@@ -1073,12 +1076,12 @@
   uri_worker_map_get_source(uwr, l));
 }
 else if (mime == JK_STATUS_MIME_XML) {
-jk_print_xml_start_elt(s, w, 8, 0, "map");
-jk_print_xml_att_int(s, 10, "id", count);
-jk_print_xml_att_string(s, 10, "type", 
uri_worker_map_get_match(uwr, buf, l));
-jk_print_xml_att_string(s, 10, "uri", uwr->uri);
-jk_print_xml_att_string(s, 10, "source", 
uri_worker_map_get_source(uwr, l));
-jk_print_xml_stop_elt(s, 8, 1);
+jk_print_xml_start_elt(s, w, 6, 0, "map");
+jk_print_xml_att_int(s, 8, "id", count);
+jk_print_xml_att_string(s, 8, "type", 
uri_worker_map_get_match(uwr, buf, l));
+jk_print_xml_att_string(s, 8, "uri", uwr->uri);
+jk_print_xml_att_string(s, 8, "source", 
uri_worker_map_get_source(uwr, l));
+jk_print_xml_stop_elt(s, 6, 1);
 }
 else if (mime == JK_STATUS_MIME_TXT) {
 jk_puts(s, "Map:");
@@ -1110,9 +1113,6 @@
 if (mime == JK_STATUS_MIME_HTML) {
 jk_puts(s, "\n");
 }
-else if (mime == JK_STATUS_MIME_XML) {
-jk_print_xml_close_elt(s, w, 6, "maps");
-}
 }
 else {
 if (mime == JK_STATUS_MIME_HTML) {
@@ -1144,6 +1144,7 @@
 unsigned int good = 0;
 unsigned int degraded = 0;
 unsigned int bad = 0;
+int map_count;
 unsigned int j;
 const char *name = lb->s->name;
 status_worker_t *w = p->worker;
@@ -1176,6 +1177,8 @@
degraded++;
 }
 
+map_count = count_maps(s, name, l);
+
 if (mime == JK_STATUS_MIME_HTML) {
 
 jk_puts(s, "[");
@@ -1233,6 +1236,7 @@
 jk_print_xml_att_int(s, 4, "bad", bad);
 jk_print_xml_att_int(s, 4, "busy", lb->s->busy);
 jk_print_xml_att_int(s, 4, "max_busy", lb->s->max_busy);
+jk_print_xml_att_int(s, 4, "map_count", map_count);
 jk_print_xml_stop_elt(s, 2, 0);
 
 }
@@ -1253,6 +1257,7 @@
 jk_printf(s, " bad=%d", bad);
 jk_printf(s, " busy=%d", lb->s->busy);
 jk_printf(s, " max_busy=%d", lb->s->max_busy);
+jk_printf(s, " map_count=%d", map_count);
 jk_puts(s, "\n");
 
 }
@@ -1272,6 +1277,7 @@
 jk_print_prop_att_int(s, w, name, "bad", bad);
 jk_print_prop_att_int(s, w, name, "busy", lb->s->busy);
 jk_print_prop_att_int(s, w, name, "max_bu

svn commit: r485095 - /tomcat/connectors/trunk/jk/xdocs/reference/status.xml

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 16:16:01 2006
New Revision: 485095

URL: http://svn.apache.org/viewvc?view=rev&rev=485095
Log:
Update attribute usage in status worker docs page.

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/status.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/status.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/status.xml?view=diff&rev=485095&r1=485094&r2=485095
==
--- tomcat/connectors/trunk/jk/xdocs/reference/status.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/status.xml Sat Dec  9 16:16:01 
2006
@@ -380,22 +380,22 @@
 lt: recover_time (seconds)
 
 
-ls: sticky_session (checkbox)
+ls: sticky_session (0/f/n/off=off, 1/t/y/on=on; case insensitive)
 
 
-lf: sticky_session_force (checkbox)
+lf: sticky_session_force (0/f/n/off=off, 1/t/y/on=on; case insensitive)
 
 
-lm: method (1="Requests", 2="Traffic", 3="Busyness", 4="Sessions")
+lm: method (0/r="Requests", 1/t="Traffic", 2/b="Busyness", 
3/s="Sessions"; case insensitive, only first character is used)
 
 
-ll: lock (1="Optimistic", 2="Pessimistic")
+ll: lock (0/o="Optimistic", 1/p="Pessimistic"; case insensitive, only 
first character is used)
 
 
 And now the list of parameters you can use to change settings for load 
balancer members:
 
 
-wa: activation flag (1="active", 2="disabled", 3="stopped")
+wa: activation flag (0/a="active", 1/d="disabled", 2/s="stopped"; case 
insensitive, only first character is used)
 
 
 wf: load balancing factor (integer weight)



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



svn commit: r485097 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

2006-12-09 Thread rjung
Author: rjung
Date: Sat Dec  9 16:17:40 2006
New Revision: 485097

URL: http://svn.apache.org/viewvc?view=rev&rev=485097
Log:
Update changelog.

Modified:
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=485097&r1=485096&r2=485097
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sat Dec  9 
16:17:40 2006
@@ -27,6 +27,10 @@
   
 
   
+  Allow integer and string values when setting enumeration/boolean
+  attributes via status worker update action. (rjung)
+  
+  
   Docs: New reference guide page for status worker. (rjung)
   
   



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



DO NOT REPLY [Bug 40962] - Starting Tomcat 6.0.1 erases content of conf/tomcat-users.xml

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40962


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 19:37 ---
May not happen for you, but it sure happens for me.  I'll attach "before" and
"after" versions in a second, but the following steps (on Linux, JDK 1.5.0_09)
causes all the XML elements inside the  element to be destroyed. 
Happens on 6.0.2 as well:

* Start Tomcat
* Stop Tomcat


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 40962] - Starting Tomcat 6.0.1 erases content of conf/tomcat-users.xml

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40962





--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 19:38 ---
Created an attachment (id=19236)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19236&action=view)
Tomcat Users file before starting Tomcat


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 40962] - Starting Tomcat 6.0.1 erases content of conf/tomcat-users.xml

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40962





--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 19:38 ---
Created an attachment (id=19237)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19237&action=view)
Tomcat Users file after starting and stopping Tomcat


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 41016] - tomcat 5.5 multiple contexts using same realm bug

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41016


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME




--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 20:48 ---
If a DataSourceRealm is specified at the Context level and the DataSource
resource is also specified at the Context level (rather than as a global
resource) the localDataSource="true" must be used as per the documentation. Any
unusual behaviour with this configuration when localDataSource="true" is not
specified is irrelevant since the configuration is invalid.

I have created two identical contexts (with just index, login and error JSPs),
both using a DataSourceRealm defined at the context level and both with local
DataSources and both contexts are accessible on Tomcat startup. The report also
mentions the login form for one context being displayed for a second context. I
have also not been able to reproduce this.

I suspect a configuration or possibly an application issue is at the heart of 
this.

I suggest you try to reproduce this with the simplest possible test WAR rather
than your entire application to rule out any application issues. If you do
reproduce it with a simple test WAR please re-open this report and I'll take
another look.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 41112] - FacesServlet,init() method throws an exception: NullPointerException

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41112


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME




--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 20:49 ---
I am resolving this based on my testing. If you have a valid test case that
demonstrates this issue, please re-open.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 41011] - duplicate class definition error when JSPs loaded from multiple threads

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41011


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 21:32 ---
Looking at the stack trace, Tomcat's WebappClassLoader couldn't find the class
and  delegated to the parent class loader. It is an instance of
java.net.URLClassLoader that is loading the class.

Given it is the JVM that is loading the class, this looks like a synchronisation
(or rather lack of synchronisation) issue with the JVM. A quick check of the JVM
source suggests this is likely since I can't see any synchronisation at all.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 40728] - Catalina MBeans use non-serializable classes

2006-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40728


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|normal  |enhancement
 OS/Version|Windows XP  |All
Version|5.0.28  |Nightly Build




--- Additional Comments From [EMAIL PROTECTED]  2006-12-09 21:40 ---
Updating attributes and marking as an enhancement request.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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