Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB502880A for ; Thu, 1 Sep 2011 19:22:29 +0000 (UTC) Received: (qmail 32287 invoked by uid 500); 1 Sep 2011 19:22:29 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 32170 invoked by uid 500); 1 Sep 2011 19:22:29 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 32159 invoked by uid 99); 1 Sep 2011 19:22:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 19:22:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 19:22:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 554C22388A33 for ; Thu, 1 Sep 2011 19:22:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1164218 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java Date: Thu, 01 Sep 2011 19:22:05 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110901192205.554C22388A33@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) {