You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2008/09/22 09:30:07 UTC

svn commit: r697689 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c native/common/jk_ajp_common.h native/common/jk_status.c native/common/jk_util.c native/common/jk_util.h xdocs/miscellaneous/changelog.xml xdocs/reference/workers.xml

Author: mturk
Date: Mon Sep 22 00:30:07 2008
New Revision: 697689

URL: http://svn.apache.org/viewvc?rev=697689&view=rev
Log:
Rename connection_keepalive to connection_ping_interval as suggested by Rainer

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_status.c
    tomcat/connectors/trunk/jk/native/common/jk_util.c
    tomcat/connectors/trunk/jk/native/common/jk_util.h
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
    tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

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=697689&r1=697688&r2=697689&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Mon Sep 22 00:30:07 2008
@@ -2491,8 +2491,8 @@
             jk_get_worker_reply_timeout(props, p->name,
                                         AJP_DEF_REPLY_TIMEOUT);
 
-        p->connection_keepalive =
-            jk_get_worker_connection_keepalive(props, p->name, 0);
+        p->conn_ping_interval =
+            jk_get_worker_conn_ping_interval(props, p->name, 0);
 
         p->recovery_opts =
             jk_get_worker_recovery_opts(props, p->name,
@@ -2841,7 +2841,7 @@
 
         /* Do connection pool maintenance only if timeouts or keepalives are set */
         if (aw->cache_timeout <= 0 &&
-            aw->connection_keepalive <= 0) {
+            aw->conn_ping_interval <= 0) {
             /* Nothing to do. */
             JK_TRACE_EXIT(l);
             return JK_TRUE;
@@ -2887,12 +2887,12 @@
                 }
             }
             /* Handle worker connection keepalive */
-            if (aw->connection_keepalive > 0 && aw->ping_timeout > 0) {
+            if (aw->conn_ping_interval > 0 && aw->ping_timeout > 0) {
                 for (i = (int)aw->ep_cache_sz - 1; i >= 0; i--) {
                     /* Skip the closed sockets */
                     if (aw->ep_cache[i] && IS_VALID_SOCKET(aw->ep_cache[i]->sd)) {
                         int elapsed = (int)difftime(now, aw->ep_cache[i]->last_access);
-                        if (elapsed > aw->connection_keepalive) {
+                        if (elapsed > aw->conn_ping_interval) {
                             k++;
                             /* handle cping/cpong.
                              */

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h?rev=697689&r1=697688&r2=697689&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h Mon Sep 22 00:30:07 2008
@@ -311,7 +311,7 @@
     int connect_timeout;      /* connect cping/cpong delay in ms (0 means disabled)  */
     int reply_timeout;        /* reply timeout delay in ms (0 means disabled) */
     int prepost_timeout;      /* before sending a request cping/cpong timeout delay in ms (0 means disabled) */
-    int connection_keepalive; /* interval for sending cping packets on
+    int conn_ping_interval;   /* interval for sending cping packets on
                                * unused connection */
     int ping_timeout;         /* generic cping/cpong timeout. Used for keepalive packets or
                                * as default for boolean valued connect and prepost timeouts.

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=697689&r1=697688&r2=697689&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Mon Sep 22 00:30:07 2008
@@ -112,7 +112,7 @@
 #define JK_STATUS_ARG_AJP_RETRIES          "var"
 #define JK_STATUS_ARG_AJP_REC_OPTS         "varo"
 #define JK_STATUS_ARG_AJP_MAX_PK_SZ        "vamps"
-#define JK_STATUS_ARG_AJP_CKEEPALIVE       "vacka"
+#define JK_STATUS_ARG_AJP_CPING_INT        "vacpi"
 
 #define JK_STATUS_ARG_AJP_TEXT_CACHE_TO    "Connection Pool Timeout"
 #define JK_STATUS_ARG_AJP_TEXT_PING_TO     "Ping Timeout"
@@ -122,7 +122,7 @@
 #define JK_STATUS_ARG_AJP_TEXT_RETRIES     "Retries"
 #define JK_STATUS_ARG_AJP_TEXT_REC_OPTS    "Recovery Options"
 #define JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ   "Max Packet Size"
-#define JK_STATUS_ARG_AJP_TEXT_CKEEPALIVE  "Connection KeepAlive Interval"
+#define JK_STATUS_ARG_AJP_TEXT_CPING_INT   "Connection Ping Interval"
 
 #define JK_STATUS_CMD_UNKNOWN              (0)
 #define JK_STATUS_CMD_LIST                 (1)
@@ -1730,7 +1730,7 @@
         jk_print_xml_att_int(s, off+2, "connect_timeout", aw->connect_timeout);
         jk_print_xml_att_int(s, off+2, "prepost_timeout", aw->prepost_timeout);
         jk_print_xml_att_int(s, off+2, "reply_timeout", aw->reply_timeout);
-        jk_print_xml_att_int(s, off+2, "connection_keepalive", aw->connection_keepalive);
+        jk_print_xml_att_int(s, off+2, "connection_ping_interval", aw->conn_ping_interval);
         jk_print_xml_att_int(s, off+2, "retries", aw->retries);
         jk_print_xml_att_uint(s, off+2, "recovery_options", aw->recovery_opts);
         jk_print_xml_att_uint(s, off+2, "max_packet_size", aw->max_packet_size);
@@ -1788,7 +1788,7 @@
         jk_printf(s, " prepost_timeout=%d", aw->prepost_timeout);
         jk_printf(s, " reply_timeout=%d", aw->reply_timeout);
         jk_printf(s, " retries=%d", aw->retries);
-        jk_printf(s, " connection_keepalive=%d", aw->connection_keepalive);
+        jk_printf(s, " connection_keepalive=%d", aw->conn_ping_interval);
         jk_printf(s, " recovery_options=%u", aw->recovery_opts);
         jk_printf(s, " max_packet_size=%u", aw->max_packet_size);
         if (lb) {
@@ -1842,7 +1842,7 @@
         jk_print_prop_att_int(s, w, ajp_name, "prepost_timeout", aw->prepost_timeout);
         jk_print_prop_att_int(s, w, ajp_name, "reply_timeout", aw->reply_timeout);
         jk_print_prop_att_int(s, w, ajp_name, "retries", aw->retries);
-        jk_print_prop_att_int(s, w, ajp_name, "connection_keepalive", aw->connection_keepalive);
+        jk_print_prop_att_int(s, w, ajp_name, "connection_ping_interval", aw->conn_ping_interval);
         jk_print_prop_att_uint(s, w, ajp_name, "recovery_options", aw->recovery_opts);
         jk_print_prop_att_uint(s, w, ajp_name, "max_packet_size", aw->max_packet_size);
         if (lb) {
@@ -2224,7 +2224,7 @@
                 jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_PREPOST_TO, "\">", JK_STATUS_ARG_AJP_TEXT_PREPOST_TO, "</option>\n", NULL);
                 jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_REPLY_TO, "\">", JK_STATUS_ARG_AJP_TEXT_REPLY_TO, "</option>\n", NULL);
                 jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_RETRIES, "\">", JK_STATUS_ARG_AJP_TEXT_RETRIES, "</option>\n", NULL);
-                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_CKEEPALIVE, "\">", JK_STATUS_ARG_AJP_TEXT_CKEEPALIVE, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_CPING_INT, "\">", JK_STATUS_ARG_AJP_TEXT_CPING_INT, "</option>\n", NULL);
                 jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_REC_OPTS, "\">", JK_STATUS_ARG_AJP_TEXT_REC_OPTS, "</option>\n", NULL);
                 jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_MAX_PK_SZ, "\">", JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ, "</option>\n", NULL);
                 jk_puts(s, "</select></td><td><input type=\"submit\" value=\"Go\"/></tr></table></form>\n");
@@ -2591,10 +2591,10 @@
             ":</td><td><input name=\"",
             JK_STATUS_ARG_AJP_RETRIES, "\" type=\"text\" ", NULL);
     jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->retries);
-    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_CKEEPALIVE,
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_CPING_INT,
             ":</td><td><input name=\"",
-            JK_STATUS_ARG_AJP_CKEEPALIVE, "\" type=\"text\" ", NULL);
-    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->connection_keepalive);
+            JK_STATUS_ARG_AJP_CPING_INT, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->conn_ping_interval);
     jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_REC_OPTS,
             ":</td><td><input name=\"",
             JK_STATUS_ARG_AJP_REC_OPTS, "\" type=\"text\" ", NULL);
@@ -2655,8 +2655,8 @@
             aname=JK_STATUS_ARG_AJP_TEXT_REPLY_TO;
         else if (!strcmp(attribute, JK_STATUS_ARG_AJP_RETRIES))
             aname=JK_STATUS_ARG_AJP_TEXT_RETRIES;
-        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CKEEPALIVE))
-            aname=JK_STATUS_ARG_AJP_TEXT_CKEEPALIVE;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CPING_INT))
+            aname=JK_STATUS_ARG_AJP_TEXT_CPING_INT;
         else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS))
             aname=JK_STATUS_ARG_AJP_TEXT_REC_OPTS;
         else if (!strcmp(attribute, JK_STATUS_ARG_AJP_MAX_PK_SZ))
@@ -2766,9 +2766,9 @@
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
                 jk_printf(s, "value=\"%d\"/>\n", aw->retries);
             }
-            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CKEEPALIVE)) {
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CPING_INT)) {
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
-                jk_printf(s, "value=\"%d\"/>\n", aw->connection_keepalive);
+                jk_printf(s, "value=\"%d\"/>\n", aw->conn_ping_interval);
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS)) {
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
@@ -3065,8 +3065,8 @@
     if (set_int_if_changed(p, aw->name, "retries", JK_STATUS_ARG_AJP_RETRIES,
                            1, INT_MAX, &aw->retries, lb_name, l))
         rc |= 4;
-    if (set_int_if_changed(p, aw->name, "connection_keepalive", JK_STATUS_ARG_AJP_CKEEPALIVE,
-                           1, INT_MAX, &aw->connection_keepalive, lb_name, l))
+    if (set_int_if_changed(p, aw->name, "connection_ping_interval", JK_STATUS_ARG_AJP_CPING_INT,
+                           1, INT_MAX, &aw->conn_ping_interval, lb_name, l))
         rc |= 4;
     if (set_uint_if_changed(p, aw->name, "recovery_options", JK_STATUS_ARG_AJP_REC_OPTS,
                            0, INT_MAX, &aw->recovery_opts, lb_name, l))
@@ -3130,8 +3130,8 @@
             aname=JK_STATUS_ARG_AJP_TEXT_REPLY_TO;
         else if (!strcmp(attribute, JK_STATUS_ARG_AJP_RETRIES))
             aname=JK_STATUS_ARG_AJP_TEXT_RETRIES;
-        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CKEEPALIVE))
-            aname=JK_STATUS_ARG_AJP_TEXT_CKEEPALIVE;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CPING_INT))
+            aname=JK_STATUS_ARG_AJP_TEXT_CPING_INT;
         else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS))
             aname=JK_STATUS_ARG_AJP_TEXT_REC_OPTS;
         else if (!strcmp(attribute, JK_STATUS_ARG_AJP_MAX_PK_SZ))
@@ -3220,9 +3220,9 @@
                                        1, INT_MAX, &aw->retries, name, l))
                     sync_needed = JK_TRUE;
             }
-            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CKEEPALIVE)) {
-                if (set_int_if_changed(p, aw->name, "connection_keepalive", vname,
-                                       1, INT_MAX, &aw->connection_keepalive, name, l))
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CPING_INT)) {
+                if (set_int_if_changed(p, aw->name, "connection_ping_interval", vname,
+                                       1, INT_MAX, &aw->conn_ping_interval, name, l))
                     sync_needed = JK_TRUE;
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS)) {

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?rev=697689&r1=697688&r2=697689&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Mon Sep 22 00:30:07 2008
@@ -60,7 +60,7 @@
 #define PING_TIMEOUT_OF_WORKER      ("ping_timeout")
 #define SOCKET_BUFFER_OF_WORKER     ("socket_buffer")
 #define SOCKET_KEEPALIVE_OF_WORKER  ("socket_keepalive")
-#define CONNECTION_KEEPALIVE_OF_WORKER  ("connection_keepalive")
+#define CONN_PING_INTERVAL_OF_WORKER  ("connection_ping_interval")
 #define RECYCLE_TIMEOUT_DEPRECATED  ("recycle_timeout")
 #define LOAD_FACTOR_OF_WORKER       ("lbfactor")
 #define DISTANCE_OF_WORKER          ("distance")
@@ -176,7 +176,7 @@
     SOCKET_TIMEOUT_OF_WORKER,
     SOCKET_BUFFER_OF_WORKER,
     SOCKET_KEEPALIVE_OF_WORKER,
-    CONNECTION_KEEPALIVE_OF_WORKER,
+    CONN_PING_INTERVAL_OF_WORKER,
     RECYCLE_TIMEOUT_DEPRECATED,
     LOAD_FACTOR_OF_WORKER,
     STICKY_SESSION,
@@ -261,7 +261,7 @@
     SOCKET_TIMEOUT_OF_WORKER,
     SOCKET_BUFFER_OF_WORKER,
     SOCKET_KEEPALIVE_OF_WORKER,
-    CONNECTION_KEEPALIVE_OF_WORKER,
+    CONN_PING_INTERVAL_OF_WORKER,
     RECYCLE_TIMEOUT_DEPRECATED,
     LOAD_FACTOR_OF_WORKER,
     DISTANCE_OF_WORKER,
@@ -953,7 +953,7 @@
     return jk_map_get_bool(m, buf, def);
 }
 
-int jk_get_worker_connection_keepalive(jk_map_t *m, const char *wname, int def)
+int jk_get_worker_conn_ping_interval(jk_map_t *m, const char *wname, int def)
 {
     char buf[1024];
 
@@ -961,7 +961,7 @@
         return -1;
     }
 
-    MAKE_WORKER_PARAM(CONNECTION_KEEPALIVE_OF_WORKER);
+    MAKE_WORKER_PARAM(CONN_PING_INTERVAL_OF_WORKER);
 
     return jk_map_get_int(m, buf, def);
 }

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?rev=697689&r1=697688&r2=697689&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.h Mon Sep 22 00:30:07 2008
@@ -74,7 +74,7 @@
 
 int jk_get_worker_socket_keepalive(jk_map_t *m, const char *wname, int def);
 
-int jk_get_worker_connection_keepalive(jk_map_t *m, const char *wname, int def);
+int jk_get_worker_conn_ping_interval(jk_map_t *m, const char *wname, int def);
 
 int jk_get_worker_cache_timeout(jk_map_t *m, const char *wname, int def);
 

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=697689&r1=697688&r2=697689&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Mon Sep 22 00:30:07 2008
@@ -49,7 +49,7 @@
         This allows filter chain to work properly. (mturk)
       </fix>
       <update>
-        Added connection_keepalive directive. (mturk)
+        Added connection_ping_interval and ping_timeout directives. (mturk)
       </update>
       <fix>
         Apache: Use correct ld flags provided by apxs when building module.

Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?rev=697689&r1=697688&r2=697689&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Mon Sep 22 00:30:07 2008
@@ -260,7 +260,7 @@
 </p>
 </directive>
 
-<directive name="connection_keepalive" default="0" required="false">
+<directive name="connection_ping_timeout" default="0" required="false">
 Connections idle for longer than this interval in seconds are probed by
 CPING packets whether they still work. If set to zero (default),
 no such probes will be done.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org