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 8D428DE3F
for ;
Tue, 18 Sep 2012 09:43:32 +0000 (UTC)
Received: (qmail 25584 invoked by uid 500); 18 Sep 2012 09:43:31 -0000
Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org
Received: (qmail 25504 invoked by uid 500); 18 Sep 2012 09:43:30 -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 25479 invoked by uid 99); 18 Sep 2012 09:43:30 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 09:43:30 +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:43:28 +0000
Received: from eris.apache.org (localhost [127.0.0.1])
by eris.apache.org (Postfix) with ESMTP id 788EA2388900
for ; Tue, 18 Sep 2012 09:42:34 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: svn commit: r1387072 - in /tomcat/trunk:
java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
webapps/docs/config/cluster-interceptor.xml
Date: Tue, 18 Sep 2012 09:42:34 -0000
To: dev@tomcat.apache.org
From: kfujino@apache.org
X-Mailer: svnmailer-1.0.8-patched
Message-Id: <20120918094234.788EA2388900@eris.apache.org>
X-Virus-Checked: Checked by ClamAV on apache.org
Author: kfujino
Date: Tue Sep 18 09:42:33 2012
New Revision: 1387072
URL: http://svn.apache.org/viewvc?rev=1387072&view=rev
Log:
Fix a behavior of TcpPingInterceptor#useThread.
If set to false, ping thread is never started.
Modified:
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
tomcat/trunk/webapps/docs/config/cluster-interceptor.xml
Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1387072&r1=1387071&r2=1387072&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java Tue Sep 18 09:42:33 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/trunk/webapps/docs/config/cluster-interceptor.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-interceptor.xml?rev=1387072&r1=1387071&r2=1387072&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/cluster-interceptor.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-interceptor.xml Tue Sep 18 09:42:33 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