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

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


The following commit(s) were added to refs/heads/main by this push:
     new bd2ed599c3a [CAMEL-18195] Add setExceptionListener(...) to 
SjmsComponent (#7792)
bd2ed599c3a is described below

commit bd2ed599c3a2095ef2f9bf2eb875a62a783d60e9
Author: Lance <[email protected]>
AuthorDate: Wed Jun 15 20:46:53 2022 +0100

    [CAMEL-18195] Add setExceptionListener(...) to SjmsComponent (#7792)
    
    * [CAMEL-18195] Add setExceptionListener(...) to SjmsComponent
    
    * [CAMEL-18195] @Metadata label fix for exceptionListener
---
 .../org/apache/camel/component/sjms/SjmsComponent.java     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
index c5b32b99770..4f5326d0ef7 100644
--- 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
+++ 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
@@ -20,6 +20,7 @@ import java.util.Map;
 import java.util.concurrent.ExecutorService;
 
 import javax.jms.ConnectionFactory;
+import javax.jms.ExceptionListener;
 
 import org.apache.camel.CamelException;
 import org.apache.camel.Endpoint;
@@ -71,6 +72,10 @@ public class SjmsComponent extends 
HeaderFilterStrategyComponent {
               description = "Specifies the maximum number of concurrent 
consumers for continue routing when timeout occurred when using request/reply 
over JMS.")
     private int replyToOnTimeoutMaxConcurrentConsumers = 1;
 
+    @Metadata(label = "advanced",
+            description = "Specifies the JMS Exception Listener that is to be 
notified of any underlying JMS exceptions.")
+    private ExceptionListener exceptionListener;
+
     public SjmsComponent() {
     }
 
@@ -87,6 +92,7 @@ public class SjmsComponent extends 
HeaderFilterStrategyComponent {
         endpoint.setRecoveryInterval(recoveryInterval);
         endpoint.setMessageCreatedStrategy(messageCreatedStrategy);
         endpoint.setClientId(clientId);
+        endpoint.setExceptionListener(exceptionListener);
         if (getHeaderFilterStrategy() != null) {
             endpoint.setHeaderFilterStrategy(getHeaderFilterStrategy());
         }
@@ -146,6 +152,14 @@ public class SjmsComponent extends 
HeaderFilterStrategyComponent {
         return connectionFactory;
     }
 
+    public void setExceptionListener(ExceptionListener exceptionListener) {
+        this.exceptionListener = exceptionListener;
+    }
+
+    public ExceptionListener getExceptionListener() {
+        return exceptionListener;
+    }
+
     public void setJmsKeyFormatStrategy(JmsKeyFormatStrategy 
jmsKeyFormatStrategy) {
         this.jmsKeyFormatStrategy = jmsKeyFormatStrategy;
     }

Reply via email to