You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/12/02 10:31:20 UTC

svn commit: r481528 - /incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java

Author: gnodet
Date: Sat Dec  2 01:31:19 2006
New Revision: 481528

URL: http://svn.apache.org/viewvc?view=rev&rev=481528
Log:
SM-764: Jsr181 does not respect the transaction semantic (sync + tx)

Modified:
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java?view=diff&rev=481528&r1=481527&r2=481528
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java Sat Dec  2 01:31:19 2006
@@ -32,6 +32,7 @@
 import javax.xml.transform.Source;
 import javax.xml.transform.TransformerException;
 
+import org.apache.servicemix.JbiConstants;
 import org.apache.servicemix.common.ExchangeProcessor;
 import org.apache.servicemix.jbi.jaxp.StAXSourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
@@ -135,10 +136,15 @@
                 outMsg.setContent(new StringSource(out.toString()));
                 exchange.setMessage(outMsg, "out");
             }
+            if (exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC))) {
+                channel.sendSync(exchange);
+            } else {
+                channel.send(exchange);
+            }
         } else {
             exchange.setStatus(ExchangeStatus.DONE);
+            channel.send(exchange);
         }
-        channel.send(exchange);
     }
 
     public void start() throws Exception {