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 1FD2EDAF0 for ; Tue, 12 Feb 2013 18:22:21 +0000 (UTC) Received: (qmail 54947 invoked by uid 500); 12 Feb 2013 18:22:20 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 54887 invoked by uid 500); 12 Feb 2013 18:22:20 -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 54872 invoked by uid 99); 12 Feb 2013 18:22:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 18:22:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of knst.kolinko@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 18:22:11 +0000 Received: by mail-ob0-f176.google.com with SMTP id v19so383705obq.7 for ; Tue, 12 Feb 2013 10:21:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=axej0e1O+q/02dAhjWwhe9D24DjlU9i0Bycf/raZCF4=; b=0NzVmT7k2WXatMSj3+FiBIMELm8dVVcJBkqtyvrOolWTI26KUJS39Vh69HD6gOxbn/ q8f2Dpb0bMwgWjnJCWsE7Kk2+PpomxJhiNy7su1ECK4pjtCNtwWxW96+1Otl9PMuCaxI xtX5bCamNnWHM7tZqPHC+z7GOtTow8TogcqJ2GYUM0eEcvrj/JpjVwhReQQU2onvuF9F Rj0EXz11eVGdhqbPvs4YXt8UKG2FNrAnd34c2qWESdhGqBH4WYDqqtVwjUiGZPeYLVr5 BdcTZa4UrI13AwgmeJSQUIWbU0VzKpLwhPPyUgGsByk0quQFOVLTliS2WO0CiOzF3F7x aw7A== MIME-Version: 1.0 X-Received: by 10.182.23.101 with SMTP id l5mr14228436obf.16.1360693310651; Tue, 12 Feb 2013 10:21:50 -0800 (PST) Received: by 10.76.142.7 with HTTP; Tue, 12 Feb 2013 10:21:50 -0800 (PST) In-Reply-To: <20130212161341.097042388978@eris.apache.org> References: <20130212161341.097042388978@eris.apache.org> Date: Tue, 12 Feb 2013 22:21:50 +0400 Message-ID: Subject: Re: svn commit: r1445231 - in /tomcat/trunk/test/org/apache/tomcat/websocket: TestWsWebSocketContainer.java TesterEchoServer.java From: Konstantin Kolinko To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 2013/2/12 : > Author: rjung > Date: Tue Feb 12 16:13:40 2013 > New Revision: 1445231 > > URL: http://svn.apache.org/r1445231 > Log: > Stop ServerContainerImpl in contextDestroyed > by basing the test listeners on WsListener. > > ServerContainerImpl.stop() is protected so not > directly accessable. > > stop() needs to be called in order to stop > websocket timeout threads. > > Modified: > tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java > tomcat/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java > > Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java > URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1445231&r1=1445230&r2=1445231&view=diff > ============================================================================== > --- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java (original) > +++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java Tue Feb 12 16:13:40 2013 > @@ -403,7 +403,7 @@ public class TestWsWebSocketContainer ex > } > > > - public static class BlockingConfig implements ServletContextListener { > + public static class BlockingConfig extends WsListener { > > public static final String PATH = "/block"; > > @@ -415,7 +415,7 @@ public class TestWsWebSocketContainer ex > > @Override > public void contextDestroyed(ServletContextEvent sce) { > - // NO-OP > + super.contextDestroyed(sce); > } > } > > @@ -524,14 +524,14 @@ public class TestWsWebSocketContainer ex > } > > > - public static class ConstantTxConfig implements ServletContextListener { > + public static class ConstantTxConfig extends WsListener { > > private static final String PATH = "/test"; > > @Override > public void contextInitialized(ServletContextEvent sce) { > + super.contextInitialized(sce); Shoudn't the other two listeners changed by this commit call super.contextInitialized(sce); as well? a) TestWsWebSocketContainer.BlockingConfig b) TesterEchoServer.Config If not, maybe add a comment? > ServerContainerImpl sc = ServerContainerImpl.getServerContainer(); > - sc.setServletContext(sce.getServletContext()); > try { > sc.publishServer(ConstantTxEndpoint.class, PATH, > DefaultServerConfiguration.class); > @@ -545,7 +545,7 @@ public class TestWsWebSocketContainer ex > > @Override > public void contextDestroyed(ServletContextEvent sce) { > - // NO-OP > + super.contextDestroyed(sce); > } > } > } > > Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java > URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java?rev=1445231&r1=1445230&r2=1445231&view=diff > ============================================================================== > --- tomcat/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java (original) > +++ tomcat/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java Tue Feb 12 16:13:40 2013 > @@ -25,10 +25,11 @@ import javax.websocket.Session; > import javax.websocket.WebSocketMessage; > > import org.apache.tomcat.websocket.server.ServerContainerImpl; > +import org.apache.tomcat.websocket.server.WsListener; > > public class TesterEchoServer { > > - public static class Config implements ServletContextListener { > + public static class Config extends WsListener { > > public static final String PATH_ASYNC = "/echoAsync"; > public static final String PATH_BASIC = "/echoBasic"; > @@ -43,7 +44,7 @@ public class TesterEchoServer { > > @Override > public void contextDestroyed(ServletContextEvent sce) { > - // NO-OP > + super.contextDestroyed(sce); > } > } > > @@ -106,4 +107,4 @@ public class TesterEchoServer { > } > } > } > -} > \ No newline at end of file > +} > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org