gnodet commented on PR #30505:
URL: https://github.com/apache/camel/pull/30505#issuecomment-7097636958

   Thanks for the thorough review @davsclaus.
   
   **On point 1 (keeping the builder / using `connManagerShared=true`):** that 
is exactly what the fix does. The `configureHttpClient` method receives the 
`clientBuilder` that is already configured with TLS, proxy, timeouts, and all 
`httpClient.*` options, and calls 
`clientBuilder.setConnectionManagerShared(true)` before 
`clientBuilder.build()`. The token client inherits the full endpoint 
configuration — it does not use `HttpClientBuilder.create()`. Apologies if the 
original PR description was ambiguous on this point.
   
   **On point 2 (whether the fix addresses CAMEL-27233):** the JIRA describes 
the pool being shut down when the OAuth2 token endpoint and the API endpoint 
share the same host and port — exactly the scenario reproduced in 
`tokenAndApiOnSameHostSucceeds`. With `connManagerShared=false` (the former 
default), closing the token client called `connectionManager.shutdown()` on the 
shared pool, leaving the API client's pool shut down. With 
`connManagerShared=true`, the token client's close does not touch the pool. The 
second test (`tokenClientCloseDoesNotShutDownEndpointPool`) directly verifies 
this invariant without needing a live server.
   
   **On point 3 (try/finally around the lease):** fixed — the lease future is 
now cancelled in a `finally` block.
   
   Backport labels (`port/camel-4.18.x` and `port/camel-4.22.x`) have been 
added.
   
   _Guillaume Nodet_


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