davsclaus opened a new pull request, #24767:
URL: https://github.com/apache/camel/pull/24767

   ## Summary
   
   _Claude Code on behalf of davsclaus_
   
   The `MethodInfo` constructor registered `@RoutingSlip`, `@RecipientList`, 
and `@DynamicRouter` annotation-driven EIP processors as CamelContext services 
via `camelContext.addService()`. These services were never removed when the 
owning `BeanInfo` was evicted from the LRU cache in `BeanComponent`, causing 
unbounded growth of the context's internal services list over long uptimes.
   
   The fix removes the three `addService` calls. The processors are already 
started lazily on first use (checked via `ServiceHelper.isStarted()` before 
each invocation), so the `addService` registration was redundant — it only 
served to pin stale processor instances in the services list.
   
   - Removed `camelContext.addService(routingSlip/dynamicRouter/recipientList)` 
from the `MethodInfo` constructor
   - Added `BeanAnnotationServiceLeakTest` verifying that `@RoutingSlip` 
processors are not registered as CamelContext services
   
   ## Test plan
   
   - [x] New `BeanAnnotationServiceLeakTest` verifies no service leak
   - [x] Existing `RoutingSlipPOJOTest` passes (annotation-based routing slip 
still works)
   - [x] Existing `AsyncEndpointRoutingSlipBean*Test` tests pass
   - [x] Existing `BeanRecipientListTest`, 
`BeanRecipientListInterfaceAnnotationTest` pass
   - [x] Existing `DynamicRouterAnnotationTest` passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


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