camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r720838 - in /activemq/camel/branches/camel-1.x: ./ camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelExceptionCausePropagatedTest.java
Date Wed, 26 Nov 2008 13:02:38 GMT
Author: janstey
Date: Wed Nov 26 05:02:37 2008
New Revision: 720838

URL: http://svn.apache.org/viewvc?rev=720838&view=rev
Log:
Merged revisions 720837 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r720837 | janstey | 2008-11-26 09:27:06 -0330 (Wed, 26 Nov 2008) | 1 line
  
  CAMEL-1122 - add handled exception to message header
........

Added:
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelExceptionCausePropagatedTest.java
      - copied unchanged from r720837, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelExceptionCausePropagatedTest.java
Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java?rev=720838&r1=720837&r2=720838&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
Wed Nov 26 05:02:37 2008
@@ -45,9 +45,11 @@
     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";
-
+    public static final String CAUGHT_EXCEPTION_HEADER = "org.apache.camel.CamelCaughtException";
   
+    
     private static final transient Log LOG = LogFactory.getLog(DeadLetterChannel.class);
     private static final String FAILURE_HANDLED_PROPERTY = DeadLetterChannel.class.getName()
+ ".FAILURE_HANDLED";
+    
     private Processor output;
     private Processor deadLetter;
     private AsyncProcessor outputAsync;
@@ -214,11 +216,13 @@
     }
 
     public static boolean isFailureHandled(Exchange exchange) {
-        return exchange.getProperty(FAILURE_HANDLED_PROPERTY) != null;
+        return exchange.getProperty(FAILURE_HANDLED_PROPERTY) != null 
+            || exchange.getIn().getHeader(CAUGHT_EXCEPTION_HEADER) != null;
     }
 
     public static void setFailureHandled(Exchange exchange) {
         exchange.setProperty(FAILURE_HANDLED_PROPERTY, exchange.getException());
+        exchange.getIn().setHeader(CAUGHT_EXCEPTION_HEADER, exchange.getException());   
    
         exchange.setException(null);
     }
 



Mime
View raw message