This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.21.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.21.x by this push:
new 97842a936e6 Update HazelcastSedaConsumer.java (#13795)
97842a936e6 is described below
commit 97842a936e6ee089ae8d54b61b1dda50bf10d500
Author: Krasimir Zhelev <[email protected]>
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 c58db47f288..fb51107c244 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()) {