svn commit: r748203 - /tomcat/current/tc5.5.x/STATUS.txt
Author: rjung Date: Thu Feb 26 16:39:21 2009 New Revision: 748203 URL: http://svn.apache.org/viewvc?rev=748203&view=rev Log: Next try proposing a fix for BZ 46770. Modified: tomcat/current/tc5.5.x/STATUS.txt Modified: tomcat/current/tc5.5.x/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=748203&r1=748202&r2=748203&view=diff == --- tomcat/current/tc5.5.x/STATUS.txt (original) +++ tomcat/current/tc5.5.x/STATUS.txt Thu Feb 26 16:39:21 2009 @@ -230,3 +230,12 @@ http://svn.apache.org/viewvc?rev=708273&view=rev +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46770 + Headers send duplicate when using AJP and flush. + mod_jk doesn't accept such a response (starting with version 1.2.27). + Only a problem before 6.0. + Patch backported from http://svn.eu.apache.org/viewvc?view=rev&revision=411577 + Patch available at https://issues.apache.org/bugzilla/attachment.cgi?id=23316 + +1: rjung + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749447 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
Author: rjung Date: Mon Mar 2 21:54:38 2009 New Revision: 749447 URL: http://svn.apache.org/viewvc?rev=749447&view=rev Log: Indentation cleanup. No functional change. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.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?rev=749447&r1=749446&r2=749447&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Mon Mar 2 21:54:38 2009 @@ -512,9 +512,9 @@ * Return the number of workers not in error state. */ static int recover_workers(lb_worker_t *p, -jk_uint64_t curmax, -time_t now, -jk_logger_t *l) + jk_uint64_t curmax, + time_t now, + jk_logger_t *l) { unsigned int i; int non_error = 0; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749452 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Mon Mar 2 22:04:40 2009 New Revision: 749452 URL: http://svn.apache.org/viewvc?rev=749452&view=rev Log: Replace integer constants by defines for the various side effect indicators (bit mask) in commit_member. Sorted the values (1,2,4) -> (2,4,1) differently and replaced the test against non-zero with setting and testing for a defined bit. 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?rev=749452&r1=749451&r2=749452&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Mon Mar 2 22:04:40 2009 @@ -191,6 +191,10 @@ #define JK_STATUS_MASK_GOOD_DEF0x000F #define JK_STATUS_MASK_BAD_DEF 0x00FF1010 +#define JK_STATUS_NEEDS_PUSH 0x0001 +#define JK_STATUS_NEEDS_RESET_LB_VALUES0x0002 +#define JK_STATUS_NEEDS_UPDATE_MULT0x0004 + #define JK_STATUS_WAIT_AFTER_UPDATE"3" #define JK_STATUS_REFRESH_DEF "10" #define JK_STATUS_ESC_CHARS("<>?\"") @@ -3111,13 +3115,13 @@ jk_log(l, JK_LOG_INFO, "Status worker '%s' setting 'activation' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, jk_lb_get_activation(wr, l)); -rc |= 1; +rc |= JK_STATUS_NEEDS_RESET_LB_VALUES | JK_STATUS_NEEDS_PUSH; } } if (set_int_if_changed(p, wr->name, "lbfactor", JK_STATUS_ARG_LBM_FACTOR, 1, INT_MAX, &wr->lb_factor, lb_name, l)) /* Recalculate the load multiplicators wrt. lb_factor */ -rc |= 2; +rc |= JK_STATUS_NEEDS_UPDATE_MULT | JK_STATUS_NEEDS_PUSH; if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_ROUTE, NULL, &arg, l)) == JK_TRUE) { if (strncmp(wr->route, arg, JK_SHM_STR_SIZ)) { @@ -3125,7 +3129,7 @@ "Status worker '%s' setting 'route' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, arg); strncpy(wr->route, arg, JK_SHM_STR_SIZ); -rc |= 4; +rc |= JK_STATUS_NEEDS_PUSH; if (!wr->domain[0]) { char * id_domain = strchr(wr->route, '.'); if (id_domain) { @@ -3143,7 +3147,7 @@ "Status worker '%s' setting 'redirect' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, arg); strncpy(wr->redirect, arg, JK_SHM_STR_SIZ); -rc |= 4; +rc |= JK_STATUS_NEEDS_PUSH; } } if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_DOMAIN, @@ -3153,17 +3157,17 @@ "Status worker '%s' setting 'domain' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, arg); strncpy(wr->domain, arg, JK_SHM_STR_SIZ); -rc |= 4; +rc |= JK_STATUS_NEEDS_PUSH; } } if (set_int_if_changed(p, wr->name, "distance", JK_STATUS_ARG_LBM_DISTANCE, 0, INT_MAX, &wr->distance, lb_name, l)) -rc |= 4; +rc |= JK_STATUS_NEEDS_PUSH; } old = aw->cache_timeout; if (set_int_if_changed(p, aw->name, "connection_pool_timeout", JK_STATUS_ARG_AJP_CACHE_TO, 0, INT_MAX, &aw->cache_timeout, lb_name, l)) { -rc |= 4; +rc |= JK_STATUS_NEEDS_PUSH; if (old == 0) { unsigned int i; for (i = 0; i < aw->ep_cache_sz; i++) { @@ -3180,14 +3184,14 @@ "Status worker '%s' setting 'host' for sub worker '%s' to '%s'", w->name, aw->name, arg); strncpy(host, arg, JK_SHM_STR_SIZ); -rc |= 4; +rc |= JK_STATUS_NEEDS_PUSH; as = 1; } } port = aw->s->port; if (set_int_if_changed(p, aw->name, "port", JK_STATUS_ARG_AJP_PORT_INT, 0, INT_MAX, &port, lb_name, l)
svn commit: r749457 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Mon Mar 2 22:26:46 2009 New Revision: 749457 URL: http://svn.apache.org/viewvc?rev=749457&view=rev Log: commit_member() in status worker now returns JK_TRUE/JK_FALSE. The additional information about needed push etc. is returned via side effect argument. We need this in order to be able to escalate errors from commit_member to the calling functions. 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?rev=749457&r1=749456&r2=749457&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Mon Mar 2 22:26:46 2009 @@ -3079,12 +3079,13 @@ lb_worker_t *lb, lb_sub_worker_t *wr, ajp_worker_t *aw, + int *side_effect, jk_logger_t *l) { const char *arg; const char *lb_name = NULL; status_worker_t *w = p->worker; -int rc = 0; +int rc = JK_TRUE; int rv; int i; int old; @@ -3115,13 +3116,13 @@ jk_log(l, JK_LOG_INFO, "Status worker '%s' setting 'activation' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, jk_lb_get_activation(wr, l)); -rc |= JK_STATUS_NEEDS_RESET_LB_VALUES | JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_STATUS_NEEDS_RESET_LB_VALUES | JK_STATUS_NEEDS_PUSH; } } if (set_int_if_changed(p, wr->name, "lbfactor", JK_STATUS_ARG_LBM_FACTOR, 1, INT_MAX, &wr->lb_factor, lb_name, l)) /* Recalculate the load multiplicators wrt. lb_factor */ -rc |= JK_STATUS_NEEDS_UPDATE_MULT | JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_STATUS_NEEDS_UPDATE_MULT | JK_STATUS_NEEDS_PUSH; if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_ROUTE, NULL, &arg, l)) == JK_TRUE) { if (strncmp(wr->route, arg, JK_SHM_STR_SIZ)) { @@ -3129,7 +3130,7 @@ "Status worker '%s' setting 'route' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, arg); strncpy(wr->route, arg, JK_SHM_STR_SIZ); -rc |= JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_STATUS_NEEDS_PUSH; if (!wr->domain[0]) { char * id_domain = strchr(wr->route, '.'); if (id_domain) { @@ -3147,7 +3148,7 @@ "Status worker '%s' setting 'redirect' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, arg); strncpy(wr->redirect, arg, JK_SHM_STR_SIZ); -rc |= JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_STATUS_NEEDS_PUSH; } } if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_DOMAIN, @@ -3157,17 +3158,17 @@ "Status worker '%s' setting 'domain' for sub worker '%s' of lb worker '%s' to '%s'", w->name, wr->name, lb_name, arg); strncpy(wr->domain, arg, JK_SHM_STR_SIZ); -rc |= JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_STATUS_NEEDS_PUSH; } } if (set_int_if_changed(p, wr->name, "distance", JK_STATUS_ARG_LBM_DISTANCE, 0, INT_MAX, &wr->distance, lb_name, l)) -rc |= JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_STATUS_NEEDS_PUSH; } old = aw->cache_timeout; if (set_int_if_changed(p, aw->name, "connection_pool_timeout", JK_STATUS_ARG_AJP_CACHE_TO, 0, INT_MAX, &aw->cache_timeout, lb_name, l)) { -rc |= JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_STATUS_NEEDS_PUSH; if (old == 0) { unsigned int i; for (i = 0; i < aw->ep_cache_sz; i++) { @@ -3184,14 +3185,14 @@ "Status worker '%s' setting 'host' for sub worker '%s' to '%s'", w->name, aw->name, arg); strncpy(host, arg, JK_SHM_STR_SIZ); -rc |= JK_STATUS_NEEDS_PUSH; +*side_effect |= JK_ST
svn commit: r749463 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Mon Mar 2 23:05:39 2009 New Revision: 749463 URL: http://svn.apache.org/viewvc?rev=749463&view=rev Log: Make writing of the "OK" refresh page in status worker a separate function. Do not generate the page, in case any error occured, so that the user can read the error and must "commit" it by navigating back to the status page. 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?rev=749463&r1=749462&r2=749463&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Mon Mar 2 23:05:39 2009 @@ -1218,6 +1218,22 @@ return JK_TRUE; } +static void write_html_refresh_response(jk_ws_service_t *s, +status_endpoint_t *p, +const char *err, +jk_logger_t *l) +{ +if (!err) { +jk_puts(s, "\n"); +jk_putv(s, "Result: OK - You will be redirected in " +JK_STATUS_WAIT_AFTER_UPDATE " seconds.", NULL); +} +} + static int fetch_worker_and_sub_worker(status_endpoint_t *p, const char *operation, const char **worker, @@ -4433,15 +4449,7 @@ /* unlock the shared memory */ jk_shm_unlock(); if (mime == JK_STATUS_MIME_HTML) { -jk_puts(s, "\n"); -if (!err) { -jk_putv(s, "Result: OK - You will be redirected in " -JK_STATUS_WAIT_AFTER_UPDATE " seconds.", NULL); -} +write_html_refresh_response(s, p, err, l); } } else if (cmd == JK_STATUS_CMD_RESET) { @@ -4453,15 +4461,7 @@ /* unlock the shared memory */ jk_shm_unlock(); if (mime == JK_STATUS_MIME_HTML) { -jk_puts(s, "\n"); -if (!err) { -jk_putv(s, "Result: OK - You will be redirected in " -JK_STATUS_WAIT_AFTER_UPDATE " seconds.", NULL); -} +write_html_refresh_response(s, p, err, l); } } else if (cmd == JK_STATUS_CMD_RECOVER) { @@ -4473,15 +4473,7 @@ /* unlock the shared memory */ jk_shm_unlock(); if (mime == JK_STATUS_MIME_HTML) { -jk_puts(s, "\n"); -if (!err) { -jk_putv(s, "Result: OK - You will be redirected in " -JK_STATUS_WAIT_AFTER_UPDATE " seconds.", NULL); -} +write_html_refresh_response(s, p, err, l); } } else { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749488 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Mar 3 00:22:46 2009 New Revision: 749488 URL: http://svn.apache.org/viewvc?rev=749488&view=rev Log: Whitespace cleanup, no functional change. 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?rev=749488&r1=749487&r2=749488&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Mar 3 00:22:46 2009 @@ -3587,7 +3587,7 @@ } if (sub_worker && sub_worker[0]) { -if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, +if (search_sub_worker(s, p, jw, worker, &wr, sub_worker, NULL, l) == JK_FALSE) { JK_TRACE_EXIT(l); return JK_FALSE; @@ -3794,7 +3794,7 @@ return JK_FALSE; } if (sub_worker && sub_worker[0]) { -if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, +if (search_sub_worker(s, p, jw, worker, &wr, sub_worker, NULL, l) == JK_FALSE) { JK_TRACE_EXIT(l); return JK_FALSE; @@ -3855,8 +3855,8 @@ JK_TRACE_EXIT(l); return JK_TRUE; } -else { -if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, +else { +if (search_sub_worker(s, p, jw, worker, &wr, sub_worker, NULL, l) == JK_FALSE) { JK_TRACE_EXIT(l); return JK_FALSE; @@ -3952,7 +3952,7 @@ JK_TRACE_EXIT(l); return JK_TRUE; } -else { +else { unsigned int idx = 0; unsigned int *wi = NULL; @@ -4083,8 +4083,8 @@ JK_TRACE_EXIT(l); return JK_TRUE; } -else { -if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, +else { +if (search_sub_worker(s, p, jw, worker, &wr, sub_worker, NULL, l) == JK_FALSE) { JK_TRACE_EXIT(l); return JK_FALSE; @@ -4163,7 +4163,7 @@ return JK_FALSE; } -if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, +if (search_sub_worker(s, p, jw, worker, &wr, sub_worker, NULL, l) == JK_FALSE) { JK_TRACE_EXIT(l); return JK_FALSE; @@ -4503,7 +4503,7 @@ } else if (cmd == JK_STATUS_CMD_SHOW) { /* Step 2: Display detailed configuration */ -if(show_worker(s, p, l) != JK_TRUE) { +if (show_worker(s, p, l) != JK_TRUE) { err = "Error in showing this worker."; } } @@ -4534,7 +4534,7 @@ } else if (cmd == JK_STATUS_CMD_SHOW) { /* Step 2: Display detailed configuration */ -if(show_worker(s, p, l) != JK_TRUE) { +if (show_worker(s, p, l) != JK_TRUE) { err = "Error in showing this worker."; } } @@ -4559,7 +4559,7 @@ } else if (cmd == JK_STATUS_CMD_SHOW) { /* Step 2: Display detailed configuration */ -if(show_worker(s, p, l) != JK_TRUE) { +if (show_worker(s, p, l) != JK_TRUE) { err = "Error in showing this worker."; } } @@ -4721,13 +4721,13 @@ } else if (cmd == JK_STATUS_CMD_SHOW) { /* Step 2: Display detailed configuration */ -if(show_worker(s, p, l) != JK_TRUE) { +if (show_worker(s, p, l) != JK_TRUE) { err = "Error in showing this worker."; } } else if (cmd == JK_STATUS_CMD_EDIT) { /* Step 2: Display edit form */ -if(edit_worker(s, p, l) != JK_TRUE) { +if (edit_worker(s, p, l) != JK_TRUE) { err = "Error in generating this worker's configuration form."; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749491 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Mar 3 00:33:05 2009 New Revision: 749491 URL: http://svn.apache.org/viewvc?rev=749491&view=rev Log: Make wildcards in sub worker names work for update commands of status worker. It couldn't work, because check_worker() was not wildcard aware. Also reset the error string "could not find sub worker" at the end of the wildcard loop. 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?rev=749491&r1=749490&r2=749491&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Mar 3 00:33:05 2009 @@ -165,6 +165,7 @@ #define JK_STATUS_CMD_PROP_DUMP_LINK 0x0100 #define JK_STATUS_CMD_PROP_LINK_HELP 0x0200 #define JK_STATUS_CMD_PROP_LEGEND 0x0400 +#define JK_STATUS_CMD_PROP_WILDCARD0x0800 #define JK_STATUS_MIME_UNKNOWN (0) #define JK_STATUS_MIME_HTML(1) @@ -973,6 +974,8 @@ cmd == JK_STATUS_CMD_VERSION || cmd == JK_STATUS_CMD_DUMP) props |= JK_STATUS_CMD_PROP_BACK_LINK; +if (cmd == JK_STATUS_CMD_UPDATE) +props |= JK_STATUS_CMD_PROP_WILDCARD; if (cmd != JK_STATUS_CMD_EDIT && cmd != JK_STATUS_CMD_UPDATE && cmd != JK_STATUS_CMD_RESET && @@ -3572,10 +3575,12 @@ static int check_worker(jk_ws_service_t *s, status_endpoint_t *p, +jk_uint32_t allow_wildchars, jk_logger_t *l) { const char *worker; const char *sub_worker; +status_worker_t *w = p->worker; jk_worker_t *jw = NULL; lb_sub_worker_t *wr = NULL; @@ -3587,8 +3592,24 @@ } if (sub_worker && sub_worker[0]) { +unsigned int idx = 0; +unsigned int *wi = NULL; +if (strchr(sub_worker, '*') || strchr(sub_worker, '?')) { +/* We have a wildchar matching rule */ +if (!allow_wildchars) { +jk_log(l, JK_LOG_ERROR, + "Status worker '%s' wildcards in sub worker '%s' of worker '%s' not allowed for this command", + w->name, sub_worker, worker ? worker : "(null)"); +p->msg = "wildcard not allowed in sub worker for this command"; +JK_TRACE_EXIT(l); +return JK_FALSE; +} +else { +wi = &idx; +} +} if (search_sub_worker(s, p, jw, worker, &wr, sub_worker, - NULL, l) == JK_FALSE) { + wi, l) == JK_FALSE) { JK_TRACE_EXIT(l); return JK_FALSE; } @@ -3955,10 +3976,12 @@ else { unsigned int idx = 0; unsigned int *wi = NULL; +int is_wildchar = JK_FALSE; if (strchr(sub_worker, '*') || strchr(sub_worker, '?')) { /* We have a wildchar matching rule */ wi = &idx; +is_wildchar = JK_TRUE; } for (;;) { if (search_sub_worker(s, p, jw, worker, &wr, sub_worker, @@ -3969,6 +3992,7 @@ } else { /* We have found at least one match previously */ +p->msg = "OK"; break; } } @@ -4417,7 +4441,7 @@ err = "Invalid mime type."; } else if (cmd_props & JK_STATUS_CMD_PROP_CHECK_WORKER && - (check_worker(s, p, l) != JK_TRUE)) { + (check_worker(s, p, cmd_props & JK_STATUS_CMD_PROP_WILDCARD, l) != JK_TRUE)) { err = p->msg; } } @@ -,7 +4468,10 @@ /* lock shared memory */ jk_shm_lock(); if (update_worker(s, p, l) == JK_FALSE) { -err = "Update failed"; +if (strncmp("OK", p->msg, 3)) +err = p->msg; +else +err = "Update failed"; } /* unlock the shared memory */ jk_shm_unlock(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749498 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Mar 3 00:42:16 2009 New Revision: 749498 URL: http://svn.apache.org/viewvc?rev=749498&view=rev Log: Provide an error message in status worker, in case a new worker address could not be resolved. Use error messages coming from commit_member() in update_worker() and augment them in the wildcard case. 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?rev=749498&r1=749497&r2=749498&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Mar 3 00:42:16 2009 @@ -3219,8 +3219,12 @@ aw->port = aw->s->port; if (!jk_resolve(host, port, &inet_addr, aw->worker.we->pool, l)) { +const char *msg = "Update failed (at least partially): could not resolve address '%s:%d' for sub worker '%s'."; +size_t size = strlen(msg) + strlen(host) + strlen(aw->name) + 10 + 1; +p->msg = jk_pool_alloc(s->pool, size); +snprintf(p->msg, size, msg, host, port, aw->name); jk_log(l, JK_LOG_ERROR, - "Status worker '%s' failed resolving 'address' for sub worker '%s' to '%s:%d'", + "Status worker '%s' failed resolving 'address' for sub worker '%s' to '%s:%d'.", w->name, aw->name, host, port); rc = JK_FALSE; } @@ -4012,7 +4016,25 @@ if (rv & JK_STATUS_NEEDS_UPDATE_MULT) /* Recalculate the load multiplicators wrt. lb_factor */ update_mult(lb, l); -if (!wi || (rc == JK_FALSE)) +if (rc == JK_FALSE) { +jk_log(l, JK_LOG_ERROR, + "Status worker '%s' failed updating sub worker '%s' (at least partially).%s", + w->name, aw->name, (is_wildchar == JK_TRUE) ? " Aborting further wildcard updates." : ""); +if (!strncmp("OK", p->msg, 3)) { +const char *msg = "Update failed (at least partially) for sub worker '%s'"; +size_t size = strlen(msg) + strlen(aw->name) + 1; +p->msg = jk_pool_alloc(s->pool, size); +snprintf(p->msg, size, msg, aw->name); +} +if (is_wildchar == JK_TRUE) { +const char *msg = " Aborting further wildcard updates."; +size_t size = strlen(msg) + strlen(p->msg) + 1; +p->msg = jk_pool_realloc(s->pool, size, p->msg, strlen(p->msg) + 1); +strcat(p->msg, msg); +} +break; +} +if (!wi) break; } JK_TRACE_EXIT(l); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749503 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Author: rjung Date: Tue Mar 3 01:12:39 2009 New Revision: 749503 URL: http://svn.apache.org/viewvc?rev=749503&view=rev Log: Add status worker changes to 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?rev=749503&r1=749502&r2=749503&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Mar 3 01:12:39 2009 @@ -43,6 +43,16 @@ + +Status: Wildcards in sub worker names were broken for update actions. (rjung) + + +Status: Do not redirect to the show or list page, if an error occured +during an action. (rjung) + + +Status: Allow update actions to show error messages in the result page. (rjung) + AJP: Allow worker ports lower or equal to 1024. (rjung) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749506 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml
Author: rjung Date: Tue Mar 3 02:09:27 2009 New Revision: 749506 URL: http://svn.apache.org/viewvc?rev=749506&view=rev Log: In status worker, when doing Show - Edit - Show you always end up with a single lb member show, even when started from an all members lb show. Like we use "from" to save the previous cmd, we now also use "psw" to save and restore the previously used sub worker. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml 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?rev=749506&r1=749505&r2=749506&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Mar 3 02:09:27 2009 @@ -60,6 +60,7 @@ #define JK_STATUS_ARG_REFRESH "re" #define JK_STATUS_ARG_WORKER "w" #define JK_STATUS_ARG_SUB_WORKER "sw" +#define JK_STATUS_ARG_PREV_SUB_WORKER "psw" #define JK_STATUS_ARG_ATTRIBUTE"att" #define JK_STATUS_ARG_MULT_VALUE_BASE "val" #define JK_STATUS_ARG_OPTIONS "opt" @@ -1036,6 +1037,8 @@ int sz; int started = 0; int from; +int restore_sub_worker = JK_FALSE; +int save_sub_worker = JK_FALSE; int prev; unsigned int opt = 0; const char *arg; @@ -1048,11 +1051,15 @@ from = status_cmd_int(arg); status_get_string(p, JK_STATUS_ARG_CMD, NULL, &arg, l); prev = status_cmd_int(arg); +if (cmd == JK_STATUS_CMD_SHOW && prev == JK_STATUS_CMD_EDIT) { +restore_sub_worker = JK_TRUE; +} if (cmd == JK_STATUS_CMD_UNKNOWN) { if (prev == JK_STATUS_CMD_UPDATE || prev == JK_STATUS_CMD_RESET || prev == JK_STATUS_CMD_RECOVER) { cmd = from; +restore_sub_worker = JK_TRUE; } } if (cmd != JK_STATUS_CMD_UNKNOWN) { @@ -1063,6 +1070,7 @@ cmd == JK_STATUS_CMD_RECOVER) { jk_printf(s, "%s%s=%s", "&", JK_STATUS_ARG_FROM, status_cmd_text(prev)); +save_sub_worker = JK_TRUE; } started=1; } @@ -1103,7 +,24 @@ if (!strcmp(k, JK_STATUS_ARG_WORKER) && worker) { continue; } -if (!strcmp(k, JK_STATUS_ARG_SUB_WORKER) && (sub_worker || cmd == JK_STATUS_CMD_LIST)) { +if (!strcmp(k, JK_STATUS_ARG_SUB_WORKER)) { +if (save_sub_worker == JK_TRUE) { +jk_printf(s, "%s%s=%s", started ? "&" : "?", + JK_STATUS_ARG_PREV_SUB_WORKER, v); +started=1; +continue; +} +else if (sub_worker || cmd == JK_STATUS_CMD_LIST) { +continue; +} +else if (restore_sub_worker == JK_TRUE) { +continue; +} +} +if (!strcmp(k, JK_STATUS_ARG_PREV_SUB_WORKER) && restore_sub_worker == JK_TRUE && cmd != JK_STATUS_CMD_LIST) { +jk_printf(s, "%s%s=%s", started ? "&" : "?", + JK_STATUS_ARG_SUB_WORKER, v); +started=1; continue; } if (!strcmp(k, JK_STATUS_ARG_ATTRIBUTE) && attribute) { Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=749506&r1=749505&r2=749506&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Mar 3 02:09:27 2009 @@ -44,6 +44,10 @@ +Status: Show - Edit - Show always ends in single lb member show, +even when started from all members lb show. + + Status: Wildcards in sub worker names were broken for update actions. (rjung) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r749685 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp_common.c jk_ajp_common.h jk_lb_worker.c jk_lb_worker.h jk_status.c
Author: rjung Date: Tue Mar 3 18:38:51 2009 New Revision: 749685 URL: http://svn.apache.org/viewvc?rev=749685&view=rev Log: Some updates related to dynamic address change: - Include shm lock and unlock in pull and push functions. Indicate whether we already acquired the lock with the new argument "locked". - Move the dynamic address resolution into jk_ajp_pull(). Do the actual resolution outside of the lock, and don't change the worker is the resolution fails. In case of failure log an error, but do not fail fatal. - Use a fixed size array for the host field in the ajp structure. We use that in shm anyways and we wouldn't know how to free the dynamic memory, if we allocated the host filed fresh during each address update. - Only use local data copy when displaying config data in the status worker. We ensure, that we sync via pull if needed, so no need to use the shm data except for the volatile runtime statistics data. - Do not directly write new address data to shm in status worker, instead use general push mechanism. - In status worker ensure that host is always set before trying to update address data, even if only port changed. - Fix display of address data in status worker for port equals zero case. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h 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 Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=749685&r1=749684&r2=749685&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Tue Mar 3 18:38:51 2009 @@ -963,10 +963,16 @@ } /* Syncing config values from shm */ -void jk_ajp_pull(ajp_worker_t * aw, jk_logger_t *l) +void jk_ajp_pull(ajp_worker_t * aw, int locked, jk_logger_t *l) { +int resolve = JK_FALSE; +int port = 0; +char host[JK_SHM_STR_SIZ+1]; +struct sockaddr_in inet_addr; JK_TRACE_ENTER(l); +if (locked == JK_FALSE) +jk_shm_lock(); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, "syncing mem for ajp worker '%s' from shm", @@ -981,15 +987,39 @@ aw->retry_interval = aw->s->retry_interval; aw->max_packet_size = aw->s->max_packet_size; aw->sequence = aw->s->h.sequence; +if (aw->addr_sequence != aw->s->addr_sequence) { +resolve = JK_TRUE; +aw->addr_sequence = aw->s->addr_sequence; +strncpy(host, aw->s->host, JK_SHM_STR_SIZ); +port = aw->s->port; +} +if (locked == JK_FALSE) +jk_shm_unlock(); + +if (resolve == JK_TRUE) { +if (!jk_resolve(host, port, &inet_addr, +aw->worker.we->pool, l)) { +jk_log(l, JK_LOG_ERROR, + "Failed resolving address '%s:%d' for worker '%s'.", + host, port, aw->name); +} +else { +aw->port = port; +strncpy(aw->host, host, JK_SHM_STR_SIZ); +memcpy(&(aw->worker_inet_addr), &inet_addr, sizeof(inet_addr)); +} +} JK_TRACE_EXIT(l); } /* Syncing config values to shm */ -void jk_ajp_push(ajp_worker_t * aw, jk_logger_t *l) +void jk_ajp_push(ajp_worker_t * aw, int locked, jk_logger_t *l) { JK_TRACE_ENTER(l); +if (locked == JK_FALSE) +jk_shm_lock(); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, "syncing shm for ajp worker '%s' from mem", @@ -1004,6 +1034,13 @@ aw->s->retry_interval = aw->retry_interval; aw->s->max_packet_size = aw->max_packet_size; aw->s->h.sequence = aw->sequence; +if (aw->s->addr_sequence != aw->addr_sequence) { +aw->s->addr_sequence = aw->addr_sequence; +strncpy(aw->s->host, aw->host, JK_SHM_STR_SIZ); +aw->s->port = aw->port; +} +if (locked == JK_FALSE) +jk_shm_unlock(); JK_TRACE_EXIT(l); } @@ -2164,23 +2201,8 @@ p = e->endpoint_private; aw = p->worker; -jk_shm_lock(); if (aw->sequence != aw->s->h.sequence) -jk_ajp_pull(aw, l); -if (aw->addr_sequence != aw->s->addr_sequence) { -aw->addr_sequence = aw->s->addr_sequence; -aw->host = aw->s->host; -aw->port = aw->s->port; -if (!jk_resolve(aw->host, aw->port, &aw->worker_in
svn commit: r750051 - in /tomcat/connectors/trunk/jk/xdocs: generic_howto/timeouts.xml reference/workers.xml
Author: rjung Date: Wed Mar 4 15:38:17 2009 New Revision: 750051 URL: http://svn.apache.org/viewvc?rev=750051&view=rev Log: Clarify relation between socket_timeout and socket_connect_timeout in docs, especially since we are using different units (seconds and milliseconds). Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml?rev=750051&r1=750050&r2=750051&view=diff == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml Wed Mar 4 15:38:17 2009 @@ -167,7 +167,8 @@ failure situations failure detection during connection establishment can take several minutes due to TCP retransmits. Depending on the quality of your network a timeout somewhere between 1000 and 5000 milliseconds -should be fine. +should be fine. Note that socket_timeout is in seconds, and +socket_connect_timeout in milliseconds. Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?rev=750051&r1=750050&r2=750051&view=diff == --- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Wed Mar 4 15:38:17 2009 @@ -248,11 +248,17 @@ on all socket operations. - + Socket connect timeout in milliseconds used for the communication channel between JK and remote host. If the remote host does not respond inside the timeout specified, JK will generate an error, and retry again. +Note that socket_timeout is in seconds, and +socket_connect_timeout in milliseconds, +so in absolute terms the default socket_connect_timeout is +equal to "socket_timeout. + + This feature has been added in jk 1.2.27. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750058 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Author: rjung Date: Wed Mar 4 16:01:17 2009 New Revision: 750058 URL: http://svn.apache.org/viewvc?rev=750058&view=rev 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?rev=750058&r1=750057&r2=750058&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Wed Mar 4 16:01:17 2009 @@ -43,6 +43,12 @@ + +Docs: Clarify relation between socket_timeout and socket_connect_timeout. (rjung) + + +SHM: Move locking into the data pull and push methods. (rjung) + Status: Show - Edit - Show always ends in single lb member show, even when started from all members lb show. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750067 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp_common.c jk_lb_worker.c
Author: rjung Date: Wed Mar 4 16:38:20 2009 New Revision: 750067 URL: http://svn.apache.org/viewvc?rev=750067&view=rev Log: Move Logging outside of locked block in pull/push and include sequence counters in debug log message. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=750067&r1=750066&r2=750067&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Wed Mar 4 16:38:20 2009 @@ -971,12 +971,12 @@ struct sockaddr_in inet_addr; JK_TRACE_ENTER(l); -if (locked == JK_FALSE) -jk_shm_lock(); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, - "syncing mem for ajp worker '%s' from shm", - aw->name); + "syncing mem for ajp worker '%s' from shm (%u -> %u) [%u->%u]", + aw->name, aw->sequence, aw->s->h.sequence, aw->addr_sequence, aw->s->addr_sequence); +if (locked == JK_FALSE) +jk_shm_lock(); aw->cache_timeout = aw->s->cache_timeout; aw->connect_timeout = aw->s->connect_timeout; @@ -1018,12 +1018,12 @@ { JK_TRACE_ENTER(l); -if (locked == JK_FALSE) -jk_shm_lock(); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, - "syncing shm for ajp worker '%s' from mem", - aw->name); + "syncing shm for ajp worker '%s' from mem (%u -> %u) [%u->%u]", + aw->name, aw->s->h.sequence, aw->sequence, aw->s->addr_sequence, aw->addr_sequence); +if (locked == JK_FALSE) +jk_shm_lock(); aw->s->cache_timeout = aw->cache_timeout; aw->s->connect_timeout = aw->connect_timeout; 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?rev=750067&r1=750066&r2=750067&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Wed Mar 4 16:38:20 2009 @@ -288,12 +288,12 @@ JK_TRACE_ENTER(l); -if (locked == JK_FALSE) -jk_shm_lock(); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, - "syncing mem for lb '%s' from shm", - p->name); + "syncing mem for lb '%s' from shm (%u->%u)", + p->name, p->sequence, p->s->h.sequence); +if (locked == JK_FALSE) +jk_shm_lock(); p->sticky_session = p->s->sticky_session; p->sticky_session_force = p->s->sticky_session_force; p->recover_wait_time = p->s->recover_wait_time; @@ -342,12 +342,12 @@ JK_TRACE_ENTER(l); -if (locked == JK_FALSE) -jk_shm_lock(); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, - "syncing shm for lb '%s' from mem", - p->name); + "syncing shm for lb '%s' from mem (%u->%u)", + p->name, p->s->h.sequence, p->sequence); +if (locked == JK_FALSE) +jk_shm_lock(); p->s->sticky_session = p->sticky_session; p->s->sticky_session_force = p->sticky_session_force; p->s->recover_wait_time = p->recover_wait_time; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750069 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
Author: rjung Date: Wed Mar 4 16:39:19 2009 New Revision: 750069 URL: http://svn.apache.org/viewvc?rev=750069&view=rev Log: Use port == 0 as a disable indicator instead of addr_sequence. That makes it more consistent. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.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?rev=750069&r1=750068&r2=750069&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Wed Mar 4 16:39:19 2009 @@ -1560,7 +1560,7 @@ if (p->lb_workers[i].worker->type == JK_AJP13_WORKER_TYPE || p->lb_workers[i].worker->type == JK_AJP14_WORKER_TYPE) { ajp_worker_t *aw = (ajp_worker_t *)p->lb_workers[i].worker->worker_private; -if (!aw->addr_sequence) { +if (aw->port == 0) { p->lb_workers[i].activation = JK_LB_ACTIVATION_STOPPED; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750070 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Wed Mar 4 16:40:38 2009 New Revision: 750070 URL: http://svn.apache.org/viewvc?rev=750070&view=rev Log: Initialize side_effect indicator properly. Handle dynamic address changes and error returns correctly in the non lb case. 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?rev=750070&r1=750069&r2=750070&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Mar 4 16:40:38 2009 @@ -4019,6 +4019,7 @@ "Status worker '%s' %s lb worker '%s' sub worker '%s'", w->name, "updating", lb->name, wr->name); aw = (ajp_worker_t *)wr->worker->worker_private; +rv = 0; rc = commit_member(s, p, lb, wr, aw, &rv, l); if (rv & JK_STATUS_NEEDS_ADDR_PUSH) { aw->addr_sequence++; @@ -4068,11 +4069,26 @@ w->name, "updating", aw->name); if (aw->sequence != aw->s->h.sequence) jk_ajp_pull(aw, JK_TRUE, l); +rv = 0; rc = commit_member(s, p, NULL, NULL, aw, &rv, l); -if (rv & JK_STATUS_NEEDS_PUSH) { +if (rv & JK_STATUS_NEEDS_ADDR_PUSH) { +aw->addr_sequence++; +} +if (rv & (JK_STATUS_NEEDS_PUSH | JK_STATUS_NEEDS_ADDR_PUSH)) { aw->sequence++; jk_ajp_push(aw, JK_TRUE, l); } +if (rc == JK_FALSE) { +jk_log(l, JK_LOG_ERROR, + "Status worker '%s' failed updating worker '%s' (at least partially).", + w->name, aw->name); +if (!strncmp("OK", p->msg, 3)) { +const char *msg = "Update failed (at least partially) for worker '%s'"; +size_t size = strlen(msg) + strlen(aw->name) + 1; +p->msg = jk_pool_alloc(s->pool, size); +snprintf(p->msg, size, msg, aw->name); +} +} JK_TRACE_EXIT(l); return rc; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750075 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml
Author: rjung Date: Wed Mar 4 17:01:41 2009 New Revision: 750075 URL: http://svn.apache.org/viewvc?rev=750075&view=rev Log: Remove redundant port information form ajp worker display of status worker. Rename address column and remove its explanation from the legend. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml 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?rev=750075&r1=750074&r2=750075&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Mar 4 17:01:41 2009 @@ -118,7 +118,7 @@ #define JK_STATUS_ARG_AJP_MAX_PK_SZ"vamps" #define JK_STATUS_ARG_AJP_CPING_INT"vacpi" #define JK_STATUS_ARG_AJP_HOST_STR "vaddr" -#define JK_STATUS_ARG_AJP_PORT_INT "vaprt" +#define JK_STATUS_ARG_AJP_PORT "vaprt" #define JK_STATUS_ARG_AJP_TEXT_CACHE_TO"Connection Pool Timeout" #define JK_STATUS_ARG_AJP_TEXT_PING_TO "Ping Timeout" @@ -131,7 +131,8 @@ #define JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ "Max Packet Size" #define JK_STATUS_ARG_AJP_TEXT_CPING_INT "Connection Ping Interval" #define JK_STATUS_ARG_AJP_TEXT_HOST_STR"Hostname" -#define JK_STATUS_ARG_AJP_TEXT_PORT_INT"Port" +#define JK_STATUS_ARG_AJP_TEXT_PORT"Port" +#define JK_STATUS_ARG_AJP_TEXT_ADDR_STR"Address:Port" #define JK_STATUS_CMD_UNKNOWN (0) #define JK_STATUS_CMD_LIST (1) @@ -234,7 +235,8 @@ #define JK_STATUS_URI_MAP_TABLE_ROW2 "%s%s%s%s%d%s%s%s%s\n" #define JK_STATUS_SHOW_AJP_CONF_HEAD "" \ "Type" \ - "" JK_STATUS_ARG_AJP_TEXT_HOST_STR "Addr" \ + "" JK_STATUS_ARG_AJP_TEXT_HOST_STR "" \ + "" JK_STATUS_ARG_AJP_TEXT_ADDR_STR "" \ "" JK_STATUS_ARG_AJP_TEXT_CACHE_TO "" \ "" JK_STATUS_ARG_AJP_TEXT_CONNECT_TO "" \ "" JK_STATUS_ARG_AJP_TEXT_PREPOST_TO "" \ @@ -245,7 +247,7 @@ "\n" #define JK_STATUS_SHOW_AJP_CONF_ROW"" \ "%s" \ - "%s:%d" \ + "%s" \ "%s" \ "%d" \ "%d" \ @@ -327,7 +329,8 @@ "\n" #define JK_STATUS_SHOW_MEMBER_CONF_HEAD"" \ "NameType" \ - "" JK_STATUS_ARG_AJP_TEXT_HOST_STR "Addr" \ + "" JK_STATUS_ARG_AJP_TEXT_HOST_STR "" \ + "" JK_STATUS_ARG_AJP_TEXT_ADDR_STR "" \ "" JK_STATUS_ARG_AJP_TEXT_CACHE_TO "" \ "" JK_STATUS_ARG_AJP_TEXT_CONNECT_TO "" \ "" JK_STATUS_ARG_AJP_TEXT_PREPOST_TO "" \ @@ -339,7 +342,7 @@ #define JK_STATUS_SHOW_MEMBER_CONF_ROW "" \ "%s" \ "%s" \ - "%s:%d" \ + "%s" \ "%s" \ "%d" \ "%d" \ @@ -1667,7 +1670,7 @@ jk_printf(s, JK_STATUS_SHOW_MEMBER_CONF_ROW, aw->name, status_worker_type(type), - aw->host, aw->port, + aw->host, dump_ajp_addr(aw, buf), aw->cache_timeout, aw->connect_timeout, @@ -1679,7 +1682,7 @@ else jk_printf(s, JK_STATUS_SHOW_AJ
svn commit: r750079 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Wed Mar 4 17:17:54 2009 New Revision: 750079 URL: http://svn.apache.org/viewvc?rev=750079&view=rev Log: Rename URL parameter for host name from vaddr to vahst in status worker. The "a" is reserved for "AJP". 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?rev=750079&r1=750078&r2=750079&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Mar 4 17:17:54 2009 @@ -117,7 +117,7 @@ #define JK_STATUS_ARG_AJP_REC_OPTS "varo" #define JK_STATUS_ARG_AJP_MAX_PK_SZ"vamps" #define JK_STATUS_ARG_AJP_CPING_INT"vacpi" -#define JK_STATUS_ARG_AJP_HOST_STR "vaddr" +#define JK_STATUS_ARG_AJP_HOST_STR "vahst" #define JK_STATUS_ARG_AJP_PORT "vaprt" #define JK_STATUS_ARG_AJP_TEXT_CACHE_TO"Connection Pool Timeout" - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750080 - /tomcat/connectors/trunk/jk/xdocs/reference/status.xml
Author: rjung Date: Wed Mar 4 17:19:20 2009 New Revision: 750080 URL: http://svn.apache.org/viewvc?rev=750080&view=rev Log: Add dynamic adress change feature to status worker docs page. Hope my explanation makes sense. 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?rev=750080&r1=750079&r2=750080&view=diff == --- tomcat/connectors/trunk/jk/xdocs/reference/status.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/status.xml Wed Mar 4 17:19:20 2009 @@ -391,7 +391,7 @@ The action is determined by the parameter cmd. It can have the values "list", "show", -"edit", "update", "reset", "recover", "version" and "dump". If you omit the "cmd" parameter, +"edit", "update", "reset", "recover", "version" and "dump". If you omit the cmd parameter, the default "list" will be used. All actions except for "list", "refresh", "version" and "dump" need additional parameters. @@ -403,7 +403,7 @@ The format is determined by the parameter mime. It can have the values "html", "xml", -"txt" and "prop". If you omit the "mime" parameter, the default "html" +"txt" and "prop". If you omit the mime parameter, the default "html" will be used. The action "edit" (the edit form) does only make sense for "mime=html". @@ -412,7 +412,7 @@ Actions that operate on a single worker need one or two additional parameters to select this worker. The parameter w contains the name of the worker from the worker list. -If an action operates on a member (sub worker) of a load balancer, the parameter "w" +If an action operates on a member (sub worker) of a load balancer, the parameter w contains the name of the load balancer worker, and the additional parameter sw contains the name of the sub worker. @@ -514,6 +514,12 @@ Finally the list of parameters you can use to change settings for ajp workers and ajp load balancer members: +vahst: host (string) + + +vaprt: port (number) + + vacpt: connection_pool_timeout (number) @@ -535,6 +541,14 @@ vamps: max_packet_size (number) +Note that changing the host name or port will only take effect for new connections. +Already established connections to the old address will still be used. +Nevertheless this feature is interesting, because you can provision load balancer +members with port "0", which will automatically be stopped during startup. Later +when you know the final names and ports, you can set them and they will be +automatically activated. + + The leading character "v" has been added to the parameters in version 1.2.27. Changing settings for ajp workers has also been introduced in version 1.2.27. @@ -549,10 +563,11 @@ member of a load balancer respectively on one page. If you want to edit one configuration aspect for all members of a load balancer simultaneously, this will be triggered by the parameter att. The value of the parameter indicates, -which aspect you want to edit. The list is the same as in the previous section: +which aspect you want to edit. The list is the same as in the previous section, +except for "vahst" and "vaprt": "vwa", "vwf", "vwn", "vwr", "vwc", "vwd", "vacpt", "vact", "vapt", "vart", "var", "varo" and "vamps". But here you -need to put the name into the parameter "att", instead of using it as a request +need to put the name into the parameter att, instead of using it as a request parameter name. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750082 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Wed Mar 4 17:23:49 2009 New Revision: 750082 URL: http://svn.apache.org/viewvc?rev=750082&view=rev Log: I think we can initialize addr_sequence in any case, because we use the port to decide, whether this worker is enabled or not. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=750082&r1=750081&r2=750082&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Wed Mar 4 17:23:49 2009 @@ -2508,11 +2508,11 @@ /* Copy the contact to shm */ strncpy(p->s->host, p->host, JK_SHM_STR_SIZ); p->s->port = p->port; +p->s->addr_sequence = p->addr_sequence = 0; /* Resolve if port > 0. */ if (p->port > 0) { if (jk_resolve(p->host, p->port, &p->worker_inet_addr, we->pool, l)) { -p->s->addr_sequence = p->addr_sequence = 1; JK_TRACE_EXIT(l); return JK_TRUE; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750254 - in /tomcat/connectors/trunk/jk/xdocs: miscellaneous/changelog.xml reference/iis.xml
Author: rjung Date: Thu Mar 5 00:24:59 2009 New Revision: 750254 URL: http://svn.apache.org/viewvc?rev=750254&view=rev Log: Clarify IIS URL rewrite feature in documentation. Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/reference/iis.xml Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=750254&r1=750253&r2=750254&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu Mar 5 00:24:59 2009 @@ -44,6 +44,9 @@ +Docs: Clarify IIS URL rewrite feature. (rjung) + + Status: Remove redundant port information form worker display. Rename address column and remove its explanation from the legend. (rjung) Modified: tomcat/connectors/trunk/jk/xdocs/reference/iis.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/iis.xml?rev=750254&r1=750253&r2=750254&view=diff == --- tomcat/connectors/trunk/jk/xdocs/reference/iis.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/iis.xml Thu Mar 5 00:24:59 2009 @@ -284,10 +284,8 @@ - # Use the logs in the installation path of ISAPI Redirector log_file=$(ISAPI_PATH)\$(ISAPI_NAME).log - @@ -297,22 +295,24 @@ as powerful as Apache Httpd's mod_rewrite, it allows a simple exchange of request URIs -The rule is in the form rewritten=real-url. +The rule is in the form original-url-prefix=forward-url-prefix. For example: - -The rules must be simple strings. For example: - - -# Simple rewrite rules - +# Simple rewrite rules, making /jsp-examples +# and /servlets-examples available under shorter URLs /jsp/=/jsp-examples/ /servlets/=/servlets-examples/ - + +You can also use regular expressions, if you prefix the rule with a tilde ~: + +# Complex rewrite rule, adding "-examples" +# to the first path component of all requests +~/([^/]*)=/$1-examples + -Note that the uriworkermap or mount point must point to that new rule. +Note that uriworkermap.properties must use the URLs before rewriting. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750274 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/reference/apache.xml
Author: rjung Date: Thu Mar 5 01:29:00 2009 New Revision: 750274 URL: http://svn.apache.org/viewvc?rev=750274&view=rev Log: Rename two of the new environment variables, after checking what they really do. local name and port are set from those AJP attributes, server name and port are parsed from the host header. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=750274&r1=750273&r2=750274&view=diff == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Thu Mar 5 01:29:00 2009 @@ -68,8 +68,8 @@ #define JK_ENV_REMOTE_HOST ("JK_REMOTE_HOST") #define JK_ENV_REMOTE_USER ("JK_REMOTE_USER") #define JK_ENV_AUTH_TYPE("JK_AUTH_TYPE") -#define JK_ENV_SERVER_NAME ("JK_SERVER_NAME") -#define JK_ENV_SERVER_PORT ("JK_SERVER_PORT") +#define JK_ENV_LOCAL_NAME ("JK_LOCAL_NAME") +#define JK_ENV_LOCAL_PORT ("JK_LOCAL_PORT") #define JK_ENV_HTTPS("HTTPS") #define JK_ENV_CERTS("SSL_CLIENT_CERT") #define JK_ENV_CIPHER ("SSL_CIPHER") @@ -174,8 +174,8 @@ char *remote_host_indicator; char *remote_user_indicator; char *auth_type_indicator; -char *server_name_indicator; -char *server_port_indicator; +char *local_name_indicator; +char *local_port_indicator; /* * SSL Support @@ -713,13 +713,13 @@ /* s->server_name = (char *)(r->hostname ? r->hostname : r->server->server_hostname); */ /* XXX : a la jk2 */ s->server_name = get_env_string(r, (char *)ap_get_server_name(r), -conf->server_name_indicator, 0); +conf->local_name_indicator, 0); /* get the real port (otherwise redirect failed) */ /* s->server_port = htons( r->connection->local_addr.sin_port ); */ /* XXX : a la jk2 */ s->server_port = get_env_int(r, ap_get_server_port(r), - conf->server_port_indicator); + conf->local_port_indicator); s->server_software = (char *)ap_get_server_version(); @@ -1747,23 +1747,23 @@ return NULL; } -static const char *jk_set_server_name_indicator(cmd_parms * cmd, -void *dummy, char *indicator) +static const char *jk_set_local_name_indicator(cmd_parms * cmd, + void *dummy, char *indicator) { server_rec *s = cmd->server; jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); -conf->server_name_indicator = ap_pstrdup(cmd->pool, indicator); +conf->local_name_indicator = ap_pstrdup(cmd->pool, indicator); return NULL; } -static const char *jk_set_server_port_indicator(cmd_parms * cmd, -void *dummy, char *indicator) +static const char *jk_set_local_port_indicator(cmd_parms * cmd, + void *dummy, char *indicator) { server_rec *s = cmd->server; jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); -conf->server_port_indicator = ap_pstrdup(cmd->pool, indicator); +conf->local_port_indicator = ap_pstrdup(cmd->pool, indicator); return NULL; } @@ -2161,10 +2161,10 @@ "Name of the Apache environment that contains the remote user name"}, {"JkAuthTypeIndicator", jk_set_auth_type_indicator, NULL, RSRC_CONF, TAKE1, "Name of the Apache environment that contains the type of authentication"}, -{"JkServerNameIndicator", jk_set_server_name_indicator, NULL, RSRC_CONF, TAKE1, - "Name of the Apache environment that contains the server name"}, -{"JkServerPortIndicator", jk_set_server_port_indicator, NULL, RSRC_CONF, TAKE1, - "Name of the Apache environment that contains the server port"}, +{"JkLocalNameIndicator", jk_set_local_name_indicator, NULL, RSRC_CONF, TAKE1, + "Name of the Apache environment that contains the local name"}, +{"JkLocalPortIndicator", jk_set_local_port_indicator, NULL, RSRC_CONF, TAKE1, + "Name of the Apache environment that contains the local port"}, /*
svn commit: r750276 - /tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml
Author: rjung Date: Thu Mar 5 01:33:59 2009 New Revision: 750276 URL: http://svn.apache.org/viewvc?rev=750276&view=rev Log: Adding a new documentation page about the special situation of a reverse proxy. Needs some checking and proof reading. Added: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml (with props) Added: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml?rev=750276&view=auto == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml (added) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml Thu Mar 5 01:33:59 2009 @@ -0,0 +1,303 @@ + + +]> + + + &project; + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. + + +Reverse Proxy HowTo +Rainer Jung +$Date$ + + + + +The Apache module mod_jk and its ISAPI and NSAPI variants connect +a web server to a backend (typically Tomcat) using the AJP protocol. +The web server receives an HTTP(S) request and the module forwards +the request to the back end. This situation is usually called a gateway +or a proxy, in the context of HTTP it is called a reverse proxy. + + + + +A reverse proxy is not totally transparent to the application on +the backend. For instance the host name and port the original client +(e.g. browser) needs to talk to belong to the web server and not to the +backend, so the reverse proxy talks to a different host name and port. +When the application on the backend returns content including +self-referencing URLs using its own backend address and port, the +client will usually not be able to use these URLs. + + +Another example is the client IP address, which for the web server is the +source IP of the incoming connection, whereas for the backend the +connection always comes from the web server. This can be a problem, when +th client IP is checked by the backend application e.g. for security reasons. + + + + +Most of these problems are automatically handled by the AJP protocol +and the AJP connectors of the backend. The AJP protocol transports +this communication metadata and the backend connector presents this +metadata whenever the appliaction asks for it using Servlet API methods. + +The following list contains the communication metadata handled by AJP +and the HttpServletRequest API calls which can be used to retrieve them: + +local name: getLocalName() and getLocalAddr. +This is also equal to getServerName(), unless a Host header +is contained in the request. in this case server name is taken from that header. + +local port: getLocalPort() +This is also equal to getServerPort(), unless a Host header +is contained in the request. in this case server port is taken from that header +if it contains an explicit port, or is equal to the default port of the scheme used. + +client address: getRemoteAddr() + +client host: getRemoteHost() + +authentication type: getAuthType() + +remote user: getRemoteUser(), +if tomcatAuthentication="false" + +protocol: getProtocol() + +HTTP method: getMethod() + +URI: getRequestURI() + +HTTPS used: isSecure(), getScheme() + +query string: getQueryString() + +SSL cipher: getAttribute(javax.servlet.request.cipher_suite) + +SSL key size: getAttribute(javax.servlet.request.key_size) + +SSL client certificate: getAttribute(javax.servlet.request.X509Certificate) + +SSL session ID: getAttribute(javax.servlet.request.ssl_session). +This is for Tomcat, it has not yet been standardized. + + + + + + +In some situations this is not enough though. Assume there is another +less clever reverse proxy in front of your web server, for instance an +HTTP load balancer or similar device which also serves as an SSL accelerator. + +Then you are sure, all your clients use HTTPS, but your web server doesn't +know about that. All it can see is requests coming from the accelerator using +plain HTTP. + +Another example would be a simple reverse proxy in front of your web server, +so that the client IP address your web server detects is always the IP address +of this reverse proxy, and not of the original client. Often such reverse p
svn commit: r750282 - in /tomcat/connectors/trunk/jk/xdocs: ajp/project.xml generic_howto/project.xml miscellaneous/changelog.xml miscellaneous/project.xml news/project.xml project.xml reference/proje
Author: rjung Date: Thu Mar 5 01:49:08 2009 New Revision: 750282 URL: http://svn.apache.org/viewvc?rev=750282&view=rev Log: Add new docs page to menues and the changelog. Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml tomcat/connectors/trunk/jk/xdocs/news/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml tomcat/connectors/trunk/jk/xdocs/reference/project.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/ajp/project.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/ajp/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/ajp/project.xml Thu Mar 5 01:49:08 2009 @@ -42,6 +42,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml Thu Mar 5 01:49:08 2009 @@ -42,6 +42,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu Mar 5 01:49:08 2009 @@ -44,6 +44,9 @@ +Docs: Add a new HowTo page about reverse proxies. (rjung) + + Docs: Clarify IIS URL rewrite feature. (rjung) Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml Thu Mar 5 01:49:08 2009 @@ -42,6 +42,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/news/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/project.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/news/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/news/project.xml Thu Mar 5 01:49:08 2009 @@ -42,6 +42,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/project.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/project.xml Thu Mar 5 01:49:08 2009 @@ -42,6 +42,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/reference/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/project.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/reference/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/project.xml Thu Mar 5 01:49:08 2009 @@ -42,6 +42,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml?rev=750282&r1=750281&r2=750282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml Thu Mar 5 01:49:08 2009 @@ -42,6 +42,7 @@ + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750283 - /tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml
Author: rjung Date: Thu Mar 5 01:49:33 2009 New Revision: 750283 URL: http://svn.apache.org/viewvc?rev=750283&view=rev Log: Fix some typos in new page. Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml?rev=750283&r1=750282&r2=750283&view=diff == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml Thu Mar 5 01:49:33 2009 @@ -32,11 +32,11 @@ The Apache module mod_jk and its ISAPI and NSAPI variants connect a web server to a backend (typically Tomcat) using the AJP protocol. The web server receives an HTTP(S) request and the module forwards -the request to the back end. This situation is usually called a gateway +the request to the backend. This function is usually called a gateway or a proxy, in the context of HTTP it is called a reverse proxy. - + A reverse proxy is not totally transparent to the application on the backend. For instance the host name and port the original client @@ -50,26 +50,26 @@ Another example is the client IP address, which for the web server is the source IP of the incoming connection, whereas for the backend the connection always comes from the web server. This can be a problem, when -th client IP is checked by the backend application e.g. for security reasons. +the client IP is used by the backend application e.g. for security reasons. - + Most of these problems are automatically handled by the AJP protocol and the AJP connectors of the backend. The AJP protocol transports this communication metadata and the backend connector presents this -metadata whenever the appliaction asks for it using Servlet API methods. +metadata whenever the application asks for it using Servlet API methods. The following list contains the communication metadata handled by AJP and the HttpServletRequest API calls which can be used to retrieve them: local name: getLocalName() and getLocalAddr. This is also equal to getServerName(), unless a Host header -is contained in the request. in this case server name is taken from that header. +is contained in the request. In this case the server name is taken from that header. local port: getLocalPort() This is also equal to getServerPort(), unless a Host header -is contained in the request. in this case server port is taken from that header +is contained in the request. In this case the server port is taken from that header if it contains an explicit port, or is equal to the default port of the scheme used. client address: getRemoteAddr() @@ -103,7 +103,7 @@ - + In some situations this is not enough though. Assume there is another less clever reverse proxy in front of your web server, for instance an @@ -114,18 +114,18 @@ plain HTTP. Another example would be a simple reverse proxy in front of your web server, -so that the client IP address your web server detects is always the IP address +so that the client IP address that your web server sees is always the IP address of this reverse proxy, and not of the original client. Often such reverse proxies generate an additional HTTP header, like X-Forwareded-for which contains the original client IP address (or a list of IP addresses, if there are more cascading reverse proxies in front). It would be nice, if we could use the -content of such a header as the client IP adrress to pass to the backend. +content of such a header as the client IP address to pass to the backend. So we might need to manipulate some of the data that AJP sends to the backend. When using mod_jk inside Apache httpd you can use several httpd environment -variables to let mod_jk know, which data it should forward. These environment -be set by the httpd directives SetEnv or SetEnvIf, but also in very flexible -was using mod_rewrite (since httpd 2.x it can not only test against environment +variables to let mod_jk know, which data it should forward. These environment variables +can be set by the httpd directives SetEnv or SetEnvIf, but also in very flexible +way using mod_rewrite (since httpd 2.x it can not only test against environment variables, but also set them). The following list contains all environment variables mod_jk checks, before @@ -135,7 +135,7 @@ JK_LOCAL_PORT: the local port -JK_REMOTE_HOST: the client host XXX ?? +JK_REMOTE_HOST: the client host JK_REMOTE_ADDR: the client address @@ -165,21 +165,21 @@ Some of these variables might also be used by other web server modules. All variables whose name does not begin with "JK" are set directly by Apache httpd. If you want to change the data, but do not want to negatively influence the behaviour -of other modules, you can change the names of
svn commit: r750286 - /tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml
Author: rjung Date: Thu Mar 5 01:55:34 2009 New Revision: 750286 URL: http://svn.apache.org/viewvc?rev=750286&view=rev Log: Fix some formatting issues on new page. Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml?rev=750286&r1=750285&r2=750286&view=diff == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml Thu Mar 5 01:55:34 2009 @@ -46,7 +46,6 @@ self-referencing URLs using its own backend address and port, the client will usually not be able to use these URLs. - Another example is the client IP address, which for the web server is the source IP of the incoming connection, whereas for the backend the connection always comes from the web server. This can be a problem, when @@ -64,11 +63,11 @@ and the HttpServletRequest API calls which can be used to retrieve them: local name: getLocalName() and getLocalAddr. -This is also equal to getServerName(), unless a Host header +This is also equal to getServerName(), unless a Host header is contained in the request. In this case the server name is taken from that header. local port: getLocalPort() -This is also equal to getServerPort(), unless a Host header +This is also equal to getServerPort(), unless a Host header is contained in the request. In this case the server port is taken from that header if it contains an explicit port, or is equal to the default port of the scheme used. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750288 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Author: rjung Date: Thu Mar 5 02:05:12 2009 New Revision: 750288 URL: http://svn.apache.org/viewvc?rev=750288&view=rev Log: Fix typos in 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?rev=750288&r1=750287&r2=750288&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu Mar 5 02:05:12 2009 @@ -91,9 +91,9 @@ 46734: Documentation: Fix broken links. (markt) - IIS: Update uriworkermap.properies file on + IIS: Update uriworkermap.properties file on a regular interval. This requires both worker_mount_reload - and watchog_interval to be defined. (mturk) + and watchdog_interval to be defined. (mturk) Status: Optimize forced uriworkermap.properties reload. (mturk) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750290 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Author: rjung Date: Thu Mar 5 02:06:53 2009 New Revision: 750290 URL: http://svn.apache.org/viewvc?rev=750290&view=rev Log: More typos. 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?rev=750290&r1=750289&r2=750290&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu Mar 5 02:06:53 2009 @@ -50,7 +50,7 @@ Docs: Clarify IIS URL rewrite feature. (rjung) -Status: Remove redundant port information form worker display. +Status: Remove redundant port information from worker display. Rename address column and remove its explanation from the legend. (rjung) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750293 - in /tomcat/connectors/trunk/jk/xdocs: ajp/project.xml generic_howto/project.xml miscellaneous/project.xml news/20090301.xml news/project.xml project.xml reference/project.xml web
Author: rjung Date: Thu Mar 5 02:17:45 2009 New Revision: 750293 URL: http://svn.apache.org/viewvc?rev=750293&view=rev Log: Add a preliminary version of the 2009 news page for the next release. Added: tomcat/connectors/trunk/jk/xdocs/news/20090301.xml (with props) Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml tomcat/connectors/trunk/jk/xdocs/news/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml tomcat/connectors/trunk/jk/xdocs/reference/project.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/ajp/project.xml?rev=750293&r1=750292&r2=750293&view=diff == --- tomcat/connectors/trunk/jk/xdocs/ajp/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/ajp/project.xml Thu Mar 5 02:17:45 2009 @@ -67,6 +67,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml?rev=750293&r1=750292&r2=750293&view=diff == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml Thu Mar 5 02:17:45 2009 @@ -67,6 +67,7 @@ + Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml?rev=750293&r1=750292&r2=750293&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml Thu Mar 5 02:17:45 2009 @@ -67,6 +67,7 @@ + Added: tomcat/connectors/trunk/jk/xdocs/news/20090301.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/20090301.xml?rev=750293&view=auto == --- tomcat/connectors/trunk/jk/xdocs/news/20090301.xml (added) +++ tomcat/connectors/trunk/jk/xdocs/news/20090301.xml Thu Mar 5 02:17:45 2009 @@ -0,0 +1,77 @@ + + + +]> + + + &project; + + +Apache Tomcat Connectors Project +2009 News and Status + + + + + + + + + +The Apache Tomcat team is proud to announce the immediate availability +of Tomcat Connectors 1.2.28. This is a stable release concentrating mainly on +some bug fixes. + + Please see the ChangeLog for a full list of changes. + +If you find any bugs while using this release, please fill in the +https://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%20Connectors";>Bugzilla +Bug Report. + + +The most important new features in this version are: + +Dynamic Address and Port Change Using the Status Worker + +The status worker now allows you to change the address and the port +of an AJP13 worker on the fly. You can e.g. provision dummy workers with a port +equal to "0", which will be automatically put into stopped mode during startup. +Later, when you want to actually use thse workers, you set their address and +port to the final values. + + +Note that already existing connections will go on using the old +address and port. This will be improved in future versions. + +Improved Proxy Flexibility + +You can now overwrite more request metadata before the request gets send to the backend. +This is helpful in case there are other reverse proxies in front of your web server. +A new documentation page explains this in detail. + +Improved IIS support + +IIS support has been improved especially when using mutltiple application pools. +Furthermore you can now configure the ISAPI plugin to update the uriworkermap.properies +file on a regular interval using the watchdog thread. + + + + + Propchange: tomcat/connectors/trunk/jk/xdocs/news/20090301.xml -- svn:eol-style = native Propchange: tomcat/connectors/trunk/jk/xdocs/news/20090301.xml -- svn:keywords = Author Date Id Revision Modified: tomcat/connectors/trunk/jk/xdocs/news/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/project.xml?rev=750293&r1=750292&r2=750293&view=diff == --- tomcat/connectors/trunk/jk/xdocs/news/project.xml (or
svn commit: r750300 - /tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml
Author: rjung Date: Thu Mar 5 02:49:57 2009 New Revision: 750300 URL: http://svn.apache.org/viewvc?rev=750300&view=rev Log: Add Tomcat connector proxy settings to new proxy documentation page. Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml?rev=750300&r1=750299&r2=750300&view=diff == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/proxy.xml Thu Mar 5 02:49:57 2009 @@ -170,6 +170,26 @@ All variables, that are not SSL-related have only been introduced in version 1.2.27. + + +As an alternative to using the environment variables described in the previous section +(which do only exist when using Apache httpd), you can also configure Tomcat to overwrite +some of the communications data forwarded by mod_jk. The AJP connector in Tomcat's server.xml +allows to set the http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html#Attributes";>following properties: + +proxyName: server name as returned by getServerName() + +proxyPort: server port as returned by getServerPort() + +scheme: protocol scheme as returned by getScheme() + +secure: set to "true", if you wish isSecure() to return "true". + + +Remember: in general you don't need to set those. AJP handles all cases automatically, +where the web server running mod_jk knows the right data. + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750420 - /tomcat/connectors/trunk/jk/native/configure.in
Author: rjung Date: Thu Mar 5 11:13:05 2009 New Revision: 750420 URL: http://svn.apache.org/viewvc?rev=750420&view=rev Log: Mark jni related options as deprecated in the help message and add a warning at the end of configure if user enables jni. Modified: tomcat/connectors/trunk/jk/native/configure.in Modified: tomcat/connectors/trunk/jk/native/configure.in URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?rev=750420&r1=750419&r2=750420&view=diff == --- tomcat/connectors/trunk/jk/native/configure.in (original) +++ tomcat/connectors/trunk/jk/native/configure.in Thu Mar 5 11:13:05 2009 @@ -421,11 +421,12 @@ dnl Check for enable-jni JK_JNI_WORKER="" AC_ARG_ENABLE(jni, -[AS_HELP_STRING([--enable-jni],[Build jni_connect.so and enable jni_worker])], +[AS_HELP_STRING([--enable-jni],[DEPRECATED: Build jni_connect.so and enable jni_worker])], [ AC_MSG_RESULT(jni enable (need JDK)) CFLAGS="${CFLAGS} -DHAVE_JNI" JK_JNI_WORKER="\${JK}jk_jni_worker\${OEXT}" +WARN_JNI=1 ])dnl AC_SUBST(JK_JNI_WORKER) @@ -567,7 +568,7 @@ JAVA_PLATFORM="1" AC_ARG_WITH(java-home, -[AS_HELP_STRING([--with-java-home=DIR],[Where is your JDK root directory])], +[AS_HELP_STRING([--with-java-home=DIR],[DEPRECATED: Where is your JDK root directory])], [ # This stuff works if the command line parameter --with-java-home was @@ -670,7 +671,7 @@ AC_ARG_WITH(java-platform, [AS_HELP_STRING([--with-java-platform=VAL], -[Force the Java platform +[DEPRECATED: Force the Java platform (value is 1 for 1.1.x or 2 for 1.2.x or greater)])], [ dnl This requires a bit of tweaking to be handled properly, but @@ -692,7 +693,7 @@ dnl guess OS = OS_TYPE for jni_md.h OS="" AC_ARG_WITH(os-type, -[AS_HELP_STRING([--with-os-type=SUBDIR],[Where is your JDK os-type subdirectory])], +[AS_HELP_STRING([--with-os-type=SUBDIR],[DEPRECATED: Where is your JDK os-type subdirectory])], [ OS=${withval} @@ -763,7 +764,23 @@ jni/Makefile ]) +if ${TEST} -n "${WARN_JNI}" ; then +AC_MSG_WARN([===]) +AC_MSG_WARN([You have used one of the following options:]) +AC_MSG_WARN([--enable-jni]) +AC_MSG_WARN([--with-java-home]) +AC_MSG_WARN([--with-java-platform]) +AC_MSG_WARN([--with-os-type]) +AC_MSG_WARN([These options are only necessary if]) +AC_MSG_WARN([you want to use a worker of type jni.]) +AC_MSG_WARN([These workers have been deprecated.]) +AC_MSG_WARN([They do not work and will be removed from]) +AC_MSG_WARN([a future release]) +AC_MSG_WARN([===]) +fi + if ${TEST} -n "${WARN_CC}" ; then +AC_MSG_WARN([===]) AC_MSG_WARN([Using CC from environment:]) AC_MSG_WARN([CC="$CC"]) AC_MSG_WARN([instead of CC from apxs:]) @@ -773,4 +790,5 @@ AC_MSG_WARN(["libtool: compile: specify a tag with `--tag'"]) AC_MSG_WARN([try running configure without setting CC,]) AC_MSG_WARN([or at least CC should start with "$APXSCC"]) +AC_MSG_WARN([===]) fi - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750428 - /tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c
Author: rjung Date: Thu Mar 5 11:41:25 2009 New Revision: 750428 URL: http://svn.apache.org/viewvc?rev=750428&view=rev Log: Add a deprecation log warning when a JNI worker is instantiated. Modified: tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c Modified: tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c?rev=750428&r1=750427&r2=750428&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c Thu Mar 5 11:41:25 2009 @@ -645,6 +645,11 @@ JK_TRACE_ENTER(l); +jk_log(l, JK_LOG_WARNING, + "Worker '%s' is of type jni, which is deprecated " + "and will be removed in a future release.", + name ? name : "(null)"); + if (!name || !w) { JK_LOG_NULL_PARAMS(l); JK_TRACE_EXIT(l); @@ -1251,6 +1256,10 @@ int JK_METHOD jni_worker_factory(jk_worker_t **w, const char *name, jk_logger_t *l) { +jk_log(l, JK_LOG_WARNING, + "Worker '%s' is of type jni, which is deprecated " + "and will be removed in a future release.", + name ? name : "(null)"); if (w) *w = NULL; return 0; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750429 - in /tomcat/connectors/trunk/jk/xdocs: generic_howto/workers.xml miscellaneous/changelog.xml miscellaneous/faq.xml news/20090301.xml reference/workers.xml webserver_howto/apache.x
Author: rjung Date: Thu Mar 5 11:42:14 2009 New Revision: 750429 URL: http://svn.apache.org/viewvc?rev=750429&view=rev Log: Add deprecation warning about JNI to the docs. Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/workers.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/faq.xml tomcat/connectors/trunk/jk/xdocs/news/20090301.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/workers.xml?rev=750429&r1=750428&r2=750429&view=diff == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/workers.xml Thu Mar 5 11:42:14 2009 @@ -103,7 +103,7 @@ TypeDescription ajp12This worker knows how to forward requests to out-of-process Tomcat workers using the ajpv12 protocol. ajp13This worker knows how to forward requests to out-of-process Tomcat workers using the ajpv13 protocol. - jniThis worker knows how to forward requests to in-process Tomcat workers using JNI. + jniDEPRECATED: This worker knows how to forward requests to in-process Tomcat workers using JNI. lbThis is a load-balancing worker; it knows how to provide round-robin based sticky load balancing with a certain level of fault-tolerance. statusThis is a status worker for managing load balancers. @@ -123,8 +123,6 @@ worker.local.type=ajp12 # Defines a worker named "remote" that uses the ajpv13 protocol to forward requests to a Tomcat process. worker.remote.type=ajp13 - # Defines a worker named "fast" that uses JNI to forward requests to a Tomcat process. - worker.fast.type=jni # Defines a worker named "loadbalancer" that loadbalances several Tomcat processes transparently. worker.loadbalancer.type=lb @@ -308,19 +306,17 @@ You can define "macros" in the property files. These macros let you define properties and later on use them while -constructing other properties and it's very useful when you want to -change your Java Home, Tomcat Home or OS path separator +constructing other properties. - # property example, don't hardcode path separator - ps=\ - workers.tomcat_home=d:\tomcat - workers.java_home=d:\sdk\jdk1.2.2 - # Using macros we'll have : worker.inprocess.class_path=d:\tomcat\classes - worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes - # Using macros we'll have : worker.inprocess.class_path=d:\sdk\jdk1.2.2\lib\tools.jar - worker.inprocess.class_path=$(workers.java_home)$(ps)lib$(ps)tools.jar + # property example, like a network base address + mynet=194.226.31 + # Using the above macro to simplify the address definitions + # for a farm of workers. + worker.node1.host=$(mynet).11 + worker.node2.host=$(mynet).12 + worker.node3.host=$(mynet).13 Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=750429&r1=750428&r2=750429&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu Mar 5 11:42:14 2009 @@ -44,6 +44,9 @@ +JNI: Deprecate JNI workers. (rjung) + + Docs: Add a new HowTo page about reverse proxies. (rjung) Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/faq.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/faq.xml?rev=750429&r1=750428&r2=750429&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/faq.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/faq.xml Thu Mar 5 11:42:14 2009 @@ -263,6 +263,7 @@ +JNI workers have been deprecated. They will likely not work. Do not use them. JNI support requires a multi-threaded environment which is not the general case for Apache 1.3. You should verify if Apache 1.3 has been build with thread support and if not you could add the @@ -281,6 +282,7 @@ +JNI workers have been deprecated. They will likely not work. Do not use them. Under Linux, you should set some environment variables BEFORE launching your Apache server : Modified: tomcat/connectors/trunk/jk/xdocs/news/20090301.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/20090301.xml?rev=750429&r1=750428&r2=750429&view=diff =
svn commit: r750438 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
Author: rjung Date: Thu Mar 5 12:21:46 2009 New Revision: 750438 URL: http://svn.apache.org/viewvc?rev=750438&view=rev Log: Fix typo that breaks compilation. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=750438&r1=750437&r2=750438&view=diff == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Thu Mar 5 12:21:46 2009 @@ -661,9 +661,9 @@ s->vhost_to_text = ws_vhost_to_text; s->vhost_to_uw_map = ws_vhost_to_uw_map; -s->auth_type = get_env_string(r, r->connection->ap_auth_type +s->auth_type = get_env_string(r, r->connection->ap_auth_type, conf->auth_type_indicator, 1); -s->remote_user = get_env_string(r, r->connection->user +s->remote_user = get_env_string(r, r->connection->user, conf->remote_user_indicator, 1); s->protocol = r->protocol; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750459 - /tomcat/connectors/trunk/jk/xdocs/index.xml
Author: rjung Date: Thu Mar 5 13:52:03 2009 New Revision: 750459 URL: http://svn.apache.org/viewvc?rev=750459&view=rev Log: Add 2009 news to the docs front page. Modified: tomcat/connectors/trunk/jk/xdocs/index.xml Modified: tomcat/connectors/trunk/jk/xdocs/index.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?rev=750459&r1=750458&r2=750459&view=diff == --- tomcat/connectors/trunk/jk/xdocs/index.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/index.xml Thu Mar 5 13:52:03 2009 @@ -45,6 +45,16 @@ +XX March 2009 - JK-1.2.28 released +The Apache Tomcat team is proud to announce the immediate availability +of Tomcat Connectors 1.2.28 Stable. This release contains mainly bug fixes and some small improvements. + +Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz";>JK 1.2.28 release sources + | http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz.asc";>PGP signature + +Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/";>binaries for selected platforms. + + 28 October 2008 - JK-1.2.27 released The Apache Tomcat team is proud to announce the immediate availability of Tomcat Connectors 1.2.27 Stable. This release contains interesting improvements. @@ -213,6 +223,8 @@ +2009 + 2008 2007 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r750900 - in /tomcat/connectors/trunk/jk: native/common/jk_lb_worker.c xdocs/miscellaneous/changelog.xml
Author: rjung Date: Fri Mar 6 13:58:41 2009 New Revision: 750900 URL: http://svn.apache.org/viewvc?rev=750900&view=rev Log: Set global worker state of an lb member to error when we reach max_reply_timeouts, or fail_on_status triggered a hard error. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml 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?rev=750900&r1=750899&r2=750900&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Fri Mar 6 13:58:41 2009 @@ -1295,12 +1295,7 @@ * Failing over to another node could help. */ rec->s->errors++; -if (rec->s->busy) { -rec->s->state = JK_LB_STATE_OK; -} -else { -rec->s->state = JK_LB_STATE_ERROR; -} +rec->s->state = JK_LB_STATE_ERROR; p->states[rec->i] = JK_LB_STATE_ERROR; rec->s->error_time = time(NULL); rc = JK_FALSE; @@ -1312,12 +1307,7 @@ * Take this node out of service. */ rec->s->errors++; -if (rec->s->busy) { -rec->s->state = JK_LB_STATE_OK; -} -else { -rec->s->state = JK_LB_STATE_ERROR; -} +rec->s->state = JK_LB_STATE_ERROR; p->states[rec->i] = JK_LB_STATE_ERROR; rec->s->error_time = time(NULL); } Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=750900&r1=750899&r2=750900&view=diff == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Fri Mar 6 13:58:41 2009 @@ -43,6 +43,10 @@ + +LB: Set global worker state to error when we reach max_reply_timeouts, + or fail_on_status triggered hard error. (rjung) + JNI: Deprecate JNI workers. (rjung) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r751239 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sat Mar 7 10:37:57 2009 New Revision: 751239 URL: http://svn.apache.org/viewvc?rev=751239&view=rev Log: No functional change, fix typos and reformat comments. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=751239&r1=751238&r2=751239&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sat Mar 7 10:37:57 2009 @@ -,8 +,10 @@ * @param ae endpoint * @param msg message to send * @param llogger - * @return JK_FALSE: failure - * JK_TRUE: success + * @return JK_TRUE: success + * JK_FALSE: could not read the AJP packet header + * JK_AJP_PROTOCOL_ERROR: failure after reading + * the AJP packet header * @remark Always closes socket in case of * a socket error * @remark Cares about ae->last_errno @@ -1245,8 +1247,8 @@ } ae->sd = JK_INVALID_SOCKET; JK_TRACE_EXIT(l); -/* Altough connection, this is effectively protocol error. - * We got the AJP header packet, but not the packet payload +/* Although we have a connection, this is effectively a protocol error. + * We received the AJP header packet, but not the packet payload */ return JK_AJP_PROTOCOL_ERROR; } @@ -1880,7 +1882,9 @@ * return value op->recoverablereason * JK_REPLY_TIMEOUT ?recovery_options Reply timeout while waiting for response packet * JK_FALSE ?recovery_options Error during ajp_connection_tcp_get_message() - * Communication error or wrong packet content while reading from backend. + * Could not read the AJP packet header + * JK_AJP_PROTOCOL_ERROR: ?recovery_options Error during ajp_connection_tcp_get_message() + * Failure after reading the AJP packet header * JK_STATUS_ERRORmostly JK_TRUE ajp_process_callback() returns JK_STATUS_ERROR * Recoverable, if callback didn't return with a JK_HAS_RESPONSE before. * JK_HAS_RESPONSE: parts of the post buffer are consumed. @@ -2162,17 +2166,17 @@ * Only if op->recoverable and no more ajp13/ajp14 direct retries * JK_STATUS_ERROR JK_HTTP_SERVER_BUSY JK_FALSE ajp_get_reply() returns JK_STATUS_ERROR * Only if !op->recoverable - * JK_STATUS_FATAL_ERROR JK_HTTP_SERVER_BUSY JK_TRUE ajp_get_reply() returns JK_STATUS_ERROR + * JK_STATUS_FATAL_ERROR JK_HTTP_SERVER_BUSY JK_TRUE ajp_get_reply() returns JK_STATUS_ERROR * Only if op->recoverable and no more ajp13/ajp14 direct retries - * JK_STATUS_FATAL_ERROR JK_HTTP_SERVER_BUSY JK_FALSE ajp_get_reply() returns JK_STATUS_FATAL_ERROR + * JK_STATUS_FATAL_ERROR JK_HTTP_SERVER_BUSY JK_FALSEajp_get_reply() returns JK_STATUS_FATAL_ERROR * Only if !op->recoverable * JK_REPLY_TIMEOUT JK_HTTP_GATEWAY_TIME_OUT JK_TRUE ajp_get_reply() returns JK_REPLY_TIMEOUT - * JK_AJP_PROTOCOL_ERROR JK_HTTP_GATEWAY_TIME_OUT JK_TRUEajp_get_reply() returns JK_AJP_PROTOCOL_ERROR + * JK_AJP_PROTOCOL_ERROR JK_HTTP_GATEWAY_TIME_OUT ? ajp_get_reply() returns JK_AJP_PROTOCOL_ERROR * ??? JK_FATAL_ERRORJK_HTTP_GATEWAY_TIME_OUT JK_FALSEajp_get_reply() returns something else * Only if !op->recoverable - * ??? JK_FALSE JK_HTTP_SERVER_BUSYJK_TRUEajp_get_reply() returns JK_FALSE + * ??? JK_FALSE JK_HTTP_SERVER_BUSY JK_TRUEajp_get_reply() returns JK_FALSE * Only if op->recoverable and no more ajp13/ajp14 direct retries - * JK_TRUE JK_HTTP_OK ? OK + * JK_TRUE JK_HTTP_OK? OK */ static int JK_METHOD ajp_service(jk_endpoint_t *e, jk_ws_service_t *s, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r478200 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Wed Nov 22 08:02:50 2006 New Revision: 478200 URL: http://svn.apache.org/viewvc?view=rev&rev=478200 Log: Display of mapping rules does in status worker does make sense for all workers, ajp13 as well as lb. 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=478200&r1=478199&r2=478200 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Nov 22 08:02:50 2006 @@ -588,6 +588,7 @@ jk_putv(s, "", jk_dump_hinfo(&aw->worker_inet_addr, buf), "\n\n", NULL); jk_puts(s, "\n"); +display_maps(s, sw, s->uw_map, dworker, l); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478208 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Wed Nov 22 08:12:00 2006 New Revision: 478208 URL: http://svn.apache.org/viewvc?view=rev&rev=478208 Log: Inherit AliasDir and MountFile only if JkMountCopy is set. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=478208&r1=478207&r2=478208 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Wed Nov 22 08:12:00 2006 @@ -2165,11 +2165,11 @@ copy_jk_map(p, overrides->s, base->uri_to_context, overrides->uri_to_context); copy_jk_map(p, overrides->s, base->automount, overrides->automount); -overrides->mount_file = base->mount_file; +if (!overrides->mount_file) +overrides->mount_file = base->mount_file; +if (!overrides->alias_dir) +overrides->alias_dir = base->alias_dir; } - -if (!overrides->alias_dir) -overrides->alias_dir = base->alias_dir; return overrides; } Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=478208&r1=478207&r2=478208 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Wed Nov 22 08:12:00 2006 @@ -2292,11 +2292,11 @@ copy_jk_map(p, overrides->s, base->uri_to_context, overrides->uri_to_context); copy_jk_map(p, overrides->s, base->automount, overrides->automount); -overrides->mount_file = base->mount_file; +if (!overrides->mount_file) +overrides->mount_file = base->mount_file; +if (!overrides->alias_dir) +overrides->alias_dir = base->alias_dir; } - -if (!overrides->alias_dir) -overrides->alias_dir = base->alias_dir; return overrides; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478210 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp14_worker.c jk_uri_worker_map.c jk_uri_worker_map.h jk_worker.c
Author: rjung Date: Wed Nov 22 08:14:54 2006 New Revision: 478210 URL: http://svn.apache.org/viewvc?view=rev&rev=478210 Log: Adding a source type to the mapping rules. The different sources (worker.properties, JkMount, uriworkermap and ajp14) might need differences in their life cycle. The first such case is reloading of the uriworkermap file. We want to be able to completely reload the mappings in the file, so we need to know, which of the old mappings have been read from the file. The new implementation now deletes all entries from uriworkermap during reload. The old one continuously added the entries during reload. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h tomcat/connectors/trunk/jk/native/common/jk_worker.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c?view=diff&rev=478210&r1=478209&r2=478210 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c Wed Nov 22 08:14:54 2006 @@ -112,7 +112,7 @@ "worker %s will handle uri %s in context %s [%s]", ae->worker->name, ci->uris[j], ci->cbase, buf); -uri_worker_map_add(we->uri_to_worker, buf, ae->worker->name, l); +uri_worker_map_add(we->uri_to_worker, buf, ae->worker->name, SOURCE_TYPE_DISCOVER, l); } } @@ -122,11 +122,11 @@ #else uri_worker_map_add(we->uri_to_worker, "/examples/servlet/*", - ae->worker->name, l); + ae->worker->name, SOURCE_TYPE_DISCOVER, l); uri_worker_map_add(we->uri_to_worker, "/examples/*.jsp", ae->worker->name, - l); + SOURCE_TYPE_DISCOVER, l); uri_worker_map_add(we->uri_to_worker, "/examples/*.gif", ae->worker->name, - l); + SOURCE_TYPE_DISCOVER, l); #endif Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diff&rev=478210&r1=478209&r2=478210 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Wed Nov 22 08:14:54 2006 @@ -38,6 +38,22 @@ #endif +static const char *uri_worker_map_source_type[] = { +"unknown", +SOURCE_TYPE_TEXT_WORKERDEF, +SOURCE_TYPE_TEXT_JKMOUNT, +SOURCE_TYPE_TEXT_URIMAP, +SOURCE_TYPE_TEXT_DISCOVER, +NULL +}; + + +/* Return the string representation of the balance worker state */ +const char *uri_worker_map_get_source(uri_worker_record_t *uwr, jk_logger_t *l) +{ +return uri_worker_map_source_type[uwr->source_type]; +} + /* * Given context uri, count the number of path tokens. * @@ -79,7 +95,10 @@ /* given the same number of URI tokens, use character * length as a tie breaker */ -return ((int)e2->context_len - (int)e1->context_len); +if(e2->context_len != e1->context_len) +return ((int)e2->context_len - (int)e1->context_len); + +return ((int)e2->source_type - (int)e1->source_type); } static void worker_qsort(jk_uri_worker_map_t *uw_map) @@ -218,8 +237,41 @@ } +/* + * Delete all entries of a given source type + */ + +int uri_worker_map_clear(jk_uri_worker_map_t *uw_map, + unsigned int source_type, jk_logger_t *l) +{ +uri_worker_record_t *uwr = NULL; +unsigned int i; +unsigned int j; + +JK_TRACE_ENTER(l); + +/* Find if duplicate entry */ +for (i = 0; i < uw_map->size; i++) { +uwr = uw_map->maps[i]; +if (uwr->source_type == source_type) { +jk_log(l, JK_LOG_DEBUG, + "deleting map rule '%s=%s' source '%s'", + uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l)); +for (j = i; j < uw_map->size-1; j++) +uw_map->maps[j] = uw_map->maps[j+1]; +uw_map->size--; +} +} + +JK_TRACE_EXIT(l); +return JK_TRUE; +} + + + int uri_worker_map_add(jk_uri_worker_map_t *uw_map, - const char *puri, const char *worker, jk_logger_t *l) + const char *puri, const char *worker, + unsigned int source_type, jk_logger_t *l) { uri_work
svn commit: r478268 - in /tomcat/connectors/trunk/jk/native/common: jk_status.c jk_uri_worker_map.c jk_uri_worker_map.h
Author: rjung Date: Wed Nov 22 10:10:20 2006 New Revision: 478268 URL: http://svn.apache.org/viewvc?view=rev&rev=478268 Log: - Add unsigned int -> text function for match type. - Use this function in status worker. The previous one didn't correctly handle the possible combinations of bits in the match type. - Add the display of mapping rules to normal non-lb workers and to the global vie. - Drop the column context in the listing of the mapping rules, because since some time context is equal to uri. - Add column source type. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h 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=478268&r1=478267&r2=478268 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Nov 22 10:10:20 2006 @@ -218,32 +218,6 @@ return "True"; } -static const char *status_val_match(unsigned int match) -{ -if (match & MATCH_TYPE_DISABLED) -return "Disabled"; -else if (match & MATCH_TYPE_NO_MATCH) -return "Unmount"; -else if (match & MATCH_TYPE_EXACT) -return "Exact"; -else if (match & MATCH_TYPE_WILDCHAR_PATH) -return "Wildchar"; -/* deprecated -else if (match & MATCH_TYPE_STOPPED) -return "Stopped"; -else if (match & MATCH_TYPE_CONTEXT) -return "Context"; -else if (match & MATCH_TYPE_CONTEXT_PATH) -return "Context Path"; -else if (match & MATCH_TYPE_SUFFIX) -return "Suffix"; -else if (match & MATCH_TYPE_GENERAL_SUFFIX) -return "General Suffix"; - */ -else -return "Error"; -} - static void jk_puts(jk_ws_service_t *s, const char *str) { if (str) @@ -336,23 +310,24 @@ jk_uri_worker_map_t *uwmap, const char *worker, jk_logger_t *l) { +char buf[64]; unsigned int i; jk_puts(s, "Uri Mappings:\n"); jk_puts(s, "\nMatch TypeUri" - "Context\n"); + "Source\n"); for (i = 0; i < uwmap->size; i++) { uri_worker_record_t *uwr = uwmap->maps[i]; -if (strcmp(uwr->worker_name, worker)) { +if (worker && strcmp(uwr->worker_name, worker)) { continue; } jk_putv(s, "", -status_val_match(uwr->match_type), +uri_worker_map_get_match(uwr, buf, l), "", NULL); jk_puts(s, uwr->uri); -jk_putv(s, "", uwr->context, NULL); - -jk_puts(s, "\n"); +jk_putv(s, "", +uri_worker_map_get_source(uwr, l), +"\n", NULL); } jk_puts(s, "\n"); } @@ -361,17 +336,18 @@ jk_uri_worker_map_t *uwmap, const char *worker, jk_logger_t *l) { +char buf[64]; unsigned int i; for (i = 0; i < uwmap->size; i++) { uri_worker_record_t *uwr = uwmap->maps[i]; -if (strcmp(uwr->worker_name, worker)) { +if (worker && strcmp(uwr->worker_name, worker)) { continue; } -jk_printf(s, "\n", - status_val_match(uwr->match_type), - uwr->uri, - uwr->context) ; +jk_printf(s, "\n", + uri_worker_map_get_match(uwr, buf, l), + uwr->uri, + uri_worker_map_get_source(uwr, l)); } } @@ -589,7 +565,6 @@ "\n\n", NULL); jk_puts(s, "\n"); display_maps(s, sw, s->uw_map, dworker, l); - } } /* Display legend */ Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diff&rev=478268&r1=478267&r2=478268 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Wed Nov 22 10:10:20 2006 @@ -48,10 +48,45 @@ }; -/* Return the string representation of the balance worker state */ +/* Return the string representation of the uwr source */ const char *uri_worker_map_get_source(uri_
svn commit: r478282 - /tomcat/connectors/trunk/jk/xdocs/changelog.xml
Author: rjung Date: Wed Nov 22 10:51:42 2006 New Revision: 478282 URL: http://svn.apache.org/viewvc?view=rev&rev=478282 Log: Update changelog with my commits of the last 4 days. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diff&rev=478282&r1=478281&r2=478282 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Wed Nov 22 10:51:42 2006 @@ -27,6 +27,50 @@ + Status Worker: Add source type to status worker, remove the redundant "context" + column in the map listing (context=uri). (rjung) + + + uriworkermap: On reload of the file, all old entries from the previous file + version get deleted, before the new ones are being read. (rjung) + + + Keep normal maps and exclusion maps internally separate. Don't treat them + as the same when adding a rule. (rjung) + version get deleted, before the new ones are being read. (rjung) + + + Status Worker: Display mappng rules also for non-lb workers and in global view. (rjung) + + + Apache VHosts: Use the vhost log files instead of the main log. (rjung) + + + Apache VHosts: Allow individual timestamp formats by refactoring the formatting + method. (rjung) + + + Apache VHosts: Adding all missing config items to the virtual host level. + Don't overwrite the settings from the global server, but inherit them + in case they are not set in the virtual host. (rjung) + + + Apache: remove unnecessary function names from log messages. (rjung) + + + Apache: add a default log file location and a message, if the default gets used. (rjung) + + + Apache: add missing JK_IS_DEBUG_LEVEL() (rjung) + + + Apache VHosts: Allow JkWorkersFile, JKWorkerProperty, JkShmFile and JkShmFileSize + only in global virtual server. (rjung) + + + Add some more jk_close_socket() and reduce log level for some info messages. (rjung) + + Load Balancer: Added the Sessions strategy. Contributed by Takayuki Kaneko. (rjung) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478537 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/apache.xml howto/apache.xml style.xsl
Author: rjung Date: Thu Nov 23 03:30:34 2006 New Revision: 478537 URL: http://svn.apache.org/viewvc?view=rev&rev=478537 Log: Adding more precise info about the apache configuration directives, especially context information, default values and inheritance rules for vhosts. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/howto/apache.xml tomcat/connectors/trunk/jk/xdocs/style.xsl Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diff&rev=478537&r1=478536&r2=478537 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Thu Nov 23 03:30:34 2006 @@ -27,6 +27,10 @@ + Apache Docs: Adding requirements, context information, default values and + inheritance rules to the Apache config documentation. (rjung) + + Status Worker: Add source type to status worker, remove the redundant "context" column in the map listing (context=uri). (rjung) Modified: tomcat/connectors/trunk/jk/xdocs/config/apache.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/apache.xml?view=diff&rev=478537&r1=478536&r2=478537 == --- tomcat/connectors/trunk/jk/xdocs/config/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/apache.xml Thu Nov 23 03:30:34 2006 @@ -13,83 +13,197 @@ - + +Most of the directives are allowed once in the global part of the Apache httpd +configuration and once in every <VirtualHost> elements. Exceptions from this rule are +explicitely listed in the table below. + + +Values are inherited from the main server to the virtual hosts. +Since version 1.2.20 they can be overwritten in the virtual hosts. +Exceptions from this rule are +again explicitely listed in the table below. + Here are the all directives supported by Apache: -The name of a worker file for the Tomcat servlet containers +The name of a worker file for the Tomcat servlet containers. + +This directive is only allowed once. It must be put into + the global part of the configuration. + +If you don't use the JkWorkerProperty directives, then you must +define your workers with a valid JkWorkersFile. There is no default +value. -Enables setting workers.properties inside Apache configuration file. +Enables setting worker properties inside Apache configuration file. +The syntax is the same as in the JkWorkersFile (usually workers.properties). +Simply prefix each line with "JkWorkerProperty" to put it directly into +the Apache httpd config files. + +This directive is allowed multiple times. +It must be put into the global part of the configuration. + +If you don't use the JkWorkerProperty directives, then you must +define your workers with a valid JkWorkersFile. There is no default +value. + This directive is available in jk1.2.7 version and later. - -A mount point from a context to a Tomcat worker + +Shared memory file name. Used only on unix platforms. + +This directive is only allowed once. It must be put into + the global part of the configuration. + +The default value is logs/jk-runtime-status. + + +Size of the shared memory file name. + +This directive is only allowed once. It must be put into + the global part of the configuration. + +The default value depends on the platform. It is usually less than 64KB. -File containing multiple mappings from a context to a Tomcat worker +File containing multiple mappings from a context to a Tomcat worker. +It is usually called uriworkermap.properties. + +For inheritance rules, see: JkMountCopy. + +There is no default value. + + +A mount point from a context to a Tomcat worker. + +This directive is allowed multiple times. +It is allowed in the global configuration and in VirtualHost. +You can also use it inside Location with a different syntax. +Inside Location, one omits the first argument (path), +which gets inherited from the Location. +For inheritance rules, see: JkMountCopy. -A no mount point from a context to a Tomcat worker +An exclusion mount point from a context to a Tomcat worker. +All exclusion mounts are checked after mapping a request +to a tomcat worker. If the request maps also to an exclusion, +it will not be forwarded to tomcat, and instead be served locally. + +This directive is allowed multiple times. +It is allowed in the global configuration and in VirtualHost. +You can also use it inside Location with a different syntax. +Inside Location, one omits the first argument (path), +which gets inherited from the Location. +For inheritance rules, see: JkMountCopy. + This directive is available in jk
svn commit: r478544 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/changelog.xml
Author: rjung Date: Thu Nov 23 04:17:22 2006 New Revision: 478544 URL: http://svn.apache.org/viewvc?view=rev&rev=478544 Log: Apache vhost JkOptions +/- merging: +base - -base + +vhost - -vhost Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=478544&r1=478543&r2=478544 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Thu Nov 23 04:17:22 2006 @@ -161,6 +161,7 @@ * Jk Options */ int options; +int exclude_options; /* * Environment variables support @@ -1625,7 +1626,7 @@ conf->options &= ~mask; if (action == '-') { -conf->options &= ~opt; +conf->exclude_options |= opt; } else if (action == '+') { conf->options |= opt; @@ -2052,6 +2053,7 @@ c->format_string = NULL; c->format = NULL; c->mountcopy = JK_FALSE; +c->exclude_options = 0; if (s->is_virtual) { c->log_level = JK_UNSET; @@ -2153,7 +2155,7 @@ if (!overrides->secret_key) overrides->secret_key = base->secret_key; -overrides->options |= base->options; +overrides->options |= (base->options & ~base->exclude_options); if (base->envvars_in_use) { overrides->envvars_in_use = JK_TRUE; @@ -2335,6 +2337,7 @@ ap_log_error(APLOG_MARK, APLOG_ERR, srv, "JkRequestLogFormat format array NULL"); } +sconf->options &= ~sconf->exclude_options; } } Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=478544&r1=478543&r2=478544 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Thu Nov 23 04:17:22 2006 @@ -195,6 +195,7 @@ * Jk Options */ int options; +int exclude_options; /* * Environment variables support @@ -1653,7 +1654,7 @@ conf->options &= ~mask; if (action == '-') { -conf->options &= ~opt; +conf->exclude_options |= opt; } else if (action == '+') { conf->options |= opt; @@ -2172,6 +2173,7 @@ c->format_string = NULL; c->format = NULL; c->mountcopy = JK_FALSE; +c->exclude_options = 0; c->was_initialized = JK_FALSE; if (s->is_virtual) { @@ -2280,7 +2282,7 @@ if (!overrides->secret_key) overrides->secret_key = base->secret_key; -overrides->options |= base->options; +overrides->options |= (base->options & ~base->exclude_options); if (base->envvars_in_use) { overrides->envvars_in_use = JK_TRUE; @@ -2614,6 +2616,7 @@ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "JkRequestLogFormat format array NULL"); } +sconf->options &= ~sconf->exclude_options; } } init_jk(pconf, conf, s); Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diff&rev=478544&r1=478543&r2=478544 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Thu Nov 23 04:17:22 2006 @@ -27,6 +27,9 @@ + Apache VHosts: Merge JkOptions +base - -base + +vhost - -vhost. (rjung) + + Apache Docs: Adding requirements, context information, default values and inheritance rules to the Apache config documentation. (rjung) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478710 - /tomcat/connectors/trunk/jk/native/common/jk_util.c
Author: rjung Date: Thu Nov 23 15:24:16 2006 New Revision: 478710 URL: http://svn.apache.org/viewvc?view=rev&rev=478710 Log: Initialize new log_fmt to NULL for non-Apache. If it is NULL, the old default format will be used. Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=478710&r1=478709&r2=478710 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Thu Nov 23 15:24:16 2006 @@ -322,6 +322,7 @@ if (rc && p) { rc->log = log_to_file; rc->level = level; +rc->log_fmt = NULL; rc->logger_private = p; #ifdef AS400 p->logfile = fopen(file, "a+, o_ccsid=0"); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478735 - /tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
Author: rjung Date: Thu Nov 23 17:08:48 2006 New Revision: 478735 URL: http://svn.apache.org/viewvc?view=rev&rev=478735 Log: Changing new but misleading log message. Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diff&rev=478735&r1=478734&r2=478735 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Thu Nov 23 17:08:48 2006 @@ -648,7 +648,7 @@ int i; if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, - "Reloading urimaps from %s", uw_map->fname); + "Loading urimaps from %s", uw_map->fname); uri_worker_map_clear(uw_map, SOURCE_TYPE_URIMAP, l); for (i = 0; i < jk_map_size(map); i++) { const char *u = jk_map_name_at(map, i); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478736 - /tomcat/connectors/trunk/jk/native/common/jk_worker.c
Author: rjung Date: Thu Nov 23 17:10:18 2006 New Revision: 478736 URL: http://svn.apache.org/viewvc?view=rev&rev=478736 Log: Adding a little validation for maintain_time, like we use it for all other timing configurations. Modified: tomcat/connectors/trunk/jk/native/common/jk_worker.c Modified: tomcat/connectors/trunk/jk/native/common/jk_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_worker.c?view=diff&rev=478736&r1=478735&r2=478736 == --- tomcat/connectors/trunk/jk/native/common/jk_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_worker.c Thu Nov 23 17:10:18 2006 @@ -71,6 +71,8 @@ } worker_maintain_time = jk_get_worker_maintain_time(init_data); +if(worker_maintain_time < 0) +worker_maintain_time = 0; if (!build_worker_map(init_data, we->worker_list, we->num_of_workers, we, l)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478739 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Thu Nov 23 17:31:42 2006 New Revision: 478739 URL: http://svn.apache.org/viewvc?view=rev&rev=478739 Log: Part 1 of the big jk_status overhaul: Minor and local changes. 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=478739&r1=478738&r2=478739 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Thu Nov 23 17:31:42 2006 @@ -50,7 +50,7 @@ #define JK_STATUS_XMLE "\n" -#define JK_STATUS_TEXTUPDATE_RESPONCE "OK - jk status worker updated\n" +#define JK_STATUS_TEXTUPDATE_RESPONSE "OK - jk status worker updated\n" typedef struct status_worker status_worker_t; @@ -292,33 +292,38 @@ return rv; } -static int status_bool(const char *param, const char *req) +static int status_bool(const char *param, const char *req, int def) { const char *v; char buf[32]; -int rv = 0; +int rv = def; if ((v = status_cmd(param, req, buf, sizeof(buf { if (strcasecmp(v, "on") == 0 || -strcasecmp(v, "true") == 0) +strcasecmp(v, "true") == 0 || +strcasecmp(v, "1") == 0) rv = 1; +else if (strcasecmp(v, "off") == 0 || +strcasecmp(v, "false") == 0 || +strcasecmp(v, "0") == 0) +rv = 0; } return rv; } -static void display_maps(jk_ws_service_t *s, status_worker_t *sw, +static void display_maps(jk_ws_service_t *s, jk_uri_worker_map_t *uwmap, const char *worker, jk_logger_t *l) { char buf[64]; unsigned int i; -jk_puts(s, "Uri Mappings:\n"); +jk_putv(s, "URI Mappings for ", worker, "\n", NULL); jk_puts(s, "\nMatch TypeUri" "Source\n"); for (i = 0; i < uwmap->size; i++) { uri_worker_record_t *uwr = uwmap->maps[i]; -if (worker && strcmp(uwr->worker_name, worker)) { +if (!worker || strcmp(uwr->worker_name, worker)) { continue; } jk_putv(s, "", @@ -332,7 +337,7 @@ jk_puts(s, "\n"); } -static void dump_maps(jk_ws_service_t *s, status_worker_t *sw, +static void dump_maps(jk_ws_service_t *s, jk_uri_worker_map_t *uwmap, const char *worker, jk_logger_t *l) { @@ -341,7 +346,7 @@ for (i = 0; i < uwmap->size; i++) { uri_worker_record_t *uwr = uwmap->maps[i]; -if (worker && strcmp(uwr->worker_name, worker)) { +if (!worker || strcmp(uwr->worker_name, worker)) { continue; } jk_printf(s, "\n", @@ -551,7 +556,7 @@ jk_puts(s, "/>\n"); jk_puts(s, "\n"); -display_maps(s, sw, s->uw_map, dworker, l); +display_maps(s, s->uw_map, dworker, l); jk_puts(s, "\n"); } } @@ -564,7 +569,7 @@ jk_putv(s, "", jk_dump_hinfo(&aw->worker_inet_addr, buf), "\n\n", NULL); jk_puts(s, "\n"); -display_maps(s, sw, s->uw_map, dworker, l); +display_maps(s, s->uw_map, dworker, l); } } /* Display legend */ @@ -672,7 +677,7 @@ jk_printf(s, " domain=\"%s\"", wr->s->domain); jk_puts(s, " />\n"); } -dump_maps(s, sw, s->uw_map, lb->s->name, l); +dump_maps(s, s->uw_map, lb->s->name, l); jk_puts(s, " \n"); } @@ -699,8 +704,8 @@ if (i < 1) i = 1; lb->s->recover_wait_time = i; -lb->s->sticky_session = status_bool("ls", s->query_string); -lb->s->sticky_session_force = status_bool("lf", s->query_string); +lb->s->sticky_session = status_bool("ls", s->query_string, lb->s->sticky_session); +lb->s->sticky_session_force = status_bool("lf", s->query_string, lb->s->sticky_session_force); } else { int n = status_int("lb", s->query_string, -1); @@ -778,11 +783,15 @@ for (i = 0; i < lb->num_of_workers; i++) { worker_record_t *wr = &(lb->lb_workers[i]); wr->s->busy = 0; +wr->s->client_errors= 0;
svn commit: r478746 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h jk_shm.h jk_status.c
Author: rjung Date: Thu Nov 23 18:13:59 2006 New Revision: 478746 URL: http://svn.apache.org/viewvc?view=rev&rev=478746 Log: Adding locking strategy and balancing method as manageable to the status worker. Since the shm worker gets longer and longer, and since it contains quite a few members, which are read mostly, I started to keep copies of the read mostly members which belong to the lb in the lb worker. A sequence number indicated, if the local copies have to be updated from shm. 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_shm.h tomcat/connectors/trunk/jk/native/common/jk_status.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=478746&r1=478745&r2=478746 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Thu Nov 23 18:13:59 2006 @@ -166,6 +166,33 @@ p->lb_workers[i].s->lb_value = 0; } } +JK_TRACE_EXIT(l); +} + +/* Syncing config values from shm */ +void jk_lb_pull(lb_worker_t * p, jk_logger_t *l) { +JK_TRACE_ENTER(l); +p->sticky_session = p->s->sticky_session; +p->sticky_session_force = p->s->sticky_session_force; +p->recover_wait_time = p->s->recover_wait_time; +p->retries = p->s->retries; +p->lbmethod = p->s->lbmethod; +p->lblock = p->s->lblock; +p->sequence = p->s->sequence; +JK_TRACE_EXIT(l); +} + +/* Syncing config values from shm */ +void jk_lb_push(lb_worker_t * p, jk_logger_t *l) { +JK_TRACE_ENTER(l); +p->s->sticky_session = p->sticky_session; +p->s->sticky_session_force = p->sticky_session_force; +p->s->recover_wait_time = p->recover_wait_time; +p->s->retries = p->retries; +p->s->lbmethod = p->lbmethod; +p->s->lblock = p->lblock; +p->s->sequence = p->sequence; +JK_TRACE_EXIT(l); } /* Retrieve the parameter with the given name*/ @@ -541,7 +568,7 @@ * balancer. Of course you will need a some kind of * session replication between those two remote. */ -if (p->s->sticky_session_force) +if (p->sticky_session_force) candidate = NULL; else if (*candidate->s->redirect) candidate = find_by_session(p, candidate->s->redirect, l); @@ -665,7 +692,7 @@ sessionid = next; rc = NULL; } -if (!rc && p->s->sticky_session_force) { +if (!rc && p->sticky_session_force) { if (p->lblock == JK_LB_LOCK_PESSIMISTIC) jk_shm_unlock(); else { @@ -727,7 +754,13 @@ jk_b_set_buffer_size(s->reco_buf, p->worker->max_packet_size); jk_b_reset(s->reco_buf); s->reco_status = RECO_INITED; -if (p->worker->s->sticky_session) { + +jk_shm_lock(); +if (p->worker->sequence != p->worker->s->sequence) +jk_lb_pull(p->worker, l); +jk_shm_unlock(); + +if (p->worker->sticky_session) { /* Use sessionid only if sticky_session is * defined for this load balancer */ @@ -736,7 +769,7 @@ if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, "service sticky_session=%d id='%s'", - p->worker->s->sticky_session, sessionid ? sessionid : "empty"); + p->worker->sticky_session, sessionid ? sessionid : "empty"); while (attempt <= num_of_workers && rc == -1) { worker_record_t *rec = @@ -798,6 +831,8 @@ if (p->worker->s->busy > p->worker->s->max_busy) p->worker->s->max_busy = p->worker->s->busy; rec->s->busy++; +if (rec->s->busy > rec->s->max_busy) +rec->s->max_busy = rec->s->busy; if (p->worker->lbmethod == JK_LB_METHOD_REQUESTS) rec->s->lb_value += rec->s->lb_mult; else if (p->worker->lbmethod == JK_LB_METHOD_SESSIONS && @@ -805,8 +840,6 @@ rec->s->lb_value += rec->s->lb_mult; else if (p->worker->lbmethod == JK_LB_METHOD_BUSYNESS) rec->s->lb_value += rec->s->lb_mult; -if (rec->s->busy > rec->
svn commit: r478749 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Thu Nov 23 18:26:05 2006 New Revision: 478749 URL: http://svn.apache.org/viewvc?view=rev&rev=478749 Log: Major jk status additions for the html mime type: - two views for showing things: list=full list like we already had, show=only one worker - edit for the configuration form - update and reset like we already had, but reset optionally also only for a single lb member - edit/update/reset remember, if you came from list or from show and return there after commit - edit/update/reset remember refresh rate and activate it again after commit - more argument validations - a few error messages 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=478749&r1=478748&r2=478749 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Thu Nov 23 18:26:05 2006 @@ -357,263 +357,303 @@ } -/** - * Command line reference: - * cmd=list (default) display configuration - * cmd=show display detailed configuration - * cmd=update update configuration - * cmd=add add new uri map. - * w=worker display detailed configuration for worker - * - * Worker parameters: - * r=string redirect route name - * - */ - - -static void display_workers(jk_ws_service_t *s, status_worker_t *sw, -const char *dworker, jk_logger_t *l) +static int display_worker(jk_ws_service_t *s, jk_worker_t *w, + int refresh, int single, + jk_logger_t *l) { -unsigned int i; char buf[32]; -time_t now = time(NULL); +const char *name = NULL; +const char *from = NULL; +ajp_worker_t *aw = NULL; +lb_worker_t *lb = NULL; -for (i = 0; i < sw->we->num_of_workers; i++) { -jk_worker_t *w = wc_get_worker_for_name(sw->we->worker_list[i], l); -ajp_worker_t *aw = NULL; -lb_worker_t *lb = NULL; -if (w == NULL) -continue; -if (w->type == JK_LB_WORKER_TYPE) { -lb = (lb_worker_t *)w->worker_private; -} -else if (w->type == JK_AJP13_WORKER_TYPE || - w->type == JK_AJP14_WORKER_TYPE) { -aw = (ajp_worker_t *)w->worker_private; -} -else { -/* Skip status, jni and ajp12 worker */ -continue; -} -jk_puts(s, "\nWorker Status for "); -if (dworker && strcmp(dworker, sw->we->worker_list[i]) == 0) { -/* Next click will colapse the editor */ -jk_putv(s, "req_uri, "?cmd=show\">", NULL); -} -else -jk_putv(s, "req_uri, "?cmd=show&w=", -sw->we->worker_list[i], "\">", NULL); -jk_putv(s, sw->we->worker_list[i], "\n", NULL); -if (lb != NULL) { -unsigned int j; -int selected = -1; - -jk_shm_lock(); -if (lb->sequence != lb->s->sequence) -jk_lb_pull(lb, l); -jk_shm_unlock(); - -jk_puts(s, "" -"TypeSticky session" -"Force Sticky session" -"Retries" -"Method" -"Lock" -"Recovery timeout" -"\n"); -jk_putv(s, "", status_worker_type(w->type), "", NULL); -jk_putv(s, "", status_val_bool(lb->sticky_session), +if (w->type == JK_LB_WORKER_TYPE) { +lb = (lb_worker_t *)w->worker_private; +} +else if (w->type == JK_AJP13_WORKER_TYPE || + w->type == JK_AJP14_WORKER_TYPE) { +aw = (ajp_worker_t *)w->worker_private; +} +if (single) { +from = "show"; +jk_putv(s, "\nreq_uri, "?cmd=list\">Back to full worker list\n", NULL); +} +else{ +from = "list"; +} + +if (lb != NULL) { +time_t now = time(NULL); +unsigned int j; + +jk_shm_lock(); +if (lb->sequence != lb->s->sequence) +jk_lb_pull(lb, l); +jk_shm_unlock(); + +name = lb->s->name; +jk_puts(s, "["); +if (single) { +jk_puts(s, "S"); +} +else{ +jk_printf(s, "S", + s->req_uri, name, refresh); +} +jk_puts(s, "|"); +jk_printf(s, "E", + s-
svn commit: r478750 - /tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
Author: rjung Date: Thu Nov 23 18:36:15 2006 New Revision: 478750 URL: http://svn.apache.org/viewvc?view=rev&rev=478750 Log: Remove unused variable. Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diff&rev=478750&r1=478749&r2=478750 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Thu Nov 23 18:36:15 2006 @@ -311,7 +311,6 @@ uri_worker_record_t *uwr = NULL; char *uri; unsigned int match_type = 0; -unsigned int i; JK_TRACE_ENTER(l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478751 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Thu Nov 23 18:39:09 2006 New Revision: 478751 URL: http://svn.apache.org/viewvc?view=rev&rev=478751 Log: Fix two compiler warnings. 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=478751&r1=478750&r2=478751 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Thu Nov 23 18:39:09 2006 @@ -357,7 +357,7 @@ } -static int display_worker(jk_ws_service_t *s, jk_worker_t *w, +static void display_worker(jk_ws_service_t *s, jk_worker_t *w, int refresh, int single, jk_logger_t *l) { @@ -1088,7 +1088,7 @@ char *err = NULL; int cmd; int mime; -int refresh; +int refresh = -1; status_endpoint_t *p; JK_TRACE_ENTER(l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479235 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sat Nov 25 15:44:40 2006 New Revision: 479235 URL: http://svn.apache.org/viewvc?view=rev&rev=479235 Log: - partially undo r476817: if there exist connections, but all of them are broken, reconnect only during the next retry. If retries=1 in configuration, this allows immediate failover in the lb. - remove a tab Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diff&rev=479235&r1=479234&r2=479235 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sat Nov 25 15:44:40 2006 @@ -1230,11 +1230,13 @@ jk_log(l, JK_LOG_INFO, "(%s) increase the backend idle connection timeout or the connection_pool_minsize", ae->worker->name); +JK_TRACE_EXIT(l); +return JK_FALSE; } /* Connect to the backend. * This can be either uninitalized connection or a reconnect. */ -if (ajp_connect_to_endpoint(ae, l) == JK_TRUE) { +if (ajp_connect_to_endpoint(ae, l) == JK_TRUE) { /* * After we are connected, each error that we are going to * have is probably unrecoverable - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479311 - /tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c
Author: rjung Date: Sun Nov 26 00:52:44 2006 New Revision: 479311 URL: http://svn.apache.org/viewvc?view=rev&rev=479311 Log: Untabify. Modified: tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c Modified: tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c?view=diff&rev=479311&r1=479310&r2=479311 == --- tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c (original) +++ tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c Sun Nov 26 00:52:44 2006 @@ -1001,8 +1001,8 @@ memset(&processInformation, 0, sizeof(processInformation)); - if( cmdLine==NULL ) - cmdLine=data.cmd_line; +if( cmdLine==NULL ) +cmdLine=data.cmd_line; printf(cmdLine); if(CreateProcess(data.java_bin, @@ -1024,7 +1024,7 @@ shutdown_port = data.shutdown_port; shutdown_secret = data.shutdown_secret; shutdown_protocol = strdup(data.shutdown_protocol); - shutdown_cmd = strdup(data.stop_cmd); +shutdown_cmd = strdup(data.stop_cmd); return JK_TRUE; } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479312 - /tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c
Author: rjung Date: Sun Nov 26 00:54:36 2006 New Revision: 479312 URL: http://svn.apache.org/viewvc?view=rev&rev=479312 Log: Untabify Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c?view=diff&rev=479312&r1=479311&r2=479312 == --- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Sun Nov 26 00:54:36 2006 @@ -300,8 +300,8 @@ jk_close_file_logger(&logger); } - if (init_map) { -jk_map_free(&init_map); +if (init_map) { +jk_map_free(&init_map); } } @@ -413,7 +413,7 @@ s->headers_names = NULL; s->headers_values = NULL; s->num_headers = 0; - s->uw_map = uw_map; +s->uw_map = uw_map; #ifdef NETWARE /* on NetWare, we can have virtual servers that are secure. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479313 - in /tomcat/connectors/trunk/jk/native/common: jk_util.c jk_util.h
Author: rjung Date: Sun Nov 26 00:59:48 2006 New Revision: 479313 URL: http://svn.apache.org/viewvc?view=rev&rev=479313 Log: - Remove unused function declaration - Add new config options, used for the status worker: - css (this one existed before, but was configured using the general property mechanism) - read_only (inhibits changing configs via status worker) - user (list of users allowed to use status worker, in case our web server doesn't have pretty auth features, maybe interesting when used with IIS) Caution: these are only the config functions. Implementing the features read_only and user follows in a later commit. Modified: 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_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=479313&r1=479312&r2=479313 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Nov 26 00:59:48 2006 @@ -76,7 +76,9 @@ #define ACTIVATION_OF_WORKER("activation") #define WORKER_RECOVER_TIME ("recover_time") #define WORKER_MAX_PACKET_SIZE ("max_packet_size") - +#define STYLE_SHEET_OF_WORKER ("css") +#define READ_ONLY_OF_WORKER ("read_only") +#define USER_OF_WORKER ("user") #define DEFAULT_WORKER_TYPE JK_AJP13_WORKER_NAME #define SECRET_KEY_OF_WORKER("secretkey") @@ -123,6 +125,7 @@ static const char *list_properties[] = { BALANCE_WORKERS, MOUNT_OF_WORKER, +USER_OF_WORKER, "list", NULL }; @@ -158,6 +161,8 @@ ACTIVATION_OF_WORKER, WORKER_RECOVER_TIME, WORKER_MAX_PACKET_SIZE, +STYLE_SHEET_OF_WORKER, +READ_ONLY_OF_WORKER, RETRIES_OF_WORKER, WORKER_MAINTAIN_PROPERTY_NAME, NULL @@ -972,6 +977,55 @@ sz = 64*1024; return sz; +} + +const char *jk_get_worker_style_sheet(jk_map_t *m, const char *wname, const char *def) +{ +char buf[1024]; + +if (!m || !wname) { +return NULL; +} + +MAKE_WORKER_PARAM(STYLE_SHEET_OF_WORKER); + +return jk_map_get_string(m, buf, def); +} + +int jk_get_is_read_only(jk_map_t *m, const char *wname) +{ +int rc = JK_FALSE; +char buf[1024]; +if (m && wname) { +int value; +MAKE_WORKER_PARAM(READ_ONLY_OF_WORKER); +value = jk_map_get_bool(m, buf, 0); +if (value) +rc = JK_TRUE; +} +return rc; +} + +int jk_get_worker_user_list(jk_map_t *m, +const char *wname, +char ***list, unsigned int *num_of_users) +{ +char buf[1024]; + +if (m && list && num_of_users && wname) { +char **ar = NULL; + +MAKE_WORKER_PARAM(USER_OF_WORKER); +ar = jk_map_get_string_list(m, buf, num_of_users, NULL); +if (ar) { +*list = ar; +return JK_TRUE; +} +*list = NULL; +*num_of_users = 0; +} + +return JK_FALSE; } int jk_get_lb_worker_list(jk_map_t *m, Modified: tomcat/connectors/trunk/jk/native/common/jk_util.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.h?view=diff&rev=479313&r1=479312&r2=479313 == --- tomcat/connectors/trunk/jk/native/common/jk_util.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.h Sun Nov 26 00:59:48 2006 @@ -98,8 +98,6 @@ int jk_get_worker_activation(jk_map_t *m, const char *wname); -void jk_set_log_format(const char *logformat); - int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_wokers); int jk_get_lb_factor(jk_map_t *m, const char *wname); @@ -170,6 +168,14 @@ int jk_get_worker_maintain_time(jk_map_t *m); int jk_get_max_packet_size(jk_map_t *m, const char *wname); + +const char *jk_get_worker_style_sheet(jk_map_t *m, const char *wname, const char *def); + +int jk_get_is_read_only(jk_map_t *m, const char *wname); + +int jk_get_worker_user_list(jk_map_t *m, +const char *wname, +char ***list, unsigned int *num_of_users); #define TC32_BRIDGE_TYPE32 #define TC33_BRIDGE_TYPE33 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479314 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h
Author: rjung Date: Sun Nov 26 01:04:47 2006 New Revision: 479314 URL: http://svn.apache.org/viewvc?view=rev&rev=479314 Log: - Adding a new constant, used later in the status worker. - Adding two new useful debug messages. - removed trailing white space. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h 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=479314&r1=479313&r2=479314 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sun Nov 26 01:04:47 2006 @@ -172,6 +172,10 @@ /* Syncing config values from shm */ void jk_lb_pull(lb_worker_t * p, jk_logger_t *l) { JK_TRACE_ENTER(l); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + "syncing mem for lb '%s' from shm", + p->s->name); p->sticky_session = p->s->sticky_session; p->sticky_session_force = p->s->sticky_session_force; p->recover_wait_time = p->s->recover_wait_time; @@ -185,6 +189,10 @@ /* Syncing config values from shm */ void jk_lb_push(lb_worker_t * p, jk_logger_t *l) { JK_TRACE_ENTER(l); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + "syncing shm for lb '%s' from mem", + p->s->name); p->s->sticky_session = p->sticky_session; p->s->sticky_session_force = p->sticky_session_force; p->s->recover_wait_time = p->recover_wait_time; @@ -441,7 +449,7 @@ JK_LB_DECAY_MULT * delta / lb->maintain_time); curmax = decay_load(lb, JK_LB_DECAY_MULT * delta / lb->maintain_time, l); if (!recover_workers(lb, curmax, now, l)) { -force_recovery(lb, l); +force_recovery(lb, l); } } @@ -1018,7 +1026,7 @@ else { /* No workers in error state. * Somebody set them all to disabled? - */ + */ jk_log(l, JK_LOG_ERROR, "All tomcat instances failed, no more workers left for recovery"); *is_error = JK_HTTP_SERVER_BUSY; @@ -1176,7 +1184,7 @@ p->lb_workers[i].s->lb_value = 0; p->lb_workers[i].s->state = JK_LB_STATE_NA; p->lb_workers[i].s->error_time = 0; -p->lb_workers[i].s->activation = +p->lb_workers[i].s->activation = jk_get_worker_activation(props, worker_names[i]); if (!wc_create_worker(p->lb_workers[i].s->name, 0, props, @@ -1206,7 +1214,7 @@ if (id_domain) { *id_domain = '\0'; strcpy(p->lb_workers[i].s->domain, p->lb_workers[i].s->jvm_route); -*id_domain = '.'; +*id_domain = '.'; } } if (JK_IS_DEBUG_LEVEL(l)) { 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=479314&r1=479313&r2=479314 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Sun Nov 26 01:04:47 2006 @@ -70,6 +70,7 @@ #define JK_LB_ACTIVATION_ACTIVE(1) #define JK_LB_ACTIVATION_DISABLED (2) #define JK_LB_ACTIVATION_STOPPED (3) +#define JK_LB_ACTIVATION_MAX (JK_LB_ACTIVATION_STOPPED) #define JK_LB_ACTIVATION_TEXT_ACTIVE ("ACT") #define JK_LB_ACTIVATION_TEXT_DISABLED ("DIS") #define JK_LB_ACTIVATION_TEXT_STOPPED ("STP") - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479316 [1/2] - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Nov 26 01:17:17 2006 New Revision: 479316 URL: http://svn.apache.org/viewvc?view=rev&rev=479316 Log: The big status worker update: 1) Added our standard TRACE messages 2) Added a couple of debug, info and warn log messages 3) Added constants for attribute names and values 4) Added Some constants for attribute clear text names 5) Make xml and txt mime type functional for list, show, update and reset. 6) Implement the new read_only feature, that disabled edit/update/reset. You can have e.g. two status worker mapped to different URLs, one of them read/write (default) and the other read only. 7) Implement the new "user" attribute. It is a list of users the Status worker checks against the remote_user field. The authentication process itself has do be done by the web server. Empty list = access to unauthenticated users. 8) Additional lb overview fields: good/degraded/bad - bad = in error or in recovering or stopped - degraded = not bad but disabled or busy - good = neither bad nor degraded (active and OK or N/A) 9) global lb edit per attribute: additional edit view for lb, where one can add one attribute for all members on a common page, e.g. the activation or the lb factor etc. 10) Some new utility functions (e.g. to write a self referring uri) 11) Quite some refactoring. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479318 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/workers.xml
Author: rjung Date: Sun Nov 26 01:40:50 2006 New Revision: 479318 URL: http://svn.apache.org/viewvc?view=rev&rev=479318 Log: Adding read_only and user as status worker attributes to the docs. Update for the changelog, all items concerning the status worker. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diff&rev=479318&r1=479317&r2=479318 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Nov 26 01:40:50 2006 @@ -26,6 +26,34 @@ + + Status Worker: All functions accessible also for xml and txt + mime types (list, show, update, reset). (rjung) + + + Status Worker: New global health indicators for load balancers + named bad (error, recovering or stopped), degraded (busy or disabled) + and good (the rest, active and OK or N/A). (rjung) + + + Status Worker: New edit page, to change one attribute for all + members of a load balancer. (rjung) + + + Status Worker: Standard logging for status worker. (rjung) + + + Status Worker: code refactoring. (rjung) + + + Status Worker: New attribute user (list) denies access, if + the request user in the sense of remote_user is not in this list. + Empty list = no deny (rjung) + + + Status Worker: New attribute read_only disables the parts + of the status worker, that change states and configurations. (rjung) + 36121: Don't change main uri when mod_jk serves included uri. (markt) Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?view=diff&rev=479318&r1=479317&r2=479318 == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Sun Nov 26 01:40:50 2006 @@ -372,6 +372,17 @@ Specifies the url for cascading stylesheet to use. + +A status worker with read_only=True will not allow any operations, +that change the runtime state or configuration of the other workers. +These are edit/update/reset. + + +This directive can be used mutltiple times. It is a list of users +which gets compared to the user name authenticated by the web server. +If the name is not contained in this list, access is denied. Per +default the list is empty and then access is allowed to anybody. + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479327 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Nov 26 02:05:38 2006 New Revision: 479327 URL: http://svn.apache.org/viewvc?view=rev&rev=479327 Log: Fix a couple of compile time warnings (unused vars and int/unsigned int conversion) 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=479327&r1=479326&r2=479327 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Nov 26 02:05:38 2006 @@ -1911,7 +1911,6 @@ const char *worker, const char *sub_worker, int refresh, jk_logger_t *l) { -unsigned int i; jk_worker_t *w = NULL; JK_TRACE_ENTER(l); @@ -1944,7 +1943,6 @@ const char *worker, const char *sub_worker, jk_logger_t *l) { -unsigned int i; jk_worker_t *w = NULL; JK_TRACE_ENTER(l); @@ -1975,7 +1973,6 @@ const char *worker, const char *sub_worker, jk_logger_t *l) { -unsigned int i; jk_worker_t *w = NULL; JK_TRACE_ENTER(l); @@ -2270,7 +2267,7 @@ if (w->num_of_users) { if (s->remote_user) { -unsigned int i; +int i; denied = 1; for (i = 0; i < w->num_of_users; i++) { if (!strcmp(s->remote_user, w->user_names[i])) { @@ -2602,7 +2599,7 @@ JK_TRACE_ENTER(log); if (pThis && pThis->worker_private) { status_worker_t *p = pThis->worker_private; -unsigned int i; +int i; p->we = we; p->css = jk_get_worker_style_sheet(props, p->name, NULL); p->read_only = jk_get_is_read_only(props, p->name); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479328 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Nov 26 02:15:13 2006 New Revision: 479328 URL: http://svn.apache.org/viewvc?view=rev&rev=479328 Log: Another compiler, another warning. Fixed it. 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=479328&r1=479327&r2=479328 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Nov 26 02:15:13 2006 @@ -379,7 +379,7 @@ { if (status_get_arg_raw(param, req, buf, len)) { char *off = buf; -while (off=strpbrk(off, JK_STATUS_ESC_CHARS)) +while ((off = strpbrk(off, JK_STATUS_ESC_CHARS))) off[0] = '@'; return buf; } @@ -1373,7 +1373,6 @@ for (i = 0; i < lb->num_of_workers; i++) { worker_record_t *wr = &(lb->lb_workers[i]); -ajp_worker_t *a = (ajp_worker_t *)wr->w->worker_private; jk_putv(s, "", wr->s->name, "\n", NULL); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479376 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/workers.xml
Author: rjung Date: Sun Nov 26 08:34:38 2006 New Revision: 479376 URL: http://svn.apache.org/viewvc?view=rev&rev=479376 Log: Adding max_packet_size to docs. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diff&rev=479376&r1=479375&r2=479376 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Nov 26 08:34:38 2006 @@ -27,6 +27,10 @@ + Docs: Added short description of max_packet_size to worker + reference. (rjung) + + Status Worker: All functions accessible also for xml and txt mime types (list, show, update, reset). (rjung) Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?view=diff&rev=479376&r1=479375&r2=479376 == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Sun Nov 26 08:34:38 2006 @@ -376,12 +376,18 @@ A status worker with read_only=True will not allow any operations, that change the runtime state or configuration of the other workers. These are edit/update/reset. + +This feature has been added in jk 1.2.20. + This directive can be used mutltiple times. It is a list of users which gets compared to the user name authenticated by the web server. If the name is not contained in this list, access is denied. Per default the list is empty and then access is allowed to anybody. + +This feature has been added in jk 1.2.20. + @@ -443,6 +449,22 @@ + +This attribute sets the maximal AJP packet size in Bytes. +The maximum value is 65536. If you change it from the default, +you must also change the packetSize attribute of your AJP +connector on the tomcat side! The attribute packetSize is only available +in Tomcat 5.5.20+ and 6.0.2+. + +Normally it is not necessary to change the maximum packet size. Problems +with the default value have been reported when sending certificates or +certificate chains. + + +This feature has been added in jk 1.2.19. + + + Only used for a member worker of a load balancer. @@ -556,6 +578,7 @@ This feature has been added in jk 1.2.16. +The automatic domain rule has been added in jk 1.2.20. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479378 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/project.xml config/uriworkermap.xml project.xml
Author: rjung Date: Sun Nov 26 08:36:47 2006 New Revision: 479378 URL: http://svn.apache.org/viewvc?view=rev&rev=479378 Log: New doc page for uriworkermap. Added: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml (with props) Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diff&rev=479378&r1=479377&r2=479378 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Nov 26 08:36:47 2006 @@ -27,6 +27,9 @@ + Docs: New page with description of uriworkermap. (rjung) + + Docs: Added short description of max_packet_size to worker reference. (rjung) Modified: tomcat/connectors/trunk/jk/xdocs/config/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/project.xml?view=diff&rev=479378&r1=479377&r2=479378 == --- tomcat/connectors/trunk/jk/xdocs/config/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/project.xml Sun Nov 26 08:36:47 2006 @@ -14,6 +14,7 @@ + Added: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml?view=auto&rev=479378 == --- tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml (added) +++ tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Sun Nov 26 08:36:47 2006 @@ -0,0 +1,247 @@ + + +]> + + +&project; + + +Rainer Jung +uriworkermap.properties configuration + + + + + + + +The forwarding of requests from the web server to tomcat gets configured by defining mapping rules. +Such a rule maps requests to workers. The request part of the map is described by a URI pattern, +the worker by it's worker name. + + +The so-called uriworkermap file is a mechanism of defining rules, +which works for all web servers. There exist also other web server specific configuration +options for defining rules, which will be mostly discussed on the reference pages for +configuring tomcat connectors for the individual web servers. + + +The name of the file is usually uriworkermap.properties, +although this is configurable in the web server. +Please consult the web server specific documentation pages on +how to enable the uriworkermap file. + + +The main features supported by the uriworkermap file are + + +Exact and wildchar matches, shortcuts to map a directory and all including content. + + +Exclusion rules, disabling of rules an defined preferences behaviour. + + +Virtual host integration: uri mapping rules can be expressed per virtual host. +The details are web server specific though. + + +Dynamic reloading: The file gets checked every 60 seconds for changes. +New versions are automatically reloaded without web server restarts. + + +Integration with the status worker. + + +Support for comments in the rule file. + + +The following sections describe these aspects in more detail. + + + + + + + + +The file has a line based format. There are no continuation characters, +so each rule needs to be defined on a single line. Each rule is a pair consisting +of a URI pattern and a worker name, combined by an equals sign '=': + + /myapp=myworker + +The URI pattern is case sensitive. + + + + + +All text after and including the character '#' gets ignored and can be used for comments. +Leading and trailing white space gets trimmed around the URI pattern and also around the worker name. +The following definitions are all equivalent: + + # This is a white space example + /myapp=myworker + /myapp=myworker + /myapp = myworker + + + + + + + +Inside the URI pattern three special characters can be used, '*', '?' and '|'. +The character '*' is a wildchar that matches any number of arbitrary characters +in the URI, '?' matches exactly one character. +Each URI pattern has to start with the character '/', or with '*' or with '?', +optionally prefixed by any combination of the modifiers '!' and '-' (see next section). + + # Mapping the URI /myapp1 and everything under /myapp1/: + /myapp1=myworker-a + /myapp1/*=myworker-a + # Mapping all URI which end with a common suffix: + *.jsp=myworker + *.do=myworker + +Since the first case of mapping a certain location and everything inside +it is very common, the charac
svn commit: r479601 - in /tomcat/connectors/trunk/jk: native/apache-1.3/ native/apache-2.0/ native/common/ native/iis/ native/netscape/ xdocs/ xdocs/config/
Author: rjung Date: Mon Nov 27 04:22:29 2006 New Revision: 479601 URL: http://svn.apache.org/viewvc?view=rev&rev=479601 Log: Making uriworkermap reload time configurable, at the moment only for Apache. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/native/common/jk_global.h tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=479601&r1=479600&r2=479601 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Mon Nov 27 04:22:29 2006 @@ -121,6 +121,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; +char *mount_file_reload; jk_map_t *uri_to_context; int mountcopy; @@ -934,6 +935,32 @@ } /* + * JkMountFileReload Directive Handling + * + * JkMountFileReload seconds + */ + +static const char *jk_set_mount_file_reload(cmd_parms * cmd, +void *dummy, char *mount_file_reload) +{ +server_rec *s = cmd->server; +int interval; + +jk_server_conf_t *conf = +(jk_server_conf_t *) ap_get_module_config(s->module_config, + &jk_module); + +interval = atoi(mount_file_reload); +if (interval < 0) { +interval = 0; +} + +conf->mount_file_reload = interval; + +return NULL; +} + +/* * JkLogFile Directive Handling * * JkLogFile file @@ -1702,6 +1729,16 @@ "the name of a mount file for the Tomcat servlet uri mappings"}, /* + * JkMountFileReload specifies the reload check interval for the + * uriworker properties file. + * + * Default value is: JK_URIMAP_DEF_RELOAD + */ +{"JkMountFileReload", jk_set_mount_file_reload, NULL, RSRC_CONF, TAKE1, + "the reload check interval of the mount file"}, + +/* + * JkAutoMount specifies that the list of handled URLs must be * JkAutoMount specifies that the list of handled URLs must be * asked to the servlet engine (autoconf feature) */ @@ -2056,6 +2093,7 @@ c->exclude_options = 0; if (s->is_virtual) { +c->mount_file_reload = JK_UNSET; c->log_level = JK_UNSET; c->options = 0; c->worker_indicator = NULL; @@ -2066,6 +2104,7 @@ c->session_indicator = NULL; c->key_size_indicator = NULL; } else { +c->mount_file_reload = JK_URIMAP_DEF_RELOAD; c->log_level = JK_LOG_DEF_LEVEL; c->options = JK_OPT_FWDURIDEFAULT; c->worker_indicator = JK_ENV_WORKER_NAME; @@ -2163,6 +2202,8 @@ base->envvars); } +if (overrides->mount_file_reload == JK_UNSET) +overrides->mount_file_reload = base->mount_file_reload; if (overrides->mountcopy) { copy_jk_map(p, overrides->s, base->uri_to_context, overrides->uri_to_context); @@ -2328,6 +2369,7 @@ p, "Memory error"); if (sconf->mount_file) { sconf->uw_map->fname = sconf->mount_file; +sconf->uw_map->reload = sconf->mount_file_reload; uri_worker_map_load(sconf->uw_map, sconf->log); } if (sconf->format_string) { Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=479601&r1=479600&r2=479601 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 27 04:22:29 2006 @@ -153,6 +153,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; +char *mount_file_reload; jk_map_t *uri_to_context; int mountcopy; @@ -956,6 +957,32 @@ } /* + * JkMountFileReload Directive Handling + * + * JkMountFileReload seconds + */ + +static const char *jk_set_mount_file_reload(cmd_parms * cmd, +void *dummy
svn commit: r479606 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Mon Nov 27 04:36:49 2006 New Revision: 479606 URL: http://svn.apache.org/viewvc?view=rev&rev=479606 Log: Fix wrong struct member type for new attribute. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=479606&r1=479605&r2=479606 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Mon Nov 27 04:36:49 2006 @@ -121,7 +121,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; -char *mount_file_reload; +int mount_file_reload; jk_map_t *uri_to_context; int mountcopy; Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=479606&r1=479605&r2=479606 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 27 04:36:49 2006 @@ -153,7 +153,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; -char *mount_file_reload; +int mount_file_reload; jk_map_t *uri_to_context; int mountcopy; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479630 - /tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml
Author: rjung Date: Mon Nov 27 06:20:21 2006 New Revision: 479630 URL: http://svn.apache.org/viewvc?view=rev&rev=479630 Log: Correkt IIS info on uriworkermap reload interval. Modified: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Modified: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml?view=diff&rev=479630&r1=479629&r2=479630 == --- tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Mon Nov 27 06:20:21 2006 @@ -224,9 +224,9 @@ if the last check happened at least 60 seconds ago. -IIS does the check every 60 seconds. For Apache you can configure the -interval using the directive JkMountFile. The default value is also 60 seconds. -A value of "0" turns off the reloading. +For Apache you can configure the interval using the directive JkMountFile, +for IIS you would use the attribute worker_mount_reload. +The default value is 60 seconds. A value of "0" turns off the reloading. If the file changed, it gets reloaded completely. If there exist rules coming - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479835 - in /tomcat/connectors/trunk/jk/xdocs: miscellaneous/ webserver_howto/
Author: rjung Date: Mon Nov 27 17:14:10 2006 New Revision: 479835 URL: http://svn.apache.org/viewvc?view=rev&rev=479835 Log: Adding new dirs to start docs reorg. Added: tomcat/connectors/trunk/jk/xdocs/miscellaneous/ tomcat/connectors/trunk/jk/xdocs/webserver_howto/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479837 - in /tomcat/connectors/trunk/jk/xdocs: ajp/ generic_howto/
Author: rjung Date: Mon Nov 27 17:22:34 2006 New Revision: 479837 URL: http://svn.apache.org/viewvc?view=rev&rev=479837 Log: Another two dirs for doc reorg. Added: tomcat/connectors/trunk/jk/xdocs/ajp/ tomcat/connectors/trunk/jk/xdocs/generic_howto/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479842 [2/2] - in /tomcat/connectors/trunk/jk/xdocs: ./ ajp/ common/ config/ generic_howto/ howto/ miscellaneous/ news/ tools/ webserver_howto/
Copied: tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml (from r479836, tomcat/connectors/trunk/jk/xdocs/howto/apache.xml) URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml?view=diff&rev=479842&p1=tomcat/connectors/trunk/jk/xdocs/howto/apache.xml&r1=479836&p2=tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml&r2=479842 == --- tomcat/connectors/trunk/jk/xdocs/howto/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Mon Nov 27 17:55:39 2006 @@ -36,8 +36,12 @@ -It is recommanded that you also read the Workers HowTo document -to learn how to setup the working entities between your WebServer and Tomcat Engines. +It is recommended that you also read the Workers HowTo document +to learn how to setup the working entities between your web server and Tomcat Engines. +For more detailed configuration information consult the reference documentation for +workers.properties, +uriworkermap +and Apache. @@ -64,7 +68,7 @@ In all the examples in this document ${tomcat_home} will be /var/tomcat3. -A worker is defined to be a tomcat process that accepts work from the Apache server. +A worker is defined to be a tomcat process that accepts work from the Apache server. @@ -89,7 +93,7 @@ iSeries V5R1 and V5R2 with Apache 2.0.39. Be sure to have the latest Apache PTF installed. -Tomcat 3.2.x, Tomcat 3.3.x, Tomcat 4.0.x, Tomcat 4.1.x and Tomcat 5 +Tomcat 3.2.x, Tomcat 3.3.x, Tomcat 4.0.x, Tomcat 4.1.x, Tomcat 5.0.x, Tomcat 5.5.x and Tomcat 6. @@ -106,8 +110,8 @@ -The ajp12 has been deprecated with Tomcat 3.3.x and you should use instead -ajp13 which is the only ajp protocol known by Tomcat 4.0.x, 4.1.x and 5. +The ajp12 has been deprecated with Tomcat 3.3.x and you should use instead +ajp13 which is the only ajp protocol known by Tomcat 4.x, 5 and 5.5 and Tomcat 6. @@ -187,7 +191,7 @@ -For example JK 1.2.5 can be downloaded from a mirror +For example JK 1.2.x can be downloaded from a mirror http://tomcat.apache.org/download-connectors.cgi";> here (look for JK 1.2 Binary Releases). The "JK 1.2 Binary Releases" link contains binary version for a variety of operating systems for both Apache 1.3 and Apache 2. @@ -281,7 +285,7 @@ -You couldn't use mod_jk.conf-auto since Tomcat engine isn't on the same machine that your Apache WebServer, +You couldn't use mod_jk.conf-auto since Tomcat engine isn't on the same machine that your Apache web server, ie when you have an Apache in front of a Tomcat Farm. Copied: tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml (from r479836, tomcat/connectors/trunk/jk/xdocs/howto/iis.xml) URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml?view=diff&rev=479842&p1=tomcat/connectors/trunk/jk/xdocs/howto/iis.xml&r1=479836&p2=tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml&r2=479842 == --- tomcat/connectors/trunk/jk/xdocs/howto/iis.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml Mon Nov 27 17:55:39 2006 @@ -41,8 +41,12 @@ -It is recommanded that you also read the Workers HowTo document -to learn how to setup the working entities between your WebServer and Tomcat Engines. +It is recommended that you also read the Workers HowTo document +to learn how to setup the working entities between your web server and Tomcat Engines. +For more detailed configuration information consult the reference documentation for +workers.properties, +uriworkermap +and IIS. @@ -81,7 +85,7 @@ IIS4.0 and PWS4.0 (numerous people have working IIS 5 and IIS 6 configurations) -Tomcat 3.2 and later, Tomcat 4.x and Tomcat 5 +Tomcat 3.2 and later, Tomcat 4.x, Tomcat 5 and 5.5 and Tomcat 6 @@ -106,7 +110,7 @@ The ajp12 has been deprecated with Tomcat 3.3.x and you should use instead -ajp13 which is the only ajp protocol known by Tomcat 4.x and 5. +ajp13 which is the only ajp protocol known by Tomcat 4.x, 5 and 5.5 and Tomcat 6. @@ -160,11 +164,11 @@ isapi_redirect.dll - The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section). -workers.properties - A file that describes the host(s) and port(s) used by the workers (Tomcat processes). +workers.properties - A file that describes the host(s) and port(s) used by the workers (Tomcat processes). A sample workers.properties can be found under the conf directory. -uriworkermap.properties - A file that maps URL-Path patterns to workers. +uriworkermap.properties - A file that maps URL-Path patterns to workers. A sample uriworkermap.properties can be found under the conf directory as well. @@ -407,12 +411,12 @@ The above example defined two workers, now we can use these workers to serv
svn commit: r479961 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Nov 28 01:33:48 2006 New Revision: 479961 URL: http://svn.apache.org/viewvc?view=rev&rev=479961 Log: Fix compiler warnings. 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=479961&r1=479960&r2=479961 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Nov 28 01:33:48 2006 @@ -151,7 +151,7 @@ const char*doctype; int read_only; char **user_names; -int num_of_users; +unsigned int num_of_users; jk_worker_t worker; status_endpoint_t ep; jk_worker_env_t *we; @@ -2316,7 +2316,7 @@ if (w->num_of_users) { if (s->remote_user) { -int i; +unsigned int i; denied = 1; for (i = 0; i < w->num_of_users; i++) { if (!strcmp(s->remote_user, w->user_names[i])) { @@ -2654,7 +2654,7 @@ JK_TRACE_ENTER(log); if (pThis && pThis->worker_private) { status_worker_t *p = pThis->worker_private; -int i; +unsigned int i; p->we = we; p->css = jk_get_worker_style_sheet(props, p->name, NULL); p->ns = jk_get_worker_name_space(props, p->name, JK_NSDEF); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479963 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Nov 28 01:44:04 2006 New Revision: 479963 URL: http://svn.apache.org/viewvc?view=rev&rev=479963 Log: Adding "back" links to the form views (edit) 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=479963&r1=479962&r2=479963 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Nov 28 01:44:04 2006 @@ -678,6 +678,13 @@ lb_worker_t *lb = NULL; JK_TRACE_ENTER(l); +if (single) { +jk_puts(s, "\n"); +status_write_uri(s, "Back to full worker list", JK_STATUS_CMD_LIST, + 0, 0, refresh, NULL, NULL); +jk_puts(s, "\n"); +from = JK_STATUS_CMD_SHOW; +} if (w->type == JK_LB_WORKER_TYPE) { lb = (lb_worker_t *)w->worker_private; name = lb->s->name; @@ -702,13 +709,6 @@ JK_TRACE_EXIT(l); return; } -if (single) { -jk_puts(s, "\n"); -status_write_uri(s, "Back to full worker list", JK_STATUS_CMD_LIST, - 0, 0, refresh, NULL, NULL); -jk_puts(s, "\n"); -from = JK_STATUS_CMD_SHOW; -} if (lb) { time_t now = time(NULL); @@ -1128,6 +1128,10 @@ lb_worker_t *lb = NULL; JK_TRACE_ENTER(l); +jk_puts(s, "\n"); +status_write_uri(s, "Back to worker view", from, + 0, 0, refresh, NULL, NULL); +jk_puts(s, "\n"); if (w->type == JK_LB_WORKER_TYPE) { lb = (lb_worker_t *)w->worker_private; name = lb->s->name; @@ -1272,6 +1276,11 @@ jk_log(l, JK_LOG_DEBUG, "producing edit form for sub worker '%s' of lb worker '%s'", wr->s->name, worker); + +jk_puts(s, "\n"); +status_write_uri(s, "Back to worker view", from, + 0, 0, refresh, NULL, NULL); +jk_puts(s, "\n"); jk_putv(s, "Edit worker settings for ", wr->s->name, "\n", NULL); status_start_form(s, "GET", JK_STATUS_CMD_UPDATE, @@ -1336,6 +1345,10 @@ unsigned int i; JK_TRACE_ENTER(l); +jk_puts(s, "\n"); +status_write_uri(s, "Back to worker view", from, + 0, 0, refresh, NULL, NULL); +jk_puts(s, "\n"); if (!attribute) { jk_log(l, JK_LOG_WARNING, "missing request parameter '%s'", - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479969 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Nov 28 01:56:10 2006 New Revision: 479969 URL: http://svn.apache.org/viewvc?view=rev&rev=479969 Log: Add easier to detect result message to the end of status worker output. Should help with automation. 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=479969&r1=479968&r2=479969 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Nov 28 01:56:10 2006 @@ -2609,14 +2609,30 @@ } if (err) { if (mime == JK_STATUS_MIME_HTML) { -jk_putv(s, "", err, "", NULL); +jk_putv(s, "Result: ERROR - ", err, "", NULL); jk_putv(s, "req_uri, "\">JK Status Manager", NULL); } else if (mime == JK_STATUS_MIME_XML) { -jk_putv(s, "", err, "", NULL); +jk_putv(s, " <", w->ns, "result\n", NULL); +jk_puts(s, " type=\"ERROR\"\n"); +jk_putv(s, " msg=\"", err, "\"/>\n", NULL); } else { -jk_puts(s, err); +jk_putv(s, "ERROR - ", err, NULL); +} +} +else { +if (mime == JK_STATUS_MIME_HTML) { +jk_puts(s, "Result: OK - Action finished"); +jk_putv(s, "req_uri, "\">JK Status Manager", NULL); +} +else if (mime == JK_STATUS_MIME_XML) { +jk_putv(s, " <", w->ns, "result\n", NULL); +jk_puts(s, " type=\"OK\"\n"); +jk_puts(s, " msg=\"Action finished\"/>\n"); +} +else { +jk_puts(s, "OK - Action finished"); } } if (mime == JK_STATUS_MIME_HTML) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481553 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sat Dec 2 04:31:10 2006 New Revision: 481553 URL: http://svn.apache.org/viewvc?view=rev&rev=481553 Log: Replace "-" by "_" in attribute name time-to-recover to make naming compliant with ant nameing restrictions (this helps for the jkstatus ant tasks). 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=481553&r1=481552&r2=481553 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 2 04:31:10 2006 @@ -972,7 +972,7 @@ if (rs < lb->recover_wait_time - (int)difftime(now, wr->s->error_time)) rs += lb->maintain_time; } -jk_printf(s, "time-to-recover=\"%u\"", rs < 0 ? 0 : rs); +jk_printf(s, "time_to_recover=\"%u\"", rs < 0 ? 0 : rs); /* Terminate the tag */ jk_puts(s, "/>\n"); } @@ -1104,7 +1104,7 @@ if (rs < lb->recover_wait_time - (int)difftime(now, wr->s->error_time)) rs += lb->maintain_time; } -jk_printf(s, " time-to-recover=%u\n", rs < 0 ? 0 : rs); +jk_printf(s, " time_to_recover=%u\n", rs < 0 ? 0 : rs); } } else if (aw) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481556 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sat Dec 2 05:14:02 2006 New Revision: 481556 URL: http://svn.apache.org/viewvc?view=rev&rev=481556 Log: Changing return type of argument passing in status worker to a three value type (JK_TRUE, JK_FALSE and JK_UNSET). JK_UNSET is used to distinguish an empty parameter from a missing one. 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=481556&r1=481555&r2=481556 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 2 05:14:02 2006 @@ -342,7 +342,7 @@ return "True"; } -static char *status_get_arg_raw(const char *param, const char *req, char *buf, size_t len) +static int status_get_arg_raw(const char *param, const char *req, char *buf, size_t len) { char ps[32]; char *p; @@ -350,9 +350,9 @@ *buf = '\0'; if (!req) -return NULL; +return JK_FALSE; if (!param) -return NULL; +return JK_FALSE; sprintf(ps, "&%s=", param); p = strstr(req, ps); if (!p) { @@ -373,23 +373,25 @@ } buf[l] = '\0'; if (l) -return buf; +return JK_TRUE; else -return NULL; +return JK_UNSET; } else -return NULL; +return JK_FALSE; } -static const char *status_get_arg(const char *param, const char *req, char *buf, size_t len) +static int status_get_arg(const char *param, const char *req, char *buf, size_t len) { -if (status_get_arg_raw(param, req, buf, len)) { +int rv; + +rv = status_get_arg_raw(param, req, buf, len); +if (rv == JK_TRUE) { char *off = buf; while ((off = strpbrk(off, JK_STATUS_ESC_CHARS))) off[0] = '@'; -return buf; } -return NULL; +return rv; } static int status_get_int(const char *param, const char *req, int def) @@ -397,7 +399,7 @@ char buf[32]; int rv = def; -if (status_get_arg_raw(param, req, buf, sizeof(buf) -1)) { +if (status_get_arg_raw(param, req, buf, sizeof(buf)) == JK_TRUE) { rv = atoi(buf); } return rv; @@ -408,7 +410,7 @@ char buf[32]; int rv = def; -if (status_get_arg_raw(param, req, buf, sizeof(buf))) { +if (status_get_arg_raw(param, req, buf, sizeof(buf)) == JK_TRUE) { if (strcasecmp(buf, "on") == 0 || strcasecmp(buf, "true") == 0 || strcasecmp(buf, "1") == 0) @@ -549,16 +551,16 @@ *refresh = 0; if (!s->query_string) return; -if (status_get_arg_raw(JK_STATUS_ARG_CMD, s->query_string, buf, sizeof(buf))) +if (status_get_arg_raw(JK_STATUS_ARG_CMD, s->query_string, buf, sizeof(buf)) == JK_TRUE) *cmd = status_cmd_int(buf); -if (status_get_arg_raw(JK_STATUS_ARG_MIME, s->query_string, buf, sizeof(buf))) +if (status_get_arg_raw(JK_STATUS_ARG_MIME, s->query_string, buf, sizeof(buf)) == JK_TRUE) *mime = status_mime_int(buf); -if (status_get_arg_raw(JK_STATUS_ARG_FROM, s->query_string, buf, sizeof(buf))) +if (status_get_arg_raw(JK_STATUS_ARG_FROM, s->query_string, buf, sizeof(buf)) == JK_TRUE) *from = status_cmd_int(buf); *refresh = status_get_int(JK_STATUS_ARG_REFRESH, s->query_string, 0); -if (status_get_arg(JK_STATUS_ARG_WORKER, s->query_string, buf, sizeof(buf))) +if (status_get_arg(JK_STATUS_ARG_WORKER, s->query_string, buf, sizeof(buf)) == JK_TRUE) strncpy(worker, buf, JK_SHM_STR_SIZ); -if (status_get_arg(JK_STATUS_ARG_WORKER_MEMBER, s->query_string, buf, sizeof(buf))) +if (status_get_arg(JK_STATUS_ARG_WORKER_MEMBER, s->query_string, buf, sizeof(buf)) == JK_TRUE) strncpy(sub_worker, buf, JK_SHM_STR_SIZ); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, @@ -1553,6 +1555,7 @@ { char buf[128]; int rc = 0; +int rv; int i; JK_TRACE_ENTER(l); @@ -1580,8 +1583,8 @@ /* Recalculate the load multiplicators wrt. lb_factor */ rc |= 2; } -if (status_get_arg(JK_STATUS_ARG_LBM_ROUTE, - s->query_string, buf, sizeof(buf))) { +if ((rv = status_get_arg(JK_STATUS_ARG_LBM_ROUTE, + s->query_string, buf, sizeof(buf))) == JK_TRUE) { if (strncmp(wr->s->jvm_route, buf, JK_SHM_STR_SIZ)) { jk_log(l, JK_LOG_INFO, "setting 'jvm_route' for sub worker '%s' of lb worker '%s' to '%s'", @@ -1597,14 +1600,14 @@ } } } -else
svn commit: r481759 - /tomcat/connectors/trunk/jk/tools/jkrelease.sh
Author: rjung Date: Sun Dec 3 03:59:36 2006 New Revision: 481759 URL: http://svn.apache.org/viewvc?view=rev&rev=481759 Log: Update JK release skript according to new documentation structure. Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/jkrelease.sh?view=diff&rev=481759&r1=481758&r2=481759 == --- tomcat/connectors/trunk/jk/tools/jkrelease.sh (original) +++ tomcat/connectors/trunk/jk/tools/jkrelease.sh Sun Dec 3 03:59:36 2006 @@ -160,7 +160,7 @@ ;; esac rm -f CHANGES -${TOOL} ../docs/printer/changelog.html > CHANGES 2>/dev/null +${TOOL} ../docs/miscellaneous/printer/changelog.html > CHANGES 2>/dev/null if [ -f CHANGES -a -s CHANGES ] then failed=false @@ -175,7 +175,6 @@ fi # Export text docs -${TOOL} ../docs/printer/changelog.html >CHANGES ${TOOL} ../docs/news/printer/20060101.html >NEWS ${TOOL} ../docs/news/printer/20050101.html >>NEWS ${TOOL} ../docs/news/printer/20041100.html >>NEWS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481770 - in /tomcat/connectors/trunk/jk: native/apache-1.3/ native/apache-2.0/ native/common/ native/iis/ native/netscape/ xdocs/ajp/ xdocs/config/ xdocs/miscellaneous/
Author: rjung Date: Sun Dec 3 04:55:56 2006 New Revision: 481770 URL: http://svn.apache.org/viewvc?view=rev&rev=481770 Log: Rename jvm_route to route: - You can still use the old name in the worker configuration. In case of conflicts, the new name will win. - Added jvm_route to the deprecated list in the code and in the docs. - All log messages and the status worker will now only refer to "route". - All internal implementation names have been changed as well. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h 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_service.h tomcat/connectors/trunk/jk/native/common/jk_shm.h 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 tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c tomcat/connectors/trunk/jk/xdocs/ajp/ajpv13a.xml tomcat/connectors/trunk/jk/xdocs/ajp/ajpv13ext.xml tomcat/connectors/trunk/jk/xdocs/config/workers.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=481770&r1=481769&r2=481770 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Dec 3 04:55:56 2006 @@ -496,7 +496,7 @@ { request_rec *r = private_data->r; char *ssl_temp = NULL; -s->jvm_route = NULL;/* Used for sticky session routing */ +s->route = NULL;/* Used for sticky session routing */ /* Copy in function pointers (which are really methods) */ s->start_response = ws_start_response; @@ -2008,8 +2008,8 @@ ap_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro); ap_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration); #endif -if (s.jvm_route && *s.jvm_route) -ap_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.jvm_route); +if (s.route && *s.route) +ap_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route); request_log_transaction(r, conf); } } Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=481770&r1=481769&r2=481770 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Dec 3 04:55:56 2006 @@ -516,7 +516,7 @@ request_rec *r = private_data->r; char *ssl_temp = NULL; -s->jvm_route = NULL;/* Used for sticky session routing */ +s->route = NULL;/* Used for sticky session routing */ /* Copy in function pointers (which are really methods) */ s->start_response = ws_start_response; @@ -2101,8 +2101,8 @@ duration = apr_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro); apr_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration); -if (s.jvm_route && *s.jvm_route) -apr_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.jvm_route); +if (s.route && *s.route) +apr_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route); request_log_transaction(r, xconf); } Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c?view=diff&rev=481770&r1=481769&r2=481770 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Sun Dec 3 04:55:56 2006 @@ -400,7 +400,7 @@ ajpv12_sendstring(p, s->server_name) && #endif ajpv12_sendint(p, s->server_port) && ajpv12_sendstring(p, s->protocol) && ajpv12_sendstring(p, 0) && /* SERVER_SIGNATURE */ -
svn commit: r481775 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/config/apache.xml xdocs/miscellaneous/changelog.xml xdocs/webserver_howto/apache.xml
Author: rjung Date: Sun Dec 3 05:57:46 2006 New Revision: 481775 URL: http://svn.apache.org/viewvc?view=rev&rev=481775 Log: Apache: Fix incorrect handling of JkEnvVar when Vars are set multiple times. Allow omitting of default value (which means default is empty string). Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=481775&r1=481774&r2=481775 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Dec 3 05:57:46 2006 @@ -1681,7 +1681,10 @@ &jk_module); -ap_table_add(conf->envvars, env_name, default_value); +/* env_name is mandatory, default_value is optional. + * No value means set the variable to an empty string. + */ +ap_table_setn(conf->envvars, env_name, default_value ? default_value : ""); return NULL; } @@ -1843,8 +1846,9 @@ * JkEnvVar let user defines envs var passed from WebServer to * Servlet Engine */ -{"JkEnvVar", jk_add_env_var, NULL, RSRC_CONF, TAKE2, - "Adds a name of environment variable that should be sent to servlet-engine"}, +{"JkEnvVar", jk_add_env_var, NULL, RSRC_CONF, TAKE12, + "Adds a name of environment variable and an optional value " + "that should be sent to servlet-engine"}, {"JkWorkerProperty", jk_set_worker_property, NULL, RSRC_CONF, RAW_ARGS, "Set workers.properties formated directive"}, @@ -2197,9 +2201,20 @@ overrides->options |= (base->options & ~base->exclude_options); if (base->envvars_in_use) { -overrides->envvars_in_use = JK_TRUE; -overrides->envvars = ap_overlay_tables(p, overrides->envvars, - base->envvars); +int i; +const array_header *arr; +const table_entry *elts; + +arr = ap_table_elts(base->envvars); +if (arr) { +overrides->envvars_in_use = JK_TRUE; +elts = (const table_entry *)arr->elts; +for (i = 0; i < arr->nelts; ++i) { +if (!ap_table_get(overrides->envvars, elts[i].key)) { +ap_table_setn(overrides->envvars, elts[i].key, elts[i].val); +} +} +} } if (overrides->mount_file_reload == JK_UNSET) Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=481775&r1=481774&r2=481775 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Dec 3 05:57:46 2006 @@ -1711,7 +1711,10 @@ conf->envvars_in_use = JK_TRUE; -apr_table_add(conf->envvars, env_name, default_value); +/* env_name is mandatory, default_value is optional. + * No value means set the variable to an empty string. + */ +apr_table_setn(conf->envvars, env_name, default_value ? default_value : ""); return NULL; } @@ -1885,9 +1888,9 @@ * JkEnvVar let user defines envs var passed from WebServer to * Servlet Engine */ -AP_INIT_TAKE2("JkEnvVar", jk_add_env_var, NULL, RSRC_CONF, - "Adds a name of environment variable that should be sent " - "to servlet-engine"), +AP_INIT_TAKE12("JkEnvVar", jk_add_env_var, NULL, RSRC_CONF, + "Adds a name of environment variable and an optional value " + "that should be sent to servlet-engine"), AP_INIT_RAW_ARGS("JkWorkerProperty", jk_set_worker_property, NULL, RSRC_CONF, @@ -2323,9 +2326,20 @@ overrides->options |= (base->options & ~base->exclude_options); if (base->envvars_in_use) { -overrides->envvars_in_use = JK_TRUE; -overrides->envvars = apr_table_overlay(p, overrides->envvars, - base->envvars); +int i; +const apr_array_header_t *arr; +const apr_table_entry_t *elts; + +arr = apr_table_elts(base->envvars); +if (arr) {
svn commit: r482060 - in /tomcat/connectors/trunk/jk/native/common: jk_util.c jk_util.h
Author: rjung Date: Sun Dec 3 20:28:07 2006 New Revision: 482060 URL: http://svn.apache.org/viewvc?view=rev&rev=482060 Log: Cleanup jk_util.c a little: - num_of_wokers -> num_of_workers - use "num" instead of "num_*" mostly Add three more properties for use in status worker: - prefix to define a prefix for the property output type - good and bad rating to make the good and bad summary for lb in status worker configurable Modified: 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_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=482060&r1=482059&r2=482060 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Dec 3 20:28:07 2006 @@ -81,9 +81,12 @@ #define NAMESPACE_OF_WORKER ("ns") #define XML_NAMESPACE_OF_WORKER ("xmlns") #define XML_DOCTYPE_OF_WORKER ("doctype") +#define PROP_PREFIX_OF_WORKER ("prefix") #define READ_ONLY_OF_WORKER ("read_only") #define USER_OF_WORKER ("user") +#define GOOD_RATING_OF_WORKER ("good") +#define BAD_RATING_OF_WORKER("bad") #define DEFAULT_WORKER_TYPE JK_AJP13_WORKER_NAME #define SECRET_KEY_OF_WORKER("secretkey") @@ -131,6 +134,8 @@ BALANCE_WORKERS, MOUNT_OF_WORKER, USER_OF_WORKER, +GOOD_RATING_OF_WORKER, +BAD_RATING_OF_WORKER, "list", NULL }; @@ -174,6 +179,7 @@ NAMESPACE_OF_WORKER, XML_NAMESPACE_OF_WORKER, XML_DOCTYPE_OF_WORKER, +PROP_PREFIX_OF_WORKER, NULL }; @@ -804,19 +810,19 @@ return jk_map_get_string(m, buf, NULL); } -int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_wokers) +int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_workers) { -if (m && list && num_of_wokers) { +if (m && list && num_of_workers) { char **ar = jk_map_get_string_list(m, WORKER_LIST_PROPERTY_NAME, -num_of_wokers, +num_of_workers, DEFAULT_WORKER); if (ar) { *list = ar; return JK_TRUE; } *list = NULL; -*num_of_wokers = 0; +*num_of_workers = 0; } return JK_FALSE; @@ -1049,6 +1055,16 @@ return jk_map_get_string(m, buf, def); } +const char *jk_get_worker_prop_prefix(jk_map_t *m, const char *wname, const char *def) +{ +char buf[1024]; +if (!m || !wname) { +return NULL; +} +MAKE_WORKER_PARAM(PROP_PREFIX_OF_WORKER); +return jk_map_get_string(m, buf, def); +} + int jk_get_is_read_only(jk_map_t *m, const char *wname) { int rc = JK_FALSE; @@ -1065,21 +1081,65 @@ int jk_get_worker_user_list(jk_map_t *m, const char *wname, -char ***list, unsigned int *num_of_users) +char ***list, unsigned int *num) { char buf[1024]; -if (m && list && num_of_users && wname) { +if (m && list && num && wname) { char **ar = NULL; MAKE_WORKER_PARAM(USER_OF_WORKER); -ar = jk_map_get_string_list(m, buf, num_of_users, NULL); +ar = jk_map_get_string_list(m, buf, num, NULL); +if (ar) { +*list = ar; +return JK_TRUE; +} +*list = NULL; +*num = 0; +} + +return JK_FALSE; +} + +int jk_get_worker_good_rating(jk_map_t *m, + const char *wname, + char ***list, unsigned int *num) +{ +char buf[1024]; + +if (m && list && num && wname) { +char **ar = NULL; + +MAKE_WORKER_PARAM(GOOD_RATING_OF_WORKER); +ar = jk_map_get_string_list(m, buf, num, NULL); +if (ar) { +*list = ar; +return JK_TRUE; +} +*list = NULL; +*num = 0; +} + +return JK_FALSE; +} + +int jk_get_worker_bad_rating(jk_map_t *m, + const char *wname, + char ***list, unsigned int *num) +{ +char buf[1024]; + +if (m && list && num && wname) { +char **ar = NULL; + +MAKE_WORKER_PARAM(BAD_RATING_OF_WORKER); +ar = jk_map_get_string_list(m, buf, num, NULL); if (ar) { *list = ar; return JK_TRUE; } *list = NULL; -*num_of_users = 0; +
svn commit: r482072 [1/2] - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Dec 3 20:57:49 2006 New Revision: 482072 URL: http://svn.apache.org/viewvc?view=rev&rev=482072 Log: Further improvements for the status worker: - New output style "mime=prop" for property type output. Format includes lines for attributes mount, balance_workers, list - New cmd=version (only shows version numbers, no worker data) - New lb view without sub workers (add "opt=nosw") - good/bad/degraded: the mapping of (activation,state) to good/bad is now configurable - Renamed request param att -> opt - Renamed some DEF constants - Added Headings (Legend, LB list, AJP list) - Fixed copyright placement as page footer - consistent grouping of lb and non-lb workers for cmd=list for all mime types - Added id to map display, because we have no other primary key for maps - Changed description of N/A in legend to "Unknown", because "Not Available" was misleading. - Some more Logging - Automatic handling of the "opt" request attribute - More and consistent navigation - Use more string constants instead of jk_p(uts|utv|rintf) - Utility functions for xml and property output - Better parameter validation - Killed a bit of redundant code across mime types (still much left) - renamed logger log to l Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r482084 - in /tomcat/connectors/trunk/jk/xdocs: config/workers.xml miscellaneous/changelog.xml
Author: rjung Date: Sun Dec 3 21:26:26 2006 New Revision: 482084 URL: http://svn.apache.org/viewvc?view=rev&rev=482084 Log: Update docs and changelog with last status worker extensions. Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?view=diff&rev=482084&r1=482083&r2=482084 == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Sun Dec 3 21:26:26 2006 @@ -381,10 +381,69 @@ -This directive can be used mutltiple times. It is a list of users +It is a list of users which gets compared to the user name authenticated by the web server. If the name is not contained in this list, access is denied. Per default the list is empty and then access is allowed to anybody. + +This directive can be used multiple times. + + +This feature has been added in jk 1.2.20. + + + +For every load balancer worker, the status worker shows a summary +of the state of its members. There are three such states, +"good", "bad" and "degraded". + +These states are determined depending on the activation of the members +(active, disabled, stopped) and their runtime state +(ok, n/a, busy, recovering, error). +By default, members are assumed to be "good", if their activation +is "active" and their runtime state is not "error". + + +You can change this mapping, by assigning a list of values to the +attribute "good". Each value gives a possible match for the members, +and one match suffices. Each value is either a single character, or two +characters combined with a dot ".". The single characters are the +first characters in the words "active", "disabled", "stopped", +"ok", "na", "busy", "recovering", "error". If a value consists only +of a single character, then all members with this activation or runtime +state will be assumed good. A combination of an activation and a runtime +state concatenated with a dot "." does only apply to a member, that has +exactly this activation and state. + + +Members of a load balancer will first be matched against the state "bad", +if they don't match, the state "good" will be tried, and if they +still don't match, their state will be "degraded". + + +This directive can be used multiple times. + + +This feature has been added in jk 1.2.20. + + + +See: "good". + +By default, members are assumed to be "bad", if their activation +is "stopped" or their runtime state is "error". + + +This directive can be used multiple times. + + +This feature has been added in jk 1.2.20. + + + +The prefix, which will be used by the status worker +when producing properties output (mime=prop). +Each property keyy will be prefixed by this value. This feature has been added in jk 1.2.20. 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=482084&r1=482083&r2=482084 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Dec 3 21:26:26 2006 @@ -26,6 +26,19 @@ + + Status Worker: Add directive to make property prefix + and good/bad rule configurable. (rjung) + + + Status Worker: Omit lb members when att=nosw. (rjung) + + + Status Worker: New command cmd=version for a short version output. (rjung) + + + Status Worker: New output stype mime=prop produces property lists. (rjung) + Apache: Fix incorrect handling of JkEnvVar when Vars are set multiple times. (rjung) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r482086 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Dec 3 21:32:36 2006 New Revision: 482086 URL: http://svn.apache.org/viewvc?view=rev&rev=482086 Log: Fix a couple of compiler warnings. 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=482086&r1=482085&r2=482086 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Dec 3 21:32:36 2006 @@ -388,9 +388,9 @@ return rc; } -static int jk_print_xml_start_elt(jk_ws_service_t *s, status_worker_t *sw, - int indentation, int close_tag, - const char *name) +static void jk_print_xml_start_elt(jk_ws_service_t *s, status_worker_t *sw, + int indentation, int close_tag, + const char *name) { if (close_tag) { jk_printf(s, "%*s<%s%s>\n", indentation, "", sw->ns, name); @@ -400,15 +400,15 @@ } } -static int jk_print_xml_close_elt(jk_ws_service_t *s, status_worker_t *sw, - int indentation, - const char *name) +static void jk_print_xml_close_elt(jk_ws_service_t *s, status_worker_t *sw, + int indentation, + const char *name) { jk_printf(s, "%*s\n", indentation, "", sw->ns, name); } -static int jk_print_xml_stop_elt(jk_ws_service_t *s, - int indentation, int close_tag) +static void jk_print_xml_stop_elt(jk_ws_service_t *s, + int indentation, int close_tag) { if (close_tag) { jk_printf(s, "%*s/>\n", indentation, ""); @@ -418,44 +418,44 @@ } } -static int jk_print_xml_att_string(jk_ws_service_t *s, - int indentation, - const char *key, const char *value) +static void jk_print_xml_att_string(jk_ws_service_t *s, +int indentation, +const char *key, const char *value) { jk_printf(s, "%*s%s=\"%s\"\n", indentation, "", key, value ? value : ""); } -static int jk_print_xml_att_int(jk_ws_service_t *s, -int indentation, -const char *key, int value) +static void jk_print_xml_att_int(jk_ws_service_t *s, + int indentation, + const char *key, int value) { jk_printf(s, "%*s%s=\"%d\"\n", indentation, "", key, value); } -static int jk_print_xml_att_uint(jk_ws_service_t *s, - int indentation, - const char *key, unsigned 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 int jk_print_xml_att_uint32(jk_ws_service_t *s, - int indentation, - const char *key, jk_uint32_t value) +static void jk_print_xml_att_uint32(jk_ws_service_t *s, +int indentation, +const char *key, jk_uint32_t value) { jk_printf(s, "%*s%s=\"%" JK_UINT32_T_FMT "\"\n", indentation, "", key, value); } -static int jk_print_xml_att_uint64(jk_ws_service_t *s, - int indentation, - const char *key, jk_uint64_t value) +static void jk_print_xml_att_uint64(jk_ws_service_t *s, +int indentation, +const char *key, jk_uint64_t value) { jk_printf(s, "%*s%s=\"%" JK_UINT64_T_FMT "\"\n", indentation, "", key, value); } -static int jk_print_prop_att_string(jk_ws_service_t *s, status_worker_t *sw, -const char *name, -const char *key, const char *value) +static void jk_print_prop_att_string(jk_ws_service_t *s, status_worker_t *sw, + const char *name, + const char *key, const char *value) { if (name) { jk_printf(s, "%s.%s.%s=%s\n", sw->prefix, name, key, value ? valu
svn commit: r482756 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
Author: rjung Date: Tue Dec 5 12:13:48 2006 New Revision: 482756 URL: http://svn.apache.org/viewvc?view=rev&rev=482756 Log: Dropping one of the two jk_endpoint members of the lb_endpoint. I could find not s single line apart from the deleted, where the jk_endpoint named "e" was used. Also tests showed, it was always NULL. Maybe e was supposed to be the endpoint of an lb member that actually services the request, but this endpoint is called "end" and onl lived in the lb service method locally. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.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=482756&r1=482755&r2=482756 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Tue Dec 5 12:13:48 2006 @@ -79,7 +79,6 @@ struct lb_endpoint { -jk_endpoint_t *e; lb_worker_t *worker; jk_endpoint_t endpoint; @@ -1098,10 +1097,6 @@ if (e && *e && (*e)->endpoint_private) { lb_endpoint_t *p = (*e)->endpoint_private; -if (p->e) { -p->e->done(&p->e, l); -} - free(p); *e = NULL; JK_TRACE_EXIT(l); @@ -1303,7 +1298,6 @@ if (pThis && pThis->worker_private && pend) { lb_endpoint_t *p = (lb_endpoint_t *) malloc(sizeof(lb_endpoint_t)); -p->e = NULL; p->worker = pThis->worker_private; p->endpoint.endpoint_private = p; p->endpoint.service = service; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r483087 - in /tomcat/connectors/trunk/jk/xdocs: ./ ajp/ config/ generic_howto/ miscellaneous/ news/ reference/ webserver_howto/
Author: rjung Date: Wed Dec 6 06:20:35 2006 New Revision: 483087 URL: http://svn.apache.org/viewvc?view=rev&rev=483087 Log: Renaming the config dir of the docs to reference and using the title Reference Guide in the docs. Added: tomcat/connectors/trunk/jk/xdocs/reference/ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml - copied unchanged from r483077, tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/reference/iis.xml - copied unchanged from r483077, tomcat/connectors/trunk/jk/xdocs/config/iis.xml tomcat/connectors/trunk/jk/xdocs/reference/project.xml - copied, changed from r483077, tomcat/connectors/trunk/jk/xdocs/config/project.xml tomcat/connectors/trunk/jk/xdocs/reference/uriworkermap.xml - copied unchanged from r483077, tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml - copied, changed from r483077, tomcat/connectors/trunk/jk/xdocs/config/workers.xml Removed: tomcat/connectors/trunk/jk/xdocs/config/ Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml tomcat/connectors/trunk/jk/xdocs/build.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml tomcat/connectors/trunk/jk/xdocs/index.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/faq.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml tomcat/connectors/trunk/jk/xdocs/news/20060101.xml tomcat/connectors/trunk/jk/xdocs/news/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/nes.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/ajp/project.xml?view=diff&rev=483087&r1=483086&r2=483087 == --- tomcat/connectors/trunk/jk/xdocs/ajp/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/ajp/project.xml Wed Dec 6 06:20:35 2006 @@ -13,11 +13,11 @@ - - - - - + + + + + @@ -53,4 +53,4 @@ - \ No newline at end of file + Modified: tomcat/connectors/trunk/jk/xdocs/build.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/build.xml?view=diff&rev=483087&r1=483086&r2=483087 == --- tomcat/connectors/trunk/jk/xdocs/build.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/build.xml Wed Dec 6 06:20:35 2006 @@ -64,18 +64,18 @@ - - +<style basedir="reference" + destdir="${build.dir}/${dist.name}/reference" extension=".html" style="style.xsl" excludes="project.xml" includes="*.xml"> <param name="relative-path" expression=".."/> - - +
svn commit: r483115 [1/2] - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Wed Dec 6 07:36:46 2006 New Revision: 483115 URL: http://svn.apache.org/viewvc?view=rev&rev=483115 Log: Last huge status worker renovation for 1.2.20: Adding a jk_map which holds all the request properties to the status_endpoint_t. As a consequence, the endpoint is no longer static. Added also "hide" features to all sections of the display, so one can easily shrink the view to the information one wants to follow. And now on to documenting this beast. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r483244 - in /tomcat/connectors/trunk/jk/xdocs: ./ ajp/ generic_howto/ miscellaneous/ news/ reference/ webserver_howto/
Author: rjung Date: Wed Dec 6 13:37:59 2006 New Revision: 483244 URL: http://svn.apache.org/viewvc?view=rev&rev=483244 Log: Added status worker reference page. Added: tomcat/connectors/trunk/jk/xdocs/reference/status.xml (with props) Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml tomcat/connectors/trunk/jk/xdocs/index.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml tomcat/connectors/trunk/jk/xdocs/news/20060101.xml tomcat/connectors/trunk/jk/xdocs/news/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml tomcat/connectors/trunk/jk/xdocs/reference/project.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/ajp/project.xml?view=diff&rev=483244&r1=483243&r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/ajp/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/ajp/project.xml Wed Dec 6 13:37:59 2006 @@ -14,8 +14,9 @@ - - + + + Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml?view=diff&rev=483244&r1=483243&r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml Wed Dec 6 13:37:59 2006 @@ -14,8 +14,9 @@ - - + + + Modified: tomcat/connectors/trunk/jk/xdocs/index.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?view=diff&rev=483244&r1=483243&r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/index.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/index.xml Wed Dec 6 13:37:59 2006 @@ -29,7 +29,7 @@ -28 November 2006 - JK-1.2.20 released +10 December 2006 - JK-1.2.20 released The Apache Tomcat team is proud to announce the immediate availability of Tomcat Connectors 1.2.20 Stable. 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=483244&r1=483243&r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Wed Dec 6 13:37:59 2006 @@ -27,6 +27,9 @@ + Docs: New reference guide page for status worker. (rjung) + + Docs: Renaming the config dir to reference and using the title Reference Guide in the docs. (rjung) Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml?view=diff&rev=483244&r1=483243&r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml Wed Dec 6 13:37:59 2006 @@ -14,8 +14,9 @@ - - + + + Modified: tomcat/connectors/trunk/jk/xdocs/news/20060101.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/20060101.xml?view=diff&rev=483244&r1=483243&r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/news/20060101.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/news/20060101.xml Wed Dec 6 13:37:59 2006 @@ -15,8 +15,8 @@ - -28 November - JK-1.2.20 released + +10 December - JK-1.2.20 released The Apache Tomcat team is proud to announce the immediate availability of Tomcat Connectors 1.2.20. This is a stable release adding new features and a few bug fixes to version 1.2.19. Modified: tomcat/connectors/trunk/jk/xdocs/news/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/project.xml?view=diff&rev=483244&r1=483243&r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/news/project.xml (original) +++ t
svn commit: r485049 - /tomcat/connectors/trunk/jk/xdocs/reference/status.xml
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
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]
svn commit: r485089 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
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-&
svn commit: r485091 - in /tomcat/connectors/trunk/jk/native/common: jk_map.c jk_status.c jk_util.c jk_util.h
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_ge
svn commit: r485092 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h jk_status.c jk_util.c
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;
svn commit: r485093 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
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"
svn commit: r485095 - /tomcat/connectors/trunk/jk/xdocs/reference/status.xml
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
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]
svn commit: r487981 - in /tomcat/connectors/trunk/jk: native/ native/common/ native/iis/ native/iis/installer/ xdocs/miscellaneous/
Author: rjung Date: Sun Dec 17 05:53:14 2006 New Revision: 487981 URL: http://svn.apache.org/viewvc?view=rev&rev=487981 Log: Start dev cycle for version 1.2.21: increase version number etc. Modified: tomcat/connectors/trunk/jk/native/STATUS.txt tomcat/connectors/trunk/jk/native/common/jk_version.h tomcat/connectors/trunk/jk/native/common/portable.h.sample tomcat/connectors/trunk/jk/native/configure.in tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/STATUS.txt?view=diff&rev=487981&r1=487980&r2=487981 == --- tomcat/connectors/trunk/jk/native/STATUS.txt (original) +++ tomcat/connectors/trunk/jk/native/STATUS.txt Sun Dec 17 05:53:14 2006 @@ -3,6 +3,7 @@ Release: +1.2.21 : in development 1.2.20 : released December 10, 2006 1.2.19 : released September 17, 2006 1.2.18 : released July, 2006 Modified: tomcat/connectors/trunk/jk/native/common/jk_version.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_version.h?view=diff&rev=487981&r1=487980&r2=487981 == --- tomcat/connectors/trunk/jk/native/common/jk_version.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_version.h Sun Dec 17 05:53:14 2006 @@ -26,14 +26,14 @@ /** START OF AREA TO MODIFY BEFORE RELEASING */ #define JK_VERMAJOR 1 #define JK_VERMINOR 2 -#define JK_VERFIX 20 -#define JK_VERSTRING"1.2.20" +#define JK_VERFIX 21 +#define JK_VERSTRING"1.2.21" /* Beta number */ #define JK_VERBETA 0 #define JK_BETASTRING "0" /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */ -#define JK_VERISRELEASE 1 +#define JK_VERISRELEASE 0 #define JK_VERRC0 #define JK_RCSTRING "0" Modified: tomcat/connectors/trunk/jk/native/common/portable.h.sample URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/portable.h.sample?view=diff&rev=487981&r1=487980&r2=487981 == --- tomcat/connectors/trunk/jk/native/common/portable.h.sample (original) +++ tomcat/connectors/trunk/jk/native/common/portable.h.sample Sun Dec 17 05:53:14 2006 @@ -93,4 +93,4 @@ #define USE_SO_SNDTIMEO 1 /* Version number of package */ -#define VERSION "1.2.20" +#define VERSION "1.2.21" Modified: tomcat/connectors/trunk/jk/native/configure.in URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?view=diff&rev=487981&r1=487980&r2=487981 == --- tomcat/connectors/trunk/jk/native/configure.in (original) +++ tomcat/connectors/trunk/jk/native/configure.in Sun Dec 17 05:53:14 2006 @@ -11,7 +11,7 @@ dnl package and version. (synchronization with common/jk_version.h ?) PACKAGE=mod_jk -VERSION=1.2.20 +VERSION=1.2.21 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION}) Modified: tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism?view=diff&rev=487981&r1=487980&r2=487981 == --- tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism (original) +++ tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism Sun Dec 17 05:53:14 2006 @@ -3288,7 +3288,7 @@ ProductIDnone ProductLanguage1033 ProductNameJakarta Isapi Redirector - ProductVersion1.2.20 + ProductVersion1.2.21 ProgressType0install ProgressType1Installing ProgressType2installed Modified: tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc?view=diff&rev=487981&r1=487980&r2=487981 == --- tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc (original) +++ tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc Sun Dec 17 05:53:14 2006 @@ -14,13 +14,13 @@ "specific language governing permissions and " \ "limitations under the License." -#define JK_VERSION_STR "1.2.20" +#define JK_VERS
svn commit: r487982 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sun Dec 17 05:54:10 2006 New Revision: 487982 URL: http://svn.apache.org/viewvc?view=rev&rev=487982 Log: Fix missing format char for worker name in log message. This one was missing since we introduced that message. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diff&rev=487982&r1=487981&r2=487982 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Dec 17 05:54:10 2006 @@ -1108,7 +1108,7 @@ if ((len = ajp_read_fully_from_server(r, l, read_buf, len)) < 0) { jk_log(l, JK_LOG_INFO, - "(%) receiving data from client failed. " + "(%s) receiving data from client failed. " "Connection aborted or network problems", ae->worker->name); JK_TRACE_EXIT(l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r487990 - /tomcat/connectors/trunk/jk/native/common/jk_util.c
Author: rjung Date: Sun Dec 17 06:52:54 2006 New Revision: 487990 URL: http://svn.apache.org/viewvc?view=rev&rev=487990 Log: Use correct windows line endings for log file on WIN32 platform. Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=487990&r1=487989&r2=487990 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Dec 17 06:52:54 2006 @@ -420,7 +420,11 @@ { int rc = 0; /* Need to reserve space for newline and terminating zero byte. */ +#ifdef WIN32 +static int usable_size = HUGE_BUFFER_SIZE-3; +#else static int usable_size = HUGE_BUFFER_SIZE-2; +#endif if (!l || !file || !fmt) { return -1; } @@ -502,6 +506,9 @@ } else { used = usable_size; } +#ifdef WIN32 +buf[used++] = '\r'; +#endif buf[used] = '\n'; buf[used+1] = 0; va_end(args); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r488992 - /tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
Author: rjung Date: Wed Dec 20 01:21:23 2006 New Revision: 488992 URL: http://svn.apache.org/viewvc?view=rev&rev=488992 Log: Fix default values of "retries" in doc. Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diff&rev=488992&r1=488991&r2=488992 == --- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Wed Dec 20 01:21:23 2006 @@ -148,7 +148,7 @@ - + The number of retries that the worker will try in case of error returned from remote Tomcat. If the number of retries set is greater then three (the default value), on each retry after default an extra wait of 100ms will be inserted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r489233 - in /tomcat/site/trunk: docs/download-connectors.html docs/faq/misc.html docs/faq/printer/misc.html xdocs/download-connectors.xml
Author: rjung Date: Wed Dec 20 16:27:48 2006 New Revision: 489233 URL: http://svn.apache.org/viewvc?view=rev&rev=489233 Log: Update tomcat site for JK download 1.2.19 -> 1.2.20. Modified: tomcat/site/trunk/docs/download-connectors.html tomcat/site/trunk/docs/faq/misc.html tomcat/site/trunk/docs/faq/printer/misc.html tomcat/site/trunk/xdocs/download-connectors.xml Modified: tomcat/site/trunk/docs/download-connectors.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?view=diff&rev=489233&r1=489232&r2=489233 == --- tomcat/site/trunk/docs/download-connectors.html (original) +++ tomcat/site/trunk/docs/download-connectors.html Wed Dec 20 16:27:48 2006 @@ -3,16 +3,16 @@ Apache Tomcat - Tomcat Connectors (mod_jk, mod_jk2) Downloads - + - - + + http://tomcat.apache.org/";> - + @@ -23,28 +23,28 @@ http://www.apache.org/";> -http://www.apache.org/images/asf-logo.gif"; align="right" alt="Apache Logo" border="0"/> +http://www.apache.org/images/asf-logo.gif"; /> -http://www.google.com/search"; method="get"> - - - +http://www.google.com/search";> + + + - + - + - + Apache Tomcat @@ -161,11 +161,11 @@ - - + + - + Tomcat Connectors (mod_jk, mod_jk2) Downloads @@ -184,8 +184,8 @@ encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are backup mirrors (at the end of the mirrors list) that should be -available.[if-any logo] - +available.[if-any logo] + [end] @@ -200,7 +200,7 @@ [for backup][backup] (backup)[end] [end] - + @@ -224,18 +224,18 @@ -JK 1.2.19 Source Release tar.gz +JK 1.2.20 Source Release tar.gz -[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.tar.gz.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.20/tomcat-connectors-1.2.20-src.tar.gz.asc";>pgp] -JK 1.2.19 Source Release zip +JK 1.2.20 Source Release zip -[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.zip.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.20/tomcat-connectors-1.2.20-src.zip.asc";>pgp] @@ -292,7 +292,7 @@ - + @@ -301,14 +301,14 @@ - + - + Copyright © 1999-2006, The Apache Software Foundation Modified: tomcat/site/trunk/docs/faq/misc.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/faq/misc.html?view=diff&rev=489233&r1=489232&r2=489233 == --- tomcat/site/trunk/docs/faq/misc.html (original) +++ tomcat/site/trunk/docs/faq/misc.html Wed Dec 20 16:27:48 2006 @@ -1,11 +1,11 @@ -Tomcat FAQ - Miscellaneous Questions +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Tomcat FAQ - Miscellaneous Questions</title><meta value="Tim Funk" name="author"><meta value="[EMAIL PROTECTED]" name="email"><meta value="Yoav Shapira" name="author"><meta value="[EMAIL PROTECTED]" name="email"><style> dt { font-size : larger; font-weight : bold } dd {padding-bottom : 10px;} -http://tomcat.apache.org/";>Apache Tomcathttp://www.apache.org/";>http://www.apache.org/images/asf-logo.gif"; align="right" alt="Apache Logo" border="0">LinksTomcat HomeFAQ HomeContentsBugsClass Not FoundClusteringConnectorsDatabaseDeploymentDevelopmentFDA Validationhttp://wiki.apache.org/tomcat/HowTo";>How do ILinux / UnixOther Operating SystemsLoggingMemoryMetaMiscellaneousMonitoring / Performancehttp://wiki.apache.org/tomcat/UsefulLinks";>Other ResourcesSecurityWhich VersionTomcat User Listhttp://wiki.apa che.org/tomcat/">WikiWindowsTomcat FAQMiscellaneous Questionsprint-friendlyversion -Preface +http://tomcat.apache.org/";>Apache Tomcathttp://www.apache.org/";>http://www.apache.org/images/asf-logo.gif";>LinksTomcat HomeFAQ HomeContentsBugsClass Not FoundClusteringConnectorsDatabaseDeploymentDevelopmentFDA Validationhttp://wiki.apache.org/tomcat/HowTo";>How do ILinux / UnixOther Operating SystemsLoggingMemoryMetaMiscellaneousMonitoring / Performancehttp://wiki.apache.org/tomcat/UsefulLink
svn commit: r489581 - /tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
Author: rjung Date: Fri Dec 22 00:43:15 2006 New Revision: 489581 URL: http://svn.apache.org/viewvc?view=rev&rev=489581 Log: Another fix for the changed retries default value (docs). Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diff&rev=489581&r1=489580&r2=489581 == --- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Fri Dec 22 00:43:15 2006 @@ -150,7 +150,7 @@ The number of retries that the worker will try in case of error returned from remote -Tomcat. If the number of retries set is greater then three (the default value), on +Tomcat. If the number of retries set is greater than two (the default value), on each retry after default an extra wait of 100ms will be inserted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r490578 - /tomcat/connectors/trunk/jk/native/common/jk_global.h
Author: rjung Date: Wed Dec 27 14:25:28 2006 New Revision: 490578 URL: http://svn.apache.org/viewvc?view=rev&rev=490578 Log: Fix global defines for Netware. Thanks to Guenther. Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=490578&r1=490577&r2=490578 == --- tomcat/connectors/trunk/jk/native/common/jk_global.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_global.h Wed Dec 27 14:25:28 2006 @@ -290,7 +290,7 @@ typedef unsigned __int64 jk_uint64_t; #define JK_UINT64_T_FMT "I64u" #define JK_UINT64_T_HEX_FMT "I64x" -#elif defined(AS400) +#elif defined(AS400) || defined(NETWARE) typedef unsigned int jk_uint32_t; #define JK_UINT32_T_FMT "u" #define JK_UINT32_T_HEX_FMT "x" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]