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 9111F10F9C for ; Wed, 14 Aug 2013 13:04:19 +0000 (UTC) Received: (qmail 10180 invoked by uid 500); 14 Aug 2013 13:04:19 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 10112 invoked by uid 500); 14 Aug 2013 13:04:18 -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 10100 invoked by uid 99); 14 Aug 2013 13:04:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 13:04:17 +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; Wed, 14 Aug 2013 13:04:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D36A6238889B; Wed, 14 Aug 2013 13:03:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1513861 - /cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java Date: Wed, 14 Aug 2013 13:03:55 -0000 To: commits@cxf.apache.org From: amichai@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130814130355.D36A6238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: amichai Date: Wed Aug 14 13:03:55 2013 New Revision: 1513861 URL: http://svn.apache.org/r1513861 Log: Merged revisions 1513793 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1513793 | amichai | 2013-08-14 13:03:55 +0300 (Wed, 14 Aug 2013) | 2 lines [CXF-5188] Fix resource leak when server fails to start ........ Modified: cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java Modified: cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java?rev=1513861&r1=1513860&r2=1513861&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java (original) +++ cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java Wed Aug 14 13:03:55 2013 @@ -201,7 +201,12 @@ public class ServerFactoryBean extends A : getServiceClass()); if (start) { - server.start(); + try { + server.start(); + } catch (RuntimeException re) { + server.destroy(); // prevent resource leak + throw re; + } } return server; } finally {