You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ja...@apache.org on 2013/02/06 12:59:13 UTC

svn commit: r1442920 - /servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java

Author: janstey
Date: Wed Feb  6 11:59:13 2013
New Revision: 1442920

URL: http://svn.apache.org/viewvc?rev=1442920&view=rev
Log:
SMXCOMP-963 - StaticRoutingSlip doesn't propagate errors to the caller endpoint when some endpoints in in the slip doesn't exist

Modified:
    servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java

Modified: servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java?rev=1442920&r1=1442919&r2=1442920&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java (original)
+++ servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java Wed Feb  6 11:59:13 2013
@@ -233,7 +233,15 @@ public class StaticRoutingSlip extends E
                 targets[curIndex.intValue()].configureTarget(me, getContext());
                 store.store(exchange.getExchangeId(), exchange);
                 MessageUtil.transferOutToIn(exchange, me);
-                send(me);
+                try {
+                    send(me);
+                } catch (RuntimeException re) {
+                    // send delivery channel errors back to calling endpoint
+                    if (correlationId != null) {
+                        me = (MessageExchange) store.load(correlationId);                      
+                    } 
+                    fail(me, exchange.getError());
+                } 
                 if (previousId != null) {
                     me = (MessageExchange) store.load(previousId);
                     done(me);