You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/11/19 22:17:48 UTC
svn commit: r596450 -
/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
Author: jstrachan
Date: Mon Nov 19 13:17:48 2007
New Revision: 596450
URL: http://svn.apache.org/viewvc?rev=596450&view=rev
Log:
patch for https://issues.apache.org/activemq/browse/CAMEL-238 to preserve the cause exception when sending to the dead letter channel
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java?rev=596450&r1=596449&r2=596450&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java Mon Nov 19 13:17:48 2007
@@ -41,6 +41,7 @@
public class DeadLetterChannel extends ErrorHandlerSupport implements AsyncProcessor {
public static final String REDELIVERY_COUNTER = "org.apache.camel.RedeliveryCounter";
public static final String REDELIVERED = "org.apache.camel.Redelivered";
+ public static final String EXCEPTION_CAUSE_PROPERTY = "CamelCauseException";
private class RedeliveryData {
int redeliveryCounter;
@@ -136,7 +137,8 @@
data.redeliveryDelay = data.currentRedeliveryPolicy.getRedeliveryDelay(data.redeliveryDelay);
sleep(data.redeliveryDelay);
}
-
+
+ exchange.setProperty(EXCEPTION_CAUSE_PROPERTY, exchange.getException());
exchange.setException(null);
boolean sync = outputAsync.process(exchange, new AsyncCallback() {
public void done(boolean sync) {