camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [02/10] camel git commit: CAMEL-7050: DeadLetterChannel should make more clear that it handles any new exception also. Added option to configure this behavior so ppl can turn that off and let new exceptions be unhandled, so transactions can rollback.
Date Mon, 19 Jan 2015 08:53:48 GMT
CAMEL-7050: DeadLetterChannel should make more clear that it handles any new exception also.
Added option to configure this behavior so ppl can turn that off and let new exceptions be
unhandled, so transactions can rollback.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/27136c33
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/27136c33
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/27136c33

Branch: refs/heads/master
Commit: 27136c3338881a3f24c70b7be5df2582bb970a99
Parents: b05668f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jan 18 14:08:02 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jan 18 14:08:02 2015 +0100

----------------------------------------------------------------------
 .../camel/model/OnExceptionDefinition.java      | 22 ++++++++++++++++++++
 .../camel/processor/RedeliveryErrorHandler.java |  6 ------
 2 files changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/27136c33/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java b/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
index 2917707..e928f66 100644
--- a/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
@@ -535,6 +535,28 @@ public class OnExceptionDefinition extends ProcessorDefinition<OnExceptionDefini
     }
 
     /**
+     * Sets whether new exceptions should be logged or not (supports property placeholders).
+     * Can be used to include or reduce verbose.
+     * <p/>
+     * A new exception is an exception that was thrown while handling a previous exception.
+     */
+    public OnExceptionDefinition logNewException(boolean logNewException) {
+        getOrCreateRedeliveryPolicy().logNewException(logNewException);
+        return this;
+    }
+
+    /**
+     * Sets whether new exceptions should be logged or not (supports property placeholders).
+     * Can be used to include or reduce verbose.
+     * <p/>
+     * A new exception is an exception that was thrown while handling a previous exception.
+     */
+    public OnExceptionDefinition logNewException(String logNewException) {
+        getOrCreateRedeliveryPolicy().logNewException(logNewException);
+        return this;
+    }
+
+    /**
      * Sets whether to log errors even if its continued
      */
     public OnExceptionDefinition logContinued(boolean logContinued) {

http://git-wip-us.apache.org/repos/asf/camel/blob/27136c33/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
b/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
index c0a8c4f..9120221 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
@@ -1000,12 +1000,6 @@ public abstract class RedeliveryErrorHandler extends ErrorHandlerSupport
impleme
                 return;
             }
 
-            // if we should not rollback, then check whether logging is enabled
-            if (handled && !data.currentRedeliveryPolicy.isLogHandled()) {
-                // do not log handled
-                return;
-            }
-
             if (continued && !data.currentRedeliveryPolicy.isLogContinued()) {
                 // do not log handled
                 return;


Mime
View raw message