gnodet opened a new pull request, #25242: URL: https://github.com/apache/camel/pull/25242
## Summary _Claude Code on behalf of gnodet_ Part of [CAMEL-20199](https://issues.apache.org/jira/browse/CAMEL-20199): Complete support of Virtual Threads. Migrates `ThreadLocal` usages that pass context (Exchange, config, headers) during processing to `ContextValue.newThreadLocal()`. This is a drop-in replacement that preserves the same `get()`/`set()`/`remove()` API but will automatically switch to `ScopedValue` on JDK 25+, enabling proper virtual thread support. **Components migrated:** - **camel-xpath** — `XPathBuilder.java` and `MessageVariableResolver.java`: `ThreadLocal<Exchange>` for XPath variable resolution - **camel-datasonnet** — `CML.java`: `ThreadLocal<Exchange>` for DataSonnet library function access - **camel-jq** — `JqFunctions.java`: `EXCHANGE_LOCAL` ThreadLocal for JQ custom functions - **camel-as2** — `AS2ServerConnection.java`: `CURRENT_CONSUMER_CONFIG` ThreadLocal for request-scoped MDN processing - **camel-univocity-parsers** — `HeaderRowProcessor.java`: `ThreadLocal<String[]>` for parsed CSV/TSV headers ## Test plan - [x] camel-xpath: BUILD SUCCESS - [x] camel-jq: 43 tests passed - [x] camel-datasonnet: 65 tests passed - [x] camel-univocity-parsers: 118 tests passed - [x] camel-as2: BUILD SUCCESS - [ ] CI passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
