Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ECE8BDE50 for ; Tue, 18 Sep 2012 09:46:11 +0000 (UTC) Received: (qmail 31173 invoked by uid 500); 18 Sep 2012 09:46:11 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 30940 invoked by uid 500); 18 Sep 2012 09:46:10 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 30916 invoked by uid 99); 18 Sep 2012 09:46:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 09:46:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 09:46:07 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0F39323888E4 for ; Tue, 18 Sep 2012 09:45:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1387073 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java webapps/docs/changelog.xml webapps/docs/config/cluster-interceptor.xml Date: Tue, 18 Sep 2012 09:45:17 -0000 To: dev@tomcat.apache.org From: kfujino@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120918094518.0F39323888E4@eris.apache.org> Author: kfujino Date: Tue Sep 18 09:45:17 2012 New Revision: 1387073 URL: http://svn.apache.org/viewvc?rev=1387073&view=rev Log: Fix a behavior of TcpPingInterceptor#useThread. If set to false, ping thread is never started. Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-interceptor.xml Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1387073&r1=1387072&r2=1387073&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java Tue Sep 18 09:45:17 2012 @@ -64,8 +64,8 @@ public class TcpPingInterceptor extends @Override public synchronized void start(int svc) throws ChannelException { super.start(svc); - running = true; - if ( thread == null ) { + if ( thread == null && useThread) { + running = true; thread = new PingThread(); thread.setDaemon(true); thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1)); @@ -86,9 +86,11 @@ public class TcpPingInterceptor extends @Override public void stop(int svc) throws ChannelException { - running = false; - if ( thread != null ) thread.interrupt(); - thread = null; + if ( thread != null ) { + running = false; + thread.interrupt(); + thread = null; + } super.stop(svc); } Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1387073&r1=1387072&r2=1387073&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Sep 18 09:45:17 2012 @@ -100,6 +100,10 @@ Make the cluster members and the cluster deployer associated with the cluster accessible via JMX. (markt) + + Fix a behavior of TcpPingInterceptor#useThread. If set to false, ping + thread is never started. (kfujino) + Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-interceptor.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-interceptor.xml?rev=1387073&r1=1387072&r2=1387073&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-interceptor.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-interceptor.xml Tue Sep 18 09:45:17 2012 @@ -55,6 +55,7 @@
  • org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor
  • org.apache.catalina.tribes.group.interceptors.FragmentationInterceptor
  • org.apache.catalina.tribes.group.interceptors.GzipInterceptor
  • +
  • org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor
  • @@ -143,6 +144,20 @@
    + + + + If useThread == true, defines the interval of sending a ping message. + default is 1000 ms. + + + Flag of whether to start a thread for sending a ping message. + If set to true, this interceptor will start a local thread for sending a ping message. + if set to false, channel heartbeat will send a ping message. + default is false. + + + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org