This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 3de21e8 CAMEL-16324: camel-core - Spring Transactions does not work due recent optimization 3de21e8 is described below commit 3de21e8df16471ec018b727294dc66675dd55573 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Mar 9 20:37:43 2021 +0100 CAMEL-16324: camel-core - Spring Transactions does not work due recent optimization --- .../camel/impl/engine/CamelInternalProcessor.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java index 79919ea..3efa6f6 100644 --- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java +++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java @@ -228,6 +228,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In } @Override + @SuppressWarnings("unchecked") public void done(boolean doneSync) { try { for (int i = advices.size() - 1, j = states.length - 1; i >= 0; i--) { @@ -333,19 +334,21 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In LOG.trace("Transacted Exchange must be routed synchronously for exchangeId: {} -> {}", exchange.getExchangeId(), exchange); } - // ---------------------------------------------------------- - // CAMEL END USER - DEBUG ME HERE +++ START +++ - // ---------------------------------------------------------- try { + // ---------------------------------------------------------- + // CAMEL END USER - DEBUG ME HERE +++ START +++ + // ---------------------------------------------------------- processor.process(exchange); + // ---------------------------------------------------------- + // CAMEL END USER - DEBUG ME HERE +++ END +++ + // ---------------------------------------------------------- } catch (Throwable e) { exchange.setException(e); - } - // ---------------------------------------------------------- - // CAMEL END USER - DEBUG ME HERE +++ END +++ - // ---------------------------------------------------------- - if (taskFactory != null) { - taskFactory.release(afterTask); + } finally { + afterTask.done(true); + if (taskFactory != null) { + taskFactory.release(afterTask); + } } return true; } else {