servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r992560 - /servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Date Sat, 04 Sep 2010 08:32:30 GMT
Author: ffang
Date: Sat Sep  4 08:32:30 2010
New Revision: 992560

URL: http://svn.apache.org/viewvc?rev=992560&view=rev
Log:
[SMXCOMP-797]servicemix-cxf-bc may cause memory leak for InOnly message

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

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=992560&r1=992559&r2=992560&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Sat Sep  4 08:32:30 2010
@@ -292,6 +292,16 @@ public class CxfBcConsumer extends Consu
 
     public void process(MessageExchange exchange) throws Exception {
         if (exchange.getStatus() == ExchangeStatus.DONE) {
+            Message message = messages.get(exchange.getExchangeId());
+            if (message == null) {
+                return;
+            }
+            boolean oneway = message.getExchange().get(BindingOperationInfo.class)
+                .getOperationInfo().isOneWay();
+            if (oneway) {
+                //ensure remove message if oneway to avoid memory leak
+                messages.remove(exchange.getExchangeId());
+            }
             return;
         }
         Message message = messages.remove(exchange.getExchangeId());



Mime
View raw message