cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r585007 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ systests/src/test/java/org/apache/cxf/systest/http_jetty/
Date Tue, 16 Oct 2007 02:37:06 GMT
Author: dkulp
Date: Mon Oct 15 19:37:04 2007
New Revision: 585007

URL: http://svn.apache.org/viewvc?rev=585007&view=rev
Log:
Merged revisions 584484 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r584484 | ningjiang | 2007-10-13 23:04:19 -0400 (Sat, 13 Oct 2007) | 1 line
  
  CXF-1110 Fixed the issue of the Jetty default handler configuration blocking the CXF endpoint
request
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=585007&r1=585006&r2=585007&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Mon Oct 15 19:37:04 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/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=585007&r1=585006&r2=585007&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
Mon Oct 15 19:37:04 2007
@@ -133,7 +133,9 @@
     @Test
     public void testServerUpDownUp() throws Exception {        
         setUpBus();
-        launchService();
+        launchService();           
+        getTestHtml();
+        invokeService();        
         shutdownService();
 
         launchService();

Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml?rev=585007&r1=585006&r2=585007&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml
Mon Oct 15 19:37:04 2007
@@ -42,6 +42,7 @@
       </bean>
      </property>
     </bean>
+     <bean class="org.mortbay.jetty.handler.DefaultHandler"/>
    </httpj:handlers>
   </httpj:engine>
  </httpj:engine-factory>



Mime
View raw message