gnodet commented on code in PR #25245:
URL: https://github.com/apache/camel/pull/25245#discussion_r3682387803


##########
components/camel-ai/camel-a2a/src/main/java/org/apache/camel/component/a2a/A2AProgress.java:
##########
@@ -30,16 +32,31 @@
 import org.apache.camel.component.a2a.model.TaskStatus;
 import org.apache.camel.component.a2a.model.TextPart;
 import org.apache.camel.component.a2a.state.A2ATaskStore;
+import org.apache.camel.component.a2a.state.GuardedTaskStore;
 
 /**
  * Static utility for emitting A2A progress updates from any exchange. 
Resolves the task store via the exchange's
  * {@code fromEndpoint} (primary) or by scanning the A2A component's endpoints 
(fallback).
  */
 public final class A2AProgress {
 
+    private static final ConcurrentHashMap<A2ATaskStore, ReentrantLock> 
STORE_LOCKS = new ConcurrentHashMap<>();
+

Review Comment:
   Good catch, thank you! Added a package-private 
`removeStoreLock(A2ATaskStore)` method to `A2AProgress` and wired it into 
`A2AEndpoint.cleanupEndpointResources()` so the lock entry is removed when the 
endpoint shuts down. This prevents the static `STORE_LOCKS` map from leaking 
entries.
   
   _Claude Code on behalf of gnodet_



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