You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/01/10 09:25:10 UTC

(camel) 01/02: CAMEL-20297 camel-jms: do not swallow interrupted exceptions

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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 489cae4238349dedc24b7303ea644c9835881e12
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Jan 10 09:34:09 2024 +0100

    CAMEL-20297 camel-jms: do not swallow interrupted exceptions
---
 .../java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java | 2 +-
 .../apache/camel/component/jms/reply/TemporaryQueueReplyManager.java   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
index 9a81edc48ea..88877970b99 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
@@ -113,7 +113,7 @@ public abstract class ReplyManagerSupport extends ServiceSupport implements Repl
                 log.trace("Waiting for replyTo to be set done");
             }
         } catch (InterruptedException e) {
-            // ignore
+            Thread.currentThread().interrupt();
         }
         return replyTo;
     }
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
index ec1e0a61178..2557f14e9e9 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
@@ -53,8 +53,9 @@ public class TemporaryQueueReplyManager extends ReplyManagerSupport {
         try {
             destResolver.destinationReady();
         } catch (InterruptedException e) {
-            log.warn("Interrupted while waiting for JMSReplyTo destination refresh due to: {}. This exception is ignored.",
+            log.warn("Interrupted while waiting for JMSReplyTo destination refresh due to: {}.",
                     e.getMessage());
+            Thread.currentThread().interrupt();
         }
         return super.getReplyTo();
     }