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/21 22:12:50 UTC

svn commit: r489462 - /incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java

Author: gnodet
Date: Thu Dec 21 13:12:49 2006
New Revision: 489462

URL: http://svn.apache.org/viewvc?view=rev&rev=489462
Log:
ProviderEndpoint does not correctly handle synchronous / transactional exchanges

Modified:
    incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java

Modified: incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java?view=diff&rev=489462&r1=489461&r2=489462
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java (original)
+++ incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java Thu Dec 21 13:12:49 2006
@@ -26,6 +26,7 @@
 import javax.jbi.servicedesc.ServiceEndpoint;
 import javax.xml.namespace.QName;
 
+import org.apache.servicemix.JbiConstants;
 import org.apache.servicemix.common.DefaultComponent;
 import org.apache.servicemix.common.ServiceUnit;
 
@@ -106,7 +107,12 @@
                             exchange.setMessage(out, "out");
                         }
                         processInOut(exchange, in, out);
-                        send(exchange);
+                        boolean txSync = exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
+                        if (txSync) {
+                            sendSync(exchange);
+                        } else {
+                            send(exchange);
+                        }
                     }
                 // This is not compliant with the default MEPs
                 } else {