Author: dkulp
Date: Thu Sep 1 19:22:04 2011
New Revision: 1164218
URL: http://svn.apache.org/viewvc?rev=1164218&view=rev
Log:
[CXF-3785] Make sure the start method can only be called if the service
is stopped
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=1164218&r1=1164217&r2=1164218&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 Thu
Sep 1 19:22:04 2011
@@ -48,7 +48,7 @@ public class ServerImpl implements Serve
private BindingFactory bindingFactory;
private MessageObserver messageObserver;
private ManagedEndpoint mep;
- private boolean stopped;
+ private boolean stopped = true;
public ServerImpl(Bus bus,
Endpoint endpoint,
@@ -119,7 +119,10 @@ public class ServerImpl implements Serve
this.destination = destination;
}
- public void start() {
+ public void start() {
+ if (!stopped) {
+ return;
+ }
LOG.fine("Server is starting.");
if (messageObserver != null) {