This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c3b01310be15 CAMEL-20199: Deprecate camel-reactive-executor-tomcat
c3b01310be15 is described below
commit c3b01310be150701562458c4b110f599817cea29
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Aug 4 07:13:34 2026 +0200
CAMEL-20199: Deprecate camel-reactive-executor-tomcat
The cross-thread ThreadLocal cleanup that distinguished this component
from DefaultReactiveExecutor relied on reflective access to the private
Thread.threadLocals field, which is denied by the JDK module system
since JDK 17 and is incompatible with virtual threads. Without that
cleanup, this executor is functionally identical to the default.
Closes #25239
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
.../catalog/docs/reactive-executor-tomcat.adoc | 25 ++++++++++++++++++----
.../catalog/others/reactive-executor-tomcat.json | 4 ++--
components/camel-reactive-executor-tomcat/pom.xml | 4 ++--
.../services/org/apache/camel/other.properties | 4 ++--
.../resources/reactive-executor-tomcat.json | 4 ++--
.../src/main/docs/reactive-executor-tomcat.adoc | 25 ++++++++++++++++++----
.../reactive/tomcat/TomcatReactiveExecutor.java | 8 +++++++
.../ROOT/pages/camel-4x-upgrade-guide-4_22.adoc | 10 +++++++++
8 files changed, 68 insertions(+), 16 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/reactive-executor-tomcat.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/reactive-executor-tomcat.adoc
index 12a55d20deae..7758a843a5d8 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/reactive-executor-tomcat.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/reactive-executor-tomcat.adoc
@@ -1,17 +1,34 @@
-= Reactive Executor Tomcat Component
+= Reactive Executor Tomcat Component (deprecated)
:doctitle: Reactive Executor Tomcat
:shortname: reactive-executor-tomcat
:artifactid: camel-reactive-executor-tomcat
-:description: Reactive Executor for camel-core using Apache Tomcat
+:description: Reactive Executor for camel-core using Apache Tomcat (deprecated)
:since: 3.17
-:supportlevel: Experimental
+:supportlevel: Experimental-deprecated
+:deprecated: *deprecated*
:tabs-sync-option:
*Since Camel {since}*
-The `camel-reactive-executor-tomcat` is intended for users of Apache Tomcat,
+*Deprecated since Camel 4.22*
+
+[WARNING]
+====
+This component is deprecated and will be removed in a future release.
+Use the default `ReactiveExecutor` (built into `camel-core`) instead.
+====
+
+The `camel-reactive-executor-tomcat` was intended for users of Apache Tomcat,
to let Camel applications shutdown cleanly when being un-deployed in Apache
Tomcat.
+The cross-thread `ThreadLocal` cleanup that distinguished this component from
the default
+`ReactiveExecutor` relied on reflective access to the private
`Thread.threadLocals` field.
+This approach is denied by the JDK module system since JDK 17 and is
incompatible with
+virtual threads. Without that cleanup, this executor is functionally identical
to the default.
+
+To migrate, simply remove the `camel-reactive-executor-tomcat` dependency from
your project.
+Camel will automatically use the built-in `DefaultReactiveExecutor`.
+
== Auto-detection from classpath
To use this implementation all you need to do is to add the
`camel-reactive-executor-tomcat` dependency to the classpath,
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/reactive-executor-tomcat.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/reactive-executor-tomcat.json
index 69eeedf4bdc6..4c1e58453e88 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/reactive-executor-tomcat.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/reactive-executor-tomcat.json
@@ -3,8 +3,8 @@
"kind": "other",
"name": "reactive-executor-tomcat",
"title": "Reactive Executor Tomcat",
- "description": "Reactive Executor for camel-core using Apache Tomcat",
- "deprecated": false,
+ "description": "Reactive Executor for camel-core using Apache Tomcat
(deprecated)",
+ "deprecated": true,
"firstVersion": "3.17.0",
"label": "reactive",
"supportLevel": "Experimental",
diff --git a/components/camel-reactive-executor-tomcat/pom.xml
b/components/camel-reactive-executor-tomcat/pom.xml
index fe745d70caf8..943f95ed0b24 100644
--- a/components/camel-reactive-executor-tomcat/pom.xml
+++ b/components/camel-reactive-executor-tomcat/pom.xml
@@ -28,8 +28,8 @@
<artifactId>camel-reactive-executor-tomcat</artifactId>
<packaging>jar</packaging>
- <name>Camel :: Reactive Executor :: Tomcat</name>
- <description>Reactive Executor for camel-core using Apache
Tomcat</description>
+ <name>Camel :: Reactive Executor :: Tomcat (deprecated)</name>
+ <description>Reactive Executor for camel-core using Apache Tomcat
(deprecated)</description>
<properties>
<firstVersion>3.17.0</firstVersion>
diff --git
a/components/camel-reactive-executor-tomcat/src/generated/resources/META-INF/services/org/apache/camel/other.properties
b/components/camel-reactive-executor-tomcat/src/generated/resources/META-INF/services/org/apache/camel/other.properties
index d85a9f89bb2e..b315def95309 100644
---
a/components/camel-reactive-executor-tomcat/src/generated/resources/META-INF/services/org/apache/camel/other.properties
+++
b/components/camel-reactive-executor-tomcat/src/generated/resources/META-INF/services/org/apache/camel/other.properties
@@ -3,5 +3,5 @@ name=reactive-executor-tomcat
groupId=org.apache.camel
artifactId=camel-reactive-executor-tomcat
version=4.22.0-SNAPSHOT
-projectName=Camel :: Reactive Executor :: Tomcat
-projectDescription=Reactive Executor for camel-core using Apache Tomcat
+projectName=Camel :: Reactive Executor :: Tomcat (deprecated)
+projectDescription=Reactive Executor for camel-core using Apache Tomcat
(deprecated)
diff --git
a/components/camel-reactive-executor-tomcat/src/generated/resources/reactive-executor-tomcat.json
b/components/camel-reactive-executor-tomcat/src/generated/resources/reactive-executor-tomcat.json
index 69eeedf4bdc6..4c1e58453e88 100644
---
a/components/camel-reactive-executor-tomcat/src/generated/resources/reactive-executor-tomcat.json
+++
b/components/camel-reactive-executor-tomcat/src/generated/resources/reactive-executor-tomcat.json
@@ -3,8 +3,8 @@
"kind": "other",
"name": "reactive-executor-tomcat",
"title": "Reactive Executor Tomcat",
- "description": "Reactive Executor for camel-core using Apache Tomcat",
- "deprecated": false,
+ "description": "Reactive Executor for camel-core using Apache Tomcat
(deprecated)",
+ "deprecated": true,
"firstVersion": "3.17.0",
"label": "reactive",
"supportLevel": "Experimental",
diff --git
a/components/camel-reactive-executor-tomcat/src/main/docs/reactive-executor-tomcat.adoc
b/components/camel-reactive-executor-tomcat/src/main/docs/reactive-executor-tomcat.adoc
index 12a55d20deae..7758a843a5d8 100644
---
a/components/camel-reactive-executor-tomcat/src/main/docs/reactive-executor-tomcat.adoc
+++
b/components/camel-reactive-executor-tomcat/src/main/docs/reactive-executor-tomcat.adoc
@@ -1,17 +1,34 @@
-= Reactive Executor Tomcat Component
+= Reactive Executor Tomcat Component (deprecated)
:doctitle: Reactive Executor Tomcat
:shortname: reactive-executor-tomcat
:artifactid: camel-reactive-executor-tomcat
-:description: Reactive Executor for camel-core using Apache Tomcat
+:description: Reactive Executor for camel-core using Apache Tomcat (deprecated)
:since: 3.17
-:supportlevel: Experimental
+:supportlevel: Experimental-deprecated
+:deprecated: *deprecated*
:tabs-sync-option:
*Since Camel {since}*
-The `camel-reactive-executor-tomcat` is intended for users of Apache Tomcat,
+*Deprecated since Camel 4.22*
+
+[WARNING]
+====
+This component is deprecated and will be removed in a future release.
+Use the default `ReactiveExecutor` (built into `camel-core`) instead.
+====
+
+The `camel-reactive-executor-tomcat` was intended for users of Apache Tomcat,
to let Camel applications shutdown cleanly when being un-deployed in Apache
Tomcat.
+The cross-thread `ThreadLocal` cleanup that distinguished this component from
the default
+`ReactiveExecutor` relied on reflective access to the private
`Thread.threadLocals` field.
+This approach is denied by the JDK module system since JDK 17 and is
incompatible with
+virtual threads. Without that cleanup, this executor is functionally identical
to the default.
+
+To migrate, simply remove the `camel-reactive-executor-tomcat` dependency from
your project.
+Camel will automatically use the built-in `DefaultReactiveExecutor`.
+
== Auto-detection from classpath
To use this implementation all you need to do is to add the
`camel-reactive-executor-tomcat` dependency to the classpath,
diff --git
a/components/camel-reactive-executor-tomcat/src/main/java/org/apache/camel/reactive/tomcat/TomcatReactiveExecutor.java
b/components/camel-reactive-executor-tomcat/src/main/java/org/apache/camel/reactive/tomcat/TomcatReactiveExecutor.java
index e4c467885645..07eefa78a781 100644
---
a/components/camel-reactive-executor-tomcat/src/main/java/org/apache/camel/reactive/tomcat/TomcatReactiveExecutor.java
+++
b/components/camel-reactive-executor-tomcat/src/main/java/org/apache/camel/reactive/tomcat/TomcatReactiveExecutor.java
@@ -40,7 +40,15 @@ import org.slf4j.LoggerFactory;
/**
* This reactive executor is intended for users of Apache Tomcat, to let Camel
applications shutdown cleanly when being
* undeployed in Apache Tomcat.
+ *
+ * @deprecated since 4.22. The cross-thread ThreadLocal cleanup that
distinguished this component from
+ * {@link org.apache.camel.impl.engine.DefaultReactiveExecutor}
relied on reflective access to the private
+ * {@code Thread.threadLocals} field, which is denied by the JDK
module system since JDK 17 and is
+ * incompatible with virtual threads. Without that cleanup, this
executor is functionally identical to the
+ * default. Use {@code DefaultReactiveExecutor} instead (it is
used automatically when this module is not on
+ * the classpath).
*/
+@Deprecated(since = "4.22")
@ManagedResource(description = "Managed TomcatReactiveExecutor")
@JdkService(ReactiveExecutor.FACTORY)
@Experimental
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
index 53f4ccba879e..c60dc47f0a8f 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
@@ -13,6 +13,16 @@ See the xref:camel-upgrade-recipes-tool.adoc[documentation]
page for details.
== Upgrading Camel 4.21 to 4.22
+=== camel-reactive-executor-tomcat
+
+The `camel-reactive-executor-tomcat` component has been deprecated. Its
cross-thread `ThreadLocal`
+cleanup relied on reflective access to the private `Thread.threadLocals`
field, which is denied by
+the JDK module system since JDK 17 and is incompatible with virtual threads.
Without that cleanup,
+this executor is functionally identical to the built-in
`DefaultReactiveExecutor`.
+
+To migrate, remove the `camel-reactive-executor-tomcat` dependency from your
project. Camel will
+automatically use the default reactive executor.
+
=== camel-core
==== Property placeholders in toD and enrich dynamic endpoint URIs