servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r722490 - /servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
Date Tue, 02 Dec 2008 15:06:21 GMT
Author: gertv
Date: Tue Dec  2 07:06:21 2008
New Revision: 722490

URL: http://svn.apache.org/viewvc?rev=722490&view=rev
Log:
SM-1714: Avoid memory leak through CXF Bus stored in ThreadLocal

Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java?rev=722490&r1=722489&r2=722490&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
Tue Dec  2 07:06:21 2008
@@ -89,6 +89,15 @@
         }
         super.doInit();
     }
+    
+    @Override
+    protected void doShutDown() throws Exception {
+        if (bus != null) {
+            bus.shutdown(true);
+            BusFactory.setThreadDefaultBus(null);
+        }
+        super.doShutDown();
+    }
 
     public Bus getBus() {
         return bus;



Mime
View raw message