You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/07/09 23:02:50 UTC

svn commit: r1359389 - in /cxf/branches/2.5.x-fixes: rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ rt/transports/http/src/main/java/org/apache/cxf/transport/http/ systests/transports/src/test/java/org/apache/cxf/systest/se...

Author: dkulp
Date: Mon Jul  9 21:02:50 2012
New Revision: 1359389

URL: http://svn.apache.org/viewvc?rev=1359389&view=rev
Log:
Merged revisions 1359380 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1359380 | dkulp | 2012-07-09 16:29:12 -0400 (Mon, 09 Jul 2012) | 11 lines

  Merged revisions 1359317 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1359317 | dkulp | 2012-07-09 13:59:55 -0400 (Mon, 09 Jul 2012) | 3 lines

    [CXF-4407] More fixes to make sure we get a 404 and not a 500 after a
    server.stop().

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
    cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=1359389&r1=1359388&r2=1359389&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java (original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java Mon Jul  9 21:02:50 2012
@@ -161,6 +161,7 @@ public class JettyHTTPDestination extend
      * Activate receipt of incoming messages.
      */
     protected void activate() {
+        super.activate();
         LOG.log(Level.FINE, "Activating receipt of incoming messages");
         URL url = null;
         try {
@@ -176,6 +177,7 @@ public class JettyHTTPDestination extend
      * Deactivate receipt of incoming messages.
      */
     protected void deactivate() {
+        super.deactivate();
         LOG.log(Level.FINE, "Deactivating receipt of incoming messages");
         engine.removeServant(nurl);   
     }   

Modified: cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1359389&r1=1359388&r2=1359389&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Mon Jul  9 21:02:50 2012
@@ -789,11 +789,27 @@ public abstract class AbstractHTTPDestin
     }
 
     @Override
+    protected void activate() {
+        synchronized (this) {
+            if (registry != null) {
+                registry.addDestination(this);
+            }
+        }
+    }
+    @Override
+    protected void deactivate() {
+        synchronized (this) {
+            if (registry != null) {
+                registry.removeDestination(path);
+            }
+        }
+    }
+    
+    @Override
     public void shutdown() {
         synchronized (this) {
             if (registry != null) {
                 registry.removeDestination(path);
-                releaseRegistry();
             }
         }
         super.shutdown();

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java?rev=1359389&r1=1359388&r2=1359389&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java Mon Jul  9 21:02:50 2012
@@ -101,6 +101,8 @@ public class NoSpringServletClientTest e
             fail("Expect Exception here.");
         } catch (Exception ex) {
             // do nothing here
+            assertTrue(ex.getCause() instanceof java.io.IOException);
+            assertTrue(ex.getCause().getMessage().contains("404"));
         }
         startServer();
         testHelloService();
@@ -110,7 +112,6 @@ public class NoSpringServletClientTest e
         ServerRegistry reg = serverBus.getExtension(ServerRegistry.class);
         List<Server> servers = reg.getServers();
         for (Server serv : servers) {
-            System.out.println("expect to get a server here!");
             serv.stop();
         }
     }