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 2011/08/03 21:10:52 UTC

svn commit: r1153616 - in /cxf/branches/2.4.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java

Author: dkulp
Date: Wed Aug  3 19:10:51 2011
New Revision: 1153616

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

........
  r1153613 | dkulp | 2011-08-03 15:04:51 -0400 (Wed, 03 Aug 2011) | 1 line
  
  [CXF-3700] Add a flag to record if the server is stopped or not
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java

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

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java?rev=1153616&r1=1153615&r2=1153616&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java (original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java Wed Aug  3 19:10:51 2011
@@ -48,6 +48,7 @@ public class ServerImpl implements Serve
     private BindingFactory bindingFactory;
     private MessageObserver messageObserver;
     private ManagedEndpoint mep;
+    private boolean stopped;
 
     public ServerImpl(Bus bus, 
                       Endpoint endpoint, 
@@ -136,9 +137,18 @@ public class ServerImpl implements Serve
         if (slcMgr != null) {
             slcMgr.startServer(this);
         }
+        stopped = false;
+    }
+    
+    public boolean isStopped() {
+        return stopped;
     }
 
     public void stop() {
+        if (stopped) {
+            return;
+        }
+        
         LOG.fine("Server is stopping.");
         
         if (slcMgr != null) {
@@ -159,6 +169,7 @@ public class ServerImpl implements Serve
         }
         getDestination().shutdown();
         getDestination().setMessageObserver(null);
+        stopped = true;
     }
     
     public void destroy() {