You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/04/16 04:29:18 UTC

(camel) branch camel-4.4.x updated: Update HazelcastSedaConsumer.java (#13795)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.4.x by this push:
     new 30529fb4572 Update HazelcastSedaConsumer.java (#13795)
30529fb4572 is described below

commit 30529fb4572ae4a1dc47dc991f2abbcd5120d71e
Author: Krasimir Zhelev <kr...@gmail.com>
AuthorDate: Tue Apr 16 06:24:08 2024 +0200

    Update HazelcastSedaConsumer.java (#13795)
    
    CAMEL-20677: If "transacted" is enabled, the transaction never gets committed if body is null. This leads to "Camel Exception cause:  java.lang.IllegalStateException: Nested transactions are not allowed!".
---
 .../apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
index f8eed4ef240..ff7ac6648a0 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
@@ -127,6 +127,10 @@ public class HazelcastSedaConsumer extends DefaultConsumer implements Runnable {
                             transactionCtx.rollbackTransaction();
                         }
                     }
+                } else {
+                    if (transactionCtx != null) {
+                        transactionCtx.commitTransaction();
+                    }
                 }
             } catch (InterruptedException e) {
                 if (LOG.isDebugEnabled()) {