cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
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 GMT
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);



Mime
View raw message