This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.8.x by this push:
new 277b51b8d44 CAMEL-22026: camel-jms: Should close connection when
shutting down. Thanks to Kartik for reporting.
277b51b8d44 is described below
commit 277b51b8d44c6e094724dda030c93158c3e743f4
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Apr 29 10:51:14 2025 +0200
CAMEL-22026: camel-jms: Should close connection when shutting down. Thanks
to Kartik for reporting.
---
.../component/sjms/consumer/SimpleMessageListenerContainer.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/consumer/SimpleMessageListenerContainer.java
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/consumer/SimpleMessageListenerContainer.java
index 0a931703378..c67cc7201b9 100644
---
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/consumer/SimpleMessageListenerContainer.java
+++
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/consumer/SimpleMessageListenerContainer.java
@@ -239,6 +239,12 @@ public class SimpleMessageListenerContainer extends
ServiceSupport
}
}
+ @Override
+ protected void doShutdown() throws Exception {
+ closeConnection(connection);
+ this.connection = null;
+ }
+
protected void initConsumers() throws Exception {
synchronized (this.consumerLock) {
if (consumers == null) {