cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1514290 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
Date Thu, 15 Aug 2013 14:23:03 GMT
Author: sergeyb
Date: Thu Aug 15 14:23:03 2013
New Revision: 1514290

URL: http://svn.apache.org/r1514290
Log:
Merged revisions 1514289 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1514289 | sergeyb | 2013-08-15 17:21:02 +0300 (Thu, 15 Aug 2013) | 1 line
  
  Preventing a resource leak if JAX-RS server fails to start, copying a fix Amichai did for
Simple Frontend
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1514289

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

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java?rev=1514290&r1=1514289&r2=1514290&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
Thu Aug 15 14:23:03 2013
@@ -193,7 +193,12 @@ public class JAXRSServerFactoryBean exte
             
             
             if (start) {
-                server.start();
+                try {
+                    server.start();
+                } catch (RuntimeException re) {
+                    server.destroy(); // prevent resource leak
+                    throw re;
+                }
             }
         } catch (EndpointException e) {
             throw new ServiceConstructionException(e);



Mime
View raw message