orpiske commented on code in PR #19402:
URL: https://github.com/apache/camel/pull/19402#discussion_r2399079000


##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultContextServiceLoaderPlugin.java:
##########
@@ -58,13 +59,22 @@ public class DefaultContextServiceLoaderPlugin extends 
ServiceSupport implements
      */
     @Override
     protected void doStart() throws Exception {
-        ServiceLoader<ContextServicePlugin> contextServicePlugins = 
ServiceLoader.load(ContextServicePlugin.class,
+        contextServicePlugins = ServiceLoader.load(ContextServicePlugin.class,
                 camelContext.getApplicationContextClassLoader());
         for (ContextServicePlugin plugin : contextServicePlugins) {
             plugin.load(camelContext);
         }
     }
 
+    @Override
+    protected void doStop() throws Exception {
+        if (contextServicePlugins != null) {
+            for (ContextServicePlugin plugin : contextServicePlugins) {

Review Comment:
   Good idea. Let me do that!



-- 
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