This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.0.x by this push:
new 977f7c6b128 Update HazelcastSedaConsumer.java (#13795)
977f7c6b128 is described below
commit 977f7c6b128b286c4cf796ad96cd59093f0cb461
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 a4528c5445c..4d1c68a8d93 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()) {