Author: dkulp Date: Mon Jul 9 21:07:34 2012 New Revision: 1359396 URL: http://svn.apache.org/viewvc?rev=1359396&view=rev Log: Merged revisions 1359389 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
........ r1359389 | dkulp | 2012-07-09 17:02:50 -0400 (Mon, 09 Jul 2012) | 19 lines 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.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java cxf/branches/2.4.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java Modified: cxf/branches/2.4.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.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=1359396&r1=1359395&r2=1359396&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java (original) +++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java Mon Jul 9 21:07:34 2012 @@ -159,6 +159,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 { @@ -174,6 +175,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.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1359396&r1=1359395&r2=1359396&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original) +++ cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Mon Jul 9 21:07:34 2012 @@ -768,11 +768,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.4.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java?rev=1359396&r1=1359395&r2=1359396&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java (original) +++ cxf/branches/2.4.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java Mon Jul 9 21:07:34 2012 @@ -100,6 +100,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(); @@ -109,7 +111,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(); } }
