cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r834761 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
Date Wed, 11 Nov 2009 04:34:13 GMT
Author: dkulp
Date: Wed Nov 11 04:34:13 2009
New Revision: 834761

URL: http://svn.apache.org/viewvc?rev=834761&view=rev
Log:
[CXF-1850] Fix shutdown of multiobserver

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java?rev=834761&r1=834760&r2=834761&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java Wed Nov 11 04:34:13
2009
@@ -138,15 +138,17 @@
         if (mgr != null) {
             mgr.stopServer(this);
         }
-        
+
         MessageObserver mo = getDestination().getMessageObserver();
         if (mo instanceof MultipleEndpointObserver) {
-            ((MultipleEndpointObserver) mo).getEndpoints().remove(endpoint);
-        } else {
-            getDestination().setMessageObserver(null);
-            getDestination().shutdown();
+            ((MultipleEndpointObserver)mo).getEndpoints().remove(endpoint);
+            if (!((MultipleEndpointObserver)mo).getEndpoints().isEmpty()) {
+                return;
+            }
         }
-        
+        getDestination().setMessageObserver(null);
+        getDestination().shutdown();
+
         if (null != serverRegistry) {
             LOG.fine("unregister the server to serverRegistry ");
             serverRegistry.unregister(this);



Mime
View raw message