Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B11331069B for ; Mon, 19 Jan 2015 08:53:45 +0000 (UTC) Received: (qmail 18102 invoked by uid 500); 19 Jan 2015 08:53:47 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 18039 invoked by uid 500); 19 Jan 2015 08:53:47 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 18021 invoked by uid 99); 19 Jan 2015 08:53:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2015 08:53:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 38EBAE03FD; Mon, 19 Jan 2015 08:53:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Mon, 19 Jan 2015 08:53:48 -0000 Message-Id: In-Reply-To: <4e82f60053994a9c86fcdbcded6e043c@git.apache.org> References: <4e82f60053994a9c86fcdbcded6e043c@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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. 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 Authored: Sun Jan 18 14:08:02 2015 +0100 Committer: Claus Ibsen 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 + * 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. + *

+ * 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;