servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1172978 - /servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Date Tue, 20 Sep 2011 05:02:15 GMT
Author: ffang
Date: Tue Sep 20 05:02:15 2011
New Revision: 1172978

URL: http://svn.apache.org/viewvc?rev=1172978&view=rev
Log:
[SMXCOMP-905]ensure DONE status is set when cxf bc consumer encounter soap fault and use synchronous="true"

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

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=1172978&r1=1172977&r2=1172978&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Tue Sep 20 05:02:15 2011
@@ -515,7 +515,7 @@ public class CxfBcConsumer extends Consu
                     new SetSoapVersionInterceptor());
             cxfService.getOutInterceptors().add(
                     new SetStatusInterceptor());
-
+            
             cxfService.getOutInterceptors().add(new AttachmentOutInterceptor());
             cxfService.getOutInterceptors().add(
                     new MtomCheckInterceptor(isMtomEnabled()));
@@ -1045,6 +1045,16 @@ public class CxfBcConsumer extends Consu
                 //jms transport need rollback
                 throw new Error("rollback");
             }
+            MessageExchange exchange = message.getContent(MessageExchange.class);
+            try {
+                if (message.get("needSetDone") != null && message.get("needSetDone").equals(Boolean.TRUE)
+                    && exchange.getStatus() == ExchangeStatus.ACTIVE) {
+                    exchange.setStatus(ExchangeStatus.DONE);
+                    message.getExchange().get(ComponentContext.class).getDeliveryChannel().send(exchange);
+                }
+            } catch (Exception e) {
+                throw new Fault(e);
+            }
         }
 
         // this method is used for ws-policy to set BindingFaultInfo



Mime
View raw message