Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 95421 invoked from network); 14 Oct 2007 03:05:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Oct 2007 03:05:11 -0000 Received: (qmail 50544 invoked by uid 500); 14 Oct 2007 03:04:59 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 50485 invoked by uid 500); 14 Oct 2007 03:04:59 -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 50476 invoked by uid 99); 14 Oct 2007 03:04:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2007 20:04:58 -0700 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; Sun, 14 Oct 2007 03:05:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 21AC51A9832; Sat, 13 Oct 2007 20:04:20 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r584484 - in /incubator/cxf/trunk: rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ systests/src/test/java/org/apache/cxf/systest/http_jetty/ Date: Sun, 14 Oct 2007 03:04:19 -0000 To: cxf-commits@incubator.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071014030420.21AC51A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Sat Oct 13 20:04:19 2007 New Revision: 584484 URL: http://svn.apache.org/viewvc?rev=584484&view=rev Log: CXF-1110 Fixed the issue of the Jetty default handler configuration blocking the CXF endpoint request Modified: incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml 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=584484&r1=584483&r2=584484&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 Oct 13 20:04:19 2007 @@ -40,6 +40,7 @@ import org.mortbay.jetty.Server; import org.mortbay.jetty.handler.ContextHandler; import org.mortbay.jetty.handler.ContextHandlerCollection; +import org.mortbay.jetty.handler.DefaultHandler; import org.mortbay.jetty.handler.HandlerList; import org.mortbay.jetty.nio.SelectChannelConnector; import org.mortbay.jetty.security.SslSocketConnector; @@ -246,6 +247,7 @@ */ public synchronized void addServant(URL url, JettyHTTPHandler handler) { if (server == null) { + DefaultHandler defaultHandler = null; // create a new jetty server instance if there is no server there server = new Server(); if (connector == null) { @@ -255,12 +257,21 @@ if (handlers != null && handlers.size() > 0) { HandlerList handlerList = new HandlerList(); for (Handler h : handlers) { - handlerList.addHandler(h); + // filting the jetty default handler + // which should not be added at this point + if (h instanceof DefaultHandler) { + defaultHandler = (DefaultHandler) h; + } else { + handlerList.addHandler(h); + } } server.addHandler(handlerList); } contexts = new ContextHandlerCollection(); - server.addHandler(contexts); + server.addHandler(contexts); + if (defaultHandler != null) { + server.addHandler(defaultHandler); + } try { server.start(); AbstractConnector aconn = (AbstractConnector) connector; Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=584484&r1=584483&r2=584484&view=diff ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java Sat Oct 13 20:04:19 2007 @@ -133,7 +133,9 @@ @Test public void testServerUpDownUp() throws Exception { setUpBus(); - launchService(); + launchService(); + getTestHtml(); + invokeService(); shutdownService(); launchService(); Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml?rev=584484&r1=584483&r2=584484&view=diff ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml Sat Oct 13 20:04:19 2007 @@ -42,6 +42,7 @@ +