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 77374CC97 for ; Fri, 1 Nov 2013 15:53:57 +0000 (UTC) Received: (qmail 9323 invoked by uid 500); 1 Nov 2013 15:53:56 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 9272 invoked by uid 500); 1 Nov 2013 15:53:48 -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 9259 invoked by uid 99); 1 Nov 2013 15:53:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2013 15:53:46 +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; Fri, 01 Nov 2013 15:53:43 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 374002388831; Fri, 1 Nov 2013 15:53:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1537967 - in /cxf/trunk/rt/transports: http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/ http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/ Date: Fri, 01 Nov 2013 15:53:22 -0000 To: commits@cxf.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131101155322.374002388831@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Fri Nov 1 15:53:21 2013 New Revision: 1537967 URL: http://svn.apache.org/r1537967 Log: CXF-5372 ServerEngineFactoryHolder should release JAXB classes when it is destroyed Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyHttpServerEngineFactoryHolder.java cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java?rev=1537967&r1=1537966&r2=1537967&view=diff ============================================================================== --- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java (original) +++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java Fri Nov 1 15:53:21 2013 @@ -167,7 +167,10 @@ public class JettyHTTPServerEngineFactor } public void destroy() { + // need to release the reference of the jaxb Classes factory.postShutdown(); + jaxbClasses.clear(); + jaxbContext = null; } public String getParsedElement() { Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java?rev=1537967&r1=1537966&r2=1537967&view=diff ============================================================================== --- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java (original) +++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java Fri Nov 1 15:53:21 2013 @@ -70,7 +70,7 @@ public class JettyServerEngineFactoryPar ef.addProperty("parsedElement", createValue(context, xmlString)); ef.setInitMethod("init"); ef.setActivation(ComponentMetadata.ACTIVATION_EAGER); - + ef.setDestroyMethod("destroy"); return ef; } catch (Exception e) { throw new RuntimeException("Could not process configuration.", e); Modified: cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyHttpServerEngineFactoryHolder.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyHttpServerEngineFactoryHolder.java?rev=1537967&r1=1537966&r2=1537967&view=diff ============================================================================== --- cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyHttpServerEngineFactoryHolder.java (original) +++ cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyHttpServerEngineFactoryHolder.java Fri Nov 1 15:53:21 2013 @@ -161,7 +161,10 @@ public class NettyHttpServerEngineFactor } public void destroy() { + // need to release the reference of the jaxb Classes factory.postShutdown(); + jaxbClasses.clear(); + jaxbContext = null; } public String getParsedElement() { Modified: cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java?rev=1537967&r1=1537966&r2=1537967&view=diff ============================================================================== --- cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java (original) +++ cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java Fri Nov 1 15:53:21 2013 @@ -58,14 +58,14 @@ public class NettyServerEngineFactoryPar ef.setId("netty.engine.factory-holder-" + UUID.randomUUID().toString()); } ef.setRuntimeClass(NettyHttpServerEngineFactoryHolder.class); - + try { // Print the DOM node String xmlString = StaxUtils.toString(element); ef.addProperty("parsedElement", createValue(context, xmlString)); ef.setInitMethod("init"); ef.setActivation(ComponentMetadata.ACTIVATION_EAGER); - + ef.setDestroyMethod("destroy"); return ef; } catch (Exception e) { throw new RuntimeException("Could not process configuration.", e);