Croway commented on code in PR #29344:
URL: https://github.com/apache/camel/pull/29344#discussion_r4501974368


##########
components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java:
##########
@@ -258,7 +270,17 @@ protected void doStop() throws Exception {
         }
         singleConnectionFactoryList.clear();
 
-        super.doStop();
+        super.doShutdown();
+    }
+
+    private static void invokePooledConnectionFactory(Object 
pooledConnectionFactory, String method) {
+        try {
+            // invoke the method if it exists
+            Method m = pooledConnectionFactory.getClass().getMethod(method);
+            org.apache.camel.support.ObjectHelper.invokeMethod(m, 
pooledConnectionFactory);
+        } catch (Exception e) {
+            // ignore
+        }

Review Comment:
   Done in e542f30c0be2, in both camel-activemq and camel-activemq6: a missing 
method is ignored, and any other failure of `clear`/`stop` is logged at DEBUG. 
The `resetConnection` and `destroy` catches in `doStop`/`doShutdown` log at 
DEBUG too. Stop and shutdown still go on with the next factory.
   
   _Claude Code on behalf of Federico Mariani_
   



##########
components/camel-activemq6/src/main/java/org/apache/camel/component/activemq6/ActiveMQComponent.java:
##########
@@ -258,7 +270,17 @@ protected void doStop() throws Exception {
         }
         singleConnectionFactoryList.clear();
 
-        super.doStop();
+        super.doShutdown();
+    }
+
+    private static void invokePooledConnectionFactory(Object 
pooledConnectionFactory, String method) {
+        try {
+            // invoke the method if it exists
+            Method m = pooledConnectionFactory.getClass().getMethod(method);
+            org.apache.camel.support.ObjectHelper.invokeMethod(m, 
pooledConnectionFactory);
+        } catch (Exception e) {
+            // ignore
+        }

Review Comment:
   Done in e542f30c0be2, in both camel-activemq and camel-activemq6: a missing 
method is ignored, and any other failure of `clear`/`stop` is logged at DEBUG. 
The `resetConnection` and `destroy` catches in `doStop`/`doShutdown` log at 
DEBUG too. Stop and shutdown still go on with the next factory.
   
   _Claude Code on behalf of Federico Mariani_
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to