Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 85256 invoked from network); 1 Dec 2007 09:24:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2007 09:24:15 -0000 Received: (qmail 55949 invoked by uid 500); 1 Dec 2007 09:24:03 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 55907 invoked by uid 500); 1 Dec 2007 09:24:03 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 55897 invoked by uid 99); 1 Dec 2007 09:24:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Dec 2007 01:24:02 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Dec 2007 09:24:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0C0B91A9832; Sat, 1 Dec 2007 01:23:52 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r600064 - /incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java Date: Sat, 01 Dec 2007 09:23:51 -0000 To: cxf-commits@incubator.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071201092352.0C0B91A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Sat Dec 1 01:23:50 2007 New Revision: 600064 URL: http://svn.apache.org/viewvc?rev=600064&view=rev Log: CXF-1236 Fixed the warning message of the JettyHTTPServerEngine Modified: incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java Modified: incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=600064&r1=600063&r2=600064&view=diff ============================================================================== --- incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java (original) +++ incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java Sat Dec 1 01:23:50 2007 @@ -354,17 +354,19 @@ */ public synchronized void removeServant(URL url) { - String contextName = HttpUriMapper.getContextName(url.getPath()); - + final String contextName = HttpUriMapper.getContextName(url.getPath()); + final String smap = HttpUriMapper.getResourceBase(url.getPath()); boolean found = false; - // REVISIT:After a stop(), the server is null, and therefore this - // operation shouldn't find a handler - if (server != null) { + + if (server != null && server.isRunning()) { for (Handler handler : contexts.getChildHandlersByClass(ContextHandler.class)) { - ContextHandler contextHandler = null; + ContextHandler contextHandler = null; if (handler instanceof ContextHandler) { contextHandler = (ContextHandler) handler; - if (contextName.equals(contextHandler.getContextPath())) { + Handler jh = contextHandler.getHandler(); + if (jh instanceof JettyHTTPHandler + && contextName.equals(contextHandler.getContextPath()) + && ((JettyHTTPHandler)jh).getName().equals(smap)) { try { contexts.removeHandler(handler); handler.stop(); @@ -373,9 +375,9 @@ LOG.log(Level.WARNING, "REMOVE_HANDLER_FAILED_MSG", new Object[] {ex.getMessage()}); } - - } - found = true; + found = true; + break; + } } } } @@ -384,12 +386,7 @@ } --servantCount; - /* Bug in Jetty, we cannot do this. If we restart later, data goes off - * someplace unknown - if (servantCount == 0) { - server.removeListener(listener); - } - */ + } /**