You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2021/07/26 14:41:03 UTC

[camel-quarkus] branch main updated (de8032b -> 4c70168)

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.


    from de8032b  [Camel 3.11] Solr cloud integration tests are failing #2814
     new 97be7f9  Add native support for transferException
     new ce86072  Automate the generation of documentation for the transferException option
     new 4c70168  Fix broken link to command-mode itest

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ROOT/pages/reference/extensions/activemq.adoc  | 11 +++++
 .../ROOT/pages/reference/extensions/ahc-ws.adoc    | 11 +++++
 .../ROOT/pages/reference/extensions/ahc.adoc       | 11 +++++
 .../ROOT/pages/reference/extensions/amqp.adoc      | 11 +++++
 .../ROOT/pages/reference/extensions/core.adoc      |  4 +-
 .../ROOT/pages/reference/extensions/http.adoc      | 11 +++++
 .../ROOT/pages/reference/extensions/jms.adoc       | 11 +++++
 .../pages/reference/extensions/netty-http.adoc     | 11 +++++
 .../ROOT/pages/reference/extensions/rabbitmq.adoc  | 11 +++++
 .../ROOT/pages/reference/extensions/servlet.adoc   | 11 +++++
 .../ROOT/pages/reference/extensions/sjms.adoc      | 11 +++++
 .../ROOT/pages/reference/extensions/sjms2.adoc     | 11 +++++
 .../pages/reference/extensions/vertx-http.adoc     | 11 +++++
 .../ROOT/pages/user-guide/command-mode.adoc        |  2 +-
 .../modules/ROOT/pages/user-guide/native-mode.adoc | 22 ++-------
 .../deployment/CamelSerializationProcessor.java    | 56 ++++++++++++++--------
 .../org/apache/camel/quarkus/core/CamelConfig.java | 22 ++-------
 .../quarkus/component/http/it/HttpResource.java    | 45 +++++++++++++++++
 .../camel/quarkus/component/http/it/HttpRoute.java |  5 ++
 .../http/src/main/resources/application.properties |  1 +
 .../camel/quarkus/component/http/it/HttpTest.java  | 18 ++++++-
 .../component/messaging/it/JmsResource.java        | 14 ++++++
 .../quarkus/component/messaging/it/JmsRoutes.java  |  5 ++
 .../quarkus/component/messaging/it/JmsTest.java    |  9 ++++
 .../quarkus/maven/UpdateExtensionDocPageMojo.java  | 13 +++--
 .../doc-templates/extension-doc-page.adoc          | 13 +++++
 26 files changed, 293 insertions(+), 68 deletions(-)

[camel-quarkus] 01/03: Add native support for transferException

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 97be7f960cef7a1abc8e8b8488b1e8eb8577fd8a
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Jul 23 11:12:56 2021 +0100

    Add native support for transferException
    
    Fixes #1868
---
 .../modules/ROOT/pages/user-guide/native-mode.adoc | 22 ++-------
 .../deployment/CamelSerializationProcessor.java    | 56 ++++++++++++++--------
 .../quarkus/component/http/it/HttpResource.java    | 45 +++++++++++++++++
 .../camel/quarkus/component/http/it/HttpRoute.java |  5 ++
 .../http/src/main/resources/application.properties |  1 +
 .../camel/quarkus/component/http/it/HttpTest.java  | 18 ++++++-
 .../component/messaging/it/JmsResource.java        | 14 ++++++
 .../quarkus/component/messaging/it/JmsRoutes.java  |  5 ++
 .../quarkus/component/messaging/it/JmsTest.java    |  9 ++++
 9 files changed, 134 insertions(+), 41 deletions(-)

diff --git a/docs/modules/ROOT/pages/user-guide/native-mode.adoc b/docs/modules/ROOT/pages/user-guide/native-mode.adoc
index a995011..009b976 100644
--- a/docs/modules/ROOT/pages/user-guide/native-mode.adoc
+++ b/docs/modules/ROOT/pages/user-guide/native-mode.adoc
@@ -113,24 +113,8 @@ quarkus.index-dependency.commons-lang3.artifact-id = commons-lang3
 ----
 
 [[serialization]]
-== Registration for serialization
-
-If serialization support is requested via `quarkus.camel.native.reflection.serialization-enabled`, the following classes are registered for serialization:
-
-* `java.lang.Boolean`
-* `java.lang.Byte`
-* `java.lang.Character`
-* `java.lang.Float`
-* `java.lang.Double`
-* `java.lang.Integer`
-* `java.lang.Long`
-* `java.lang.Number`
-* `java.lang.String`
-* `java.math.BigInteger`
-* `java.util.Date`
-* `java.util.HashMap`
-* `java.util.LinkedHashMap`
-* `org.apache.camel.support.DefaultExchangeHolder`
+== Registering classes for serialization
 
-Users can register more classes using `@RegisterForReflection(serialization = true)`.
+If serialization support is requested via `quarkus.camel.native.reflection.serialization-enabled`, the classes listed in https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java[CamelSerializationProcessor.BASE_SERIALIZATION_CLASSES] are automatically registered for serialization.
 
+Users can register more classes using `@RegisterForReflection(serialization = true)`.
diff --git a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java
index d183db3..26fcfd3 100644
--- a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java
+++ b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java
@@ -17,16 +17,20 @@
 package org.apache.camel.quarkus.core.deployment;
 
 import java.math.BigInteger;
+import java.util.AbstractCollection;
+import java.util.AbstractList;
 import java.util.AbstractMap;
+import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.stream.Stream;
 
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import org.apache.camel.CamelExecutionException;
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.quarkus.core.CamelConfig;
 import org.apache.camel.quarkus.core.deployment.spi.CamelSerializationBuildItem;
 import org.apache.camel.support.DefaultExchangeHolder;
@@ -35,6 +39,36 @@ import org.slf4j.LoggerFactory;
 
 public class CamelSerializationProcessor {
     private static final Logger LOGGER = LoggerFactory.getLogger(CamelSerializationProcessor.class);
+    private static final String[] BASE_SERIALIZATION_CLASSES = {
+            // JDK classes
+            AbstractCollection.class.getName(),
+            AbstractList.class.getName(),
+            AbstractMap.class.getName(),
+            BigInteger.class.getName(),
+            Boolean.class.getName(),
+            Byte.class.getName(),
+            Character.class.getName(),
+            Collections.EMPTY_LIST.getClass().getName(),
+            Date.class.getName(),
+            Double.class.getName(),
+            Exception.class.getName(),
+            Float.class.getName(),
+            HashMap.class.getName(),
+            Integer.class.getName(),
+            LinkedHashMap.class.getName(),
+            Long.class.getName(),
+            Number.class.getName(),
+            RuntimeException.class.getName(),
+            StackTraceElement.class.getName(),
+            StackTraceElement[].class.getName(),
+            String.class.getName(),
+            Throwable.class.getName(),
+
+            // Camel classes
+            CamelExecutionException.class.getName(),
+            DefaultExchangeHolder.class.getName(),
+            RuntimeCamelException.class.getName(),
+    };
 
     @BuildStep
     void produceSerializationBuildItem(CamelConfig config, BuildProducer<CamelSerializationBuildItem> serializationBuildItems) {
@@ -51,27 +85,9 @@ public class CamelSerializationProcessor {
             BuildProducer<ReflectiveClassBuildItem> reflectiveClasses) {
 
         if (!serializationRequests.isEmpty()) {
-            String[] classes = Stream.of(Boolean.class,
-                    Byte.class,
-                    Character.class,
-                    Double.class,
-                    Float.class,
-                    Integer.class,
-                    Long.class,
-                    Number.class,
-                    Date.class,
-                    String.class,
-                    AbstractMap.class,
-                    HashMap.class,
-                    LinkedHashMap.class,
-                    BigInteger.class,
-                    DefaultExchangeHolder.class)
-                    .map(c -> c.getName()).toArray(String[]::new);
-
             //required for serialization of BigInteger
             reflectiveClasses.produce(new ReflectiveClassBuildItem(false, false, byte[].class));
-
-            reflectiveClasses.produce(ReflectiveClassBuildItem.serializationClass(classes));
+            reflectiveClasses.produce(ReflectiveClassBuildItem.serializationClass(BASE_SERIALIZATION_CLASSES));
         }
     }
 }
diff --git a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
index 4c0e9ef..79b0a4e 100644
--- a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
+++ b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
@@ -144,6 +144,18 @@ public class HttpResource {
                 .request(String.class);
     }
 
+    @Path("/ahc/serialized/exception")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String ahcSerializedException(@QueryParam("test-port") int port) {
+        Exchange exchange = producerTemplate
+                .toF("ahc:http://localhost:%d/test/server/serialized/exception?bridgeEndpoint=true&transferException=true",
+                        port)
+                .withHeader(Exchange.HTTP_METHOD, "GET")
+                .send();
+        return exchange.getException().getClass().getName();
+    }
+
     // *****************************
     //
     // camel-ahc-ws
@@ -261,6 +273,17 @@ public class HttpResource {
                 .request(String.class);
     }
 
+    @Path("/http/serialized/exception")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String httpSerializedException(@QueryParam("test-port") int port) {
+        Exchange exchange = producerTemplate
+                .toF("http://localhost:%d/test/server/serialized/exception?bridgeEndpoint=true&transferException=true", port)
+                .withHeader(Exchange.HTTP_METHOD, "GET")
+                .send();
+        return exchange.getException().getClass().getName();
+    }
+
     // *****************************
     //
     // camel-netty-http
@@ -346,6 +369,17 @@ public class HttpResource {
         }
     }
 
+    @Path("/netty-http/serialized/exception")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String nettyHttpSerializedException(@QueryParam("test-port") int port) {
+        Exchange exchange = producerTemplate
+                .toF("netty-http:http://localhost:%d/test/server/serialized/exception?transferException=true", port)
+                .withHeader(Exchange.HTTP_METHOD, "GET")
+                .send();
+        return exchange.getException().getClass().getName();
+    }
+
     // *****************************
     //
     // camel-vertx-http
@@ -432,6 +466,17 @@ public class HttpResource {
                 .request(String.class);
     }
 
+    @Path("/vertx-http/serialized/exception")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String vertxHttpSerializedException(@QueryParam("test-port") int port) {
+        Exchange exchange = producerTemplate
+                .toF("vertx-http:http://localhost:%d/test/server/serialized/exception?transferException=true", port)
+                .withHeader(Exchange.HTTP_METHOD, "GET")
+                .send();
+        return exchange.getException().getClass().getName();
+    }
+
     // *****************************
     //
     // Send dynamic tests
diff --git a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpRoute.java b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpRoute.java
index a1a9a05..ed7c891 100644
--- a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpRoute.java
+++ b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpRoute.java
@@ -22,6 +22,7 @@ import java.io.InputStream;
 
 import javax.inject.Named;
 
+import io.quarkus.runtime.annotations.RegisterForReflection;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
@@ -30,12 +31,16 @@ import org.apache.camel.support.jsse.KeyStoreParameters;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.support.jsse.TrustManagersParameters;
 
+@RegisterForReflection(targets = IllegalStateException.class, serialization = true)
 public class HttpRoute extends RouteBuilder {
     @Override
     public void configure() {
         from("netty-http:http://0.0.0.0:{{camel.netty-http.test-port}}/test/server/hello")
                 .transform().constant("Netty Hello World");
 
+        from("netty-http:http://0.0.0.0:{{camel.netty-http.test-port}}/test/server/serialized/exception?transferException=true")
+                .throwException(new IllegalStateException("Forced exception"));
+
         from("netty-http:http://0.0.0.0:{{camel.netty-http.compression-test-port}}/compressed?compression=true")
                 .transform().constant("Netty Hello World Compressed");
 
diff --git a/integration-tests/http/src/main/resources/application.properties b/integration-tests/http/src/main/resources/application.properties
index 610075a..ba7b64f 100644
--- a/integration-tests/http/src/main/resources/application.properties
+++ b/integration-tests/http/src/main/resources/application.properties
@@ -19,6 +19,7 @@
 # Quarkus
 #
 quarkus.native.resources.includes = jsse/*,restcountries/*
+quarkus.camel.native.reflection.serialization-enabled = true
 
 # Basic authentication configuration
 quarkus.security.users.embedded.enabled=true
diff --git a/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java b/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java
index 79b3f59..52007c1 100644
--- a/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java
+++ b/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java
@@ -133,7 +133,7 @@ class HttpTest {
 
     @ParameterizedTest
     @MethodSource("getHttpComponentNames")
-    public void compression(String component) throws Exception {
+    public void compression(String component) {
         final int port = ConfigProvider.getConfig().getValue("camel.netty-http.compression-test-port", Integer.class);
         RestAssured
                 .given()
@@ -145,8 +145,22 @@ class HttpTest {
                 .body(is("Netty Hello World Compressed"));
     }
 
+    @ParameterizedTest
+    @MethodSource("getHttpComponentNames")
+    public void transferException(String component) {
+        final int port = ConfigProvider.getConfig().getValue("camel.netty-http.test-port", Integer.class);
+        RestAssured
+                .given()
+                .queryParam("test-port", port)
+                .when()
+                .get("/test/client/{component}/serialized/exception", component)
+                .then()
+                .statusCode(200)
+                .body(is("java.lang.IllegalStateException"));
+    }
+
     @Test
-    public void basicNettyHttpServer() throws Exception {
+    public void basicNettyHttpServer() {
         final int port = ConfigProvider.getConfig().getValue("camel.netty-http.test-port", Integer.class);
         RestAssured
                 .given()
diff --git a/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsResource.java b/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsResource.java
index 55415ed..164c3ac 100644
--- a/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsResource.java
+++ b/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsResource.java
@@ -47,6 +47,7 @@ import org.apache.camel.ConsumerTemplate;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.jms.JmsMessage;
 import org.apache.camel.component.mock.MockEndpoint;
 
@@ -269,6 +270,19 @@ public class JmsResource {
         return Response.ok().entity(result).build();
     }
 
+    @Path("/jms/transfer/exception")
+    @Produces(MediaType.TEXT_PLAIN)
+    @GET
+    public Response testTransferException() throws InterruptedException {
+        try {
+            producerTemplate.requestBody("jms:queue:transferException?transferException=true", "bad payload");
+        } catch (RuntimeCamelException e) {
+            Class<? extends Throwable> exception = e.getCause().getClass();
+            return Response.ok().entity(exception.getName()).build();
+        }
+        return Response.serverError().build();
+    }
+
     @Path("/jms/topic")
     @Consumes(MediaType.TEXT_PLAIN)
     @POST
diff --git a/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsRoutes.java b/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsRoutes.java
index 86c153b..a1f0a2c 100644
--- a/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsRoutes.java
+++ b/integration-tests/messaging/src/main/java/org/apache/camel/quarkus/component/messaging/it/JmsRoutes.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.quarkus.component.messaging.it;
 
+import io.quarkus.runtime.annotations.RegisterForReflection;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.ErrorHandlerBuilder;
@@ -23,6 +24,7 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.jta.JtaTransactionErrorHandlerBuilder;
 import org.apache.camel.processor.errorhandler.RedeliveryPolicy;
 
+@RegisterForReflection(targets = IllegalStateException.class, serialization = true)
 public class JmsRoutes extends RouteBuilder {
 
     @Override
@@ -61,6 +63,9 @@ public class JmsRoutes extends RouteBuilder {
         from("jms:queue:transferExchange?transferExchange=true")
                 .to("mock:transferExchangeResult");
 
+        from("jms:queue:transferException?transferException=true")
+                .throwException(new IllegalStateException("Forced exception"));
+
         from("jms:queue:objectTest")
                 .to("mock:objectTestResult");
 
diff --git a/integration-tests/messaging/src/test/java/org/apache/camel/quarkus/component/messaging/it/JmsTest.java b/integration-tests/messaging/src/test/java/org/apache/camel/quarkus/component/messaging/it/JmsTest.java
index cd68ddd..d9737d3 100644
--- a/integration-tests/messaging/src/test/java/org/apache/camel/quarkus/component/messaging/it/JmsTest.java
+++ b/integration-tests/messaging/src/test/java/org/apache/camel/quarkus/component/messaging/it/JmsTest.java
@@ -173,6 +173,15 @@ class JmsTest {
     }
 
     @Test
+    public void testJmsTransferException() {
+        RestAssured.given()
+                .get("/messaging/jms/transfer/exception")
+                .then()
+                .statusCode(200)
+                .body(is("java.lang.IllegalStateException"));
+    }
+
+    @Test
     public void testJmsTransaction() {
         RestAssured.given()
                 .get("/messaging/jms/transaction")

[camel-quarkus] 03/03: Fix broken link to command-mode itest

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 4c701684c263ca5446275b74ad3e739ba0a2b6aa
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Jul 23 11:43:32 2021 +0100

    Fix broken link to command-mode itest
---
 docs/modules/ROOT/pages/user-guide/command-mode.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/user-guide/command-mode.adoc b/docs/modules/ROOT/pages/user-guide/command-mode.adoc
index ddf3589..8bc975f 100644
--- a/docs/modules/ROOT/pages/user-guide/command-mode.adoc
+++ b/docs/modules/ROOT/pages/user-guide/command-mode.adoc
@@ -208,7 +208,7 @@ $ target/*runner -Dgreeted.subject=Joe
 == Source code
 
 The sources of the application used in this blog post are based on the `main-command-mode` integration test in the Camel Quarkus source tree:
-https://github.com/apache/camel-quarkus/tree/master/integration-tests/main-command-mode[https://github.com/apache/camel-quarkus/tree/master/integration-tests/main-command-mode]
+https://github.com/apache/camel-quarkus/tree/main/integration-tests/main-command-mode[https://github.com/apache/camel-quarkus/tree/main/integration-tests/main-command-mode]
 
 Bonus: The integration test module shows a way how to test command line applications.
 

[camel-quarkus] 02/03: Automate the generation of documentation for the transferException option

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit ce860720074c8ebc1419f35e8624cf0acbb48856
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Jul 23 11:44:38 2021 +0100

    Automate the generation of documentation for the transferException option
---
 .../ROOT/pages/reference/extensions/activemq.adoc  | 11 +++++++++++
 .../ROOT/pages/reference/extensions/ahc-ws.adoc    | 11 +++++++++++
 .../ROOT/pages/reference/extensions/ahc.adoc       | 11 +++++++++++
 .../ROOT/pages/reference/extensions/amqp.adoc      | 11 +++++++++++
 .../ROOT/pages/reference/extensions/core.adoc      |  4 +---
 .../ROOT/pages/reference/extensions/http.adoc      | 11 +++++++++++
 .../ROOT/pages/reference/extensions/jms.adoc       | 11 +++++++++++
 .../pages/reference/extensions/netty-http.adoc     | 11 +++++++++++
 .../ROOT/pages/reference/extensions/rabbitmq.adoc  | 11 +++++++++++
 .../ROOT/pages/reference/extensions/servlet.adoc   | 11 +++++++++++
 .../ROOT/pages/reference/extensions/sjms.adoc      | 11 +++++++++++
 .../ROOT/pages/reference/extensions/sjms2.adoc     | 11 +++++++++++
 .../pages/reference/extensions/vertx-http.adoc     | 11 +++++++++++
 .../org/apache/camel/quarkus/core/CamelConfig.java | 22 ++++------------------
 .../quarkus/maven/UpdateExtensionDocPageMojo.java  | 13 ++++++++-----
 .../doc-templates/extension-doc-page.adoc          | 13 +++++++++++++
 16 files changed, 158 insertions(+), 26 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/activemq.adoc b/docs/modules/ROOT/pages/reference/extensions/activemq.adoc
index d3db74d..63a2acc 100644
--- a/docs/modules/ROOT/pages/reference/extensions/activemq.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/activemq.adoc
@@ -63,3 +63,14 @@ is excluded from the dependency tree, since none of the ActiveMQ broker function
 This extension auto-enables SSL support in native mode. Hence you do not need to add
 `quarkus.ssl.native=true` to your `application.properties` yourself. See also
 https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/ahc-ws.adoc b/docs/modules/ROOT/pages/reference/extensions/ahc-ws.adoc
index c70eccb..000fe04 100644
--- a/docs/modules/ROOT/pages/reference/extensions/ahc-ws.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/ahc-ws.adoc
@@ -45,3 +45,14 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 This extension auto-enables SSL support in native mode. Hence you do not need to add
 `quarkus.ssl.native=true` to your `application.properties` yourself. See also
 https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/ahc.adoc b/docs/modules/ROOT/pages/reference/extensions/ahc.adoc
index 89b3785..2d291dd 100644
--- a/docs/modules/ROOT/pages/reference/extensions/ahc.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/ahc.adoc
@@ -45,6 +45,17 @@ This extension auto-enables SSL support in native mode. Hence you do not need to
 `quarkus.ssl.native=true` to your `application.properties` yourself. See also
 https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
 
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
+
 == Additional Camel Quarkus configuration
 
 * Check the xref:user-guide/native-mode.adoc#charsets[Character encodings section] of the Native mode guide if you expect
diff --git a/docs/modules/ROOT/pages/reference/extensions/amqp.adoc b/docs/modules/ROOT/pages/reference/extensions/amqp.adoc
index ddb3e1a..a778a1c 100644
--- a/docs/modules/ROOT/pages/reference/extensions/amqp.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/amqp.adoc
@@ -52,6 +52,17 @@ When sending JMS message payloads as `javax.jms.ObjectMessage`, you must annotat
 Note that this extension automatically sets `quarkus.camel.native.reflection.serialization-enabled = true` for you. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide] for more information.
 
 
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
+
 == Additional Camel Quarkus configuration
 
 The extension leverages the https://github.com/amqphub/quarkus-qpid-jms/[Quarkus Qpid JMS] extension. A ConnectionFactory bean is automatically created
diff --git a/docs/modules/ROOT/pages/reference/extensions/core.adoc b/docs/modules/ROOT/pages/reference/extensions/core.adoc
index d04c38a..ce38e53 100644
--- a/docs/modules/ROOT/pages/reference/extensions/core.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/core.adoc
@@ -226,9 +226,7 @@ A comma separated list of Ant-path style patterns to match class names that shou
 
 |icon:lock[title=Fixed at build time] [[quarkus.camel.native.reflection.serialization-enabled]]`link:#quarkus.camel.native.reflection.serialization-enabled[quarkus.camel.native.reflection.serialization-enabled]`
 
-If `true`, basic classes are registered for serialization; otherwise basic classes won't be registered automatically for serialization in native mode. 
- List of basic classes: `java.lang.Boolean` `java.lang.Byte` `java.lang.Character` `java.lang.Float` `java.lang.Double` `java.lang.Integer` `java.lang.Long` `java.lang.Number` `java.lang.String` `java.math.BigInteger` `java.util.Date` `java.util.HashMap` `java.util.LinkedHashMap` `org.apache.camel.support.DefaultExchangeHolder` 
- Setting this to `false` helps to reduce the size of the native image. In JVM mode, there is no real benefit of setting this flag to `true` except for making the behavior consistent with native mode.
+If `true`, basic classes are registered for serialization; otherwise basic classes won't be registered automatically for serialization in native mode. The list of classes automatically registered for serialization can be found in link:https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java[CamelSerializationProcessor.BASE_SERIALIZATION_CLASSES]. Setting this to `false` helps  [...]
 | `boolean`
 | `false`
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/http.adoc b/docs/modules/ROOT/pages/reference/extensions/http.adoc
index f2c6e0c..63e7eb4 100644
--- a/docs/modules/ROOT/pages/reference/extensions/http.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/http.adoc
@@ -46,6 +46,17 @@ This extension auto-enables SSL support in native mode. Hence you do not need to
 `quarkus.ssl.native=true` to your `application.properties` yourself. See also
 https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
 
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
+
 == Additional Camel Quarkus configuration
 
 * Check the xref:user-guide/native-mode.adoc#charsets[Character encodings section] of the Native mode guide if you expect
diff --git a/docs/modules/ROOT/pages/reference/extensions/jms.adoc b/docs/modules/ROOT/pages/reference/extensions/jms.adoc
index 2db5e96..9f98034 100644
--- a/docs/modules/ROOT/pages/reference/extensions/jms.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/jms.adoc
@@ -51,3 +51,14 @@ you must ensure that the `camel-quarkus-jaxp` extension is present on the classp
 When sending JMS message payloads as `javax.jms.ObjectMessage`, you must annotate the relevant classes to be registered for serialization with `@RegisterForReflection(serialization = true)`. 
 Note that this extension automatically sets `quarkus.camel.native.reflection.serialization-enabled = true` for you. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide] for more information.
 
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/netty-http.adoc b/docs/modules/ROOT/pages/reference/extensions/netty-http.adoc
index 67dc543..c36f9a4 100644
--- a/docs/modules/ROOT/pages/reference/extensions/netty-http.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/netty-http.adoc
@@ -40,6 +40,17 @@ Or add the coordinates to your existing project:
 
 Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
 
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
+
 == Additional Camel Quarkus configuration
 
 * Check the xref:user-guide/native-mode.adoc#charsets[Character encodings section] of the Native mode guide if you expect
diff --git a/docs/modules/ROOT/pages/reference/extensions/rabbitmq.adoc b/docs/modules/ROOT/pages/reference/extensions/rabbitmq.adoc
index 33a9281..f0c6534 100644
--- a/docs/modules/ROOT/pages/reference/extensions/rabbitmq.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/rabbitmq.adoc
@@ -38,3 +38,14 @@ Or add the coordinates to your existing project:
 ----
 
 Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/servlet.adoc b/docs/modules/ROOT/pages/reference/extensions/servlet.adoc
index c27f993..01c933b 100644
--- a/docs/modules/ROOT/pages/reference/extensions/servlet.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/servlet.adoc
@@ -39,6 +39,17 @@ Or add the coordinates to your existing project:
 
 Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
 
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
+
 == Additional Camel Quarkus configuration
 
 [width="100%",cols="80,5,15",options="header"]
diff --git a/docs/modules/ROOT/pages/reference/extensions/sjms.adoc b/docs/modules/ROOT/pages/reference/extensions/sjms.adoc
index d029fec..2cb6c05 100644
--- a/docs/modules/ROOT/pages/reference/extensions/sjms.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/sjms.adoc
@@ -51,3 +51,14 @@ you must ensure that the `camel-quarkus-jaxp` extension is present on the classp
 When sending JMS message payloads as `javax.jms.ObjectMessage`, you must annotate the relevant classes to be registered for serialization with `@RegisterForReflection(serialization = true)`. 
 Note that this extension automatically sets `quarkus.camel.native.reflection.serialization-enabled = true` for you. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide] for more information.
 
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/sjms2.adoc b/docs/modules/ROOT/pages/reference/extensions/sjms2.adoc
index dd5569c..fbee92a 100644
--- a/docs/modules/ROOT/pages/reference/extensions/sjms2.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/sjms2.adoc
@@ -51,3 +51,14 @@ you must ensure that the `camel-quarkus-jaxp` extension is present on the classp
 When sending JMS message payloads as `javax.jms.ObjectMessage`, you must annotate the relevant classes to be registered for serialization with `@RegisterForReflection(serialization = true)`. 
 Note that this extension automatically sets `quarkus.camel.native.reflection.serialization-enabled = true` for you. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide] for more information.
 
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/vertx-http.adoc b/docs/modules/ROOT/pages/reference/extensions/vertx-http.adoc
index 81f329c..c70d6a0 100644
--- a/docs/modules/ROOT/pages/reference/extensions/vertx-http.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/vertx-http.adoc
@@ -37,3 +37,14 @@ Or add the coordinates to your existing project:
 ----
 
 Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
diff --git a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java
index a413fbf..0d8a6bc 100644
--- a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java
+++ b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java
@@ -284,24 +284,10 @@ public class CamelConfig {
         /**
          * If {@code true}, basic classes are registered for serialization; otherwise basic classes won't be registered
          * automatically for serialization in native mode.
-         * <p>
-         * List of basic classes:
-         * {@code java.lang.Boolean}
-         * {@code java.lang.Byte}
-         * {@code java.lang.Character}
-         * {@code java.lang.Float}
-         * {@code java.lang.Double}
-         * {@code java.lang.Integer}
-         * {@code java.lang.Long}
-         * {@code java.lang.Number}
-         * {@code java.lang.String}
-         * {@code java.math.BigInteger}
-         * {@code java.util.Date}
-         * {@code java.util.HashMap}
-         * {@code java.util.LinkedHashMap}
-         * {@code org.apache.camel.support.DefaultExchangeHolder}
-         * 
-         * <p>
+         *
+         * The list of classes automatically registered for serialization can be found in <a href=
+         * "https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java">CamelSerializationProcessor.BASE_SERIALIZATION_CLASSES</a>.
+         *
          * Setting this to {@code false} helps to reduce the size of the native image. In JVM mode, there is no real
          * benefit of setting this flag to {@code true} except for making the behavior consistent with native mode.
          */
diff --git a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java
index e57da0f..c69e764 100644
--- a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java
+++ b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java
@@ -129,7 +129,11 @@ public class UpdateExtensionDocPageMojo extends AbstractDocGeneratorMojo {
         model.put("activatesNativeSsl", ext.isNativeSupported() && detectNativeSsl(multiModuleProjectDirectory.toPath(),
                 basePath, ext.getRuntimeArtifactId(), ext.getDependencies(), nativeSslActivators));
         model.put("activatesContextMapAll",
-                ext.isNativeSupported() && detectAllowContextMapAll(catalog, ext.getRuntimeArtifactIdBase()));
+                ext.isNativeSupported()
+                        && detectComponentOrEndpointOption(catalog, ext.getRuntimeArtifactIdBase(), "allowContextMapAll"));
+        model.put("activatesTransferException",
+                ext.isNativeSupported()
+                        && detectComponentOrEndpointOption(catalog, ext.getRuntimeArtifactIdBase(), "transferException"));
         model.put("configOptions", listConfigOptions(basePath, multiModuleProjectDirectory.toPath()));
         model.put("humanReadableKind", new TemplateMethodModelEx() {
             @Override
@@ -326,20 +330,19 @@ public class UpdateExtensionDocPageMojo extends AbstractDocGeneratorMojo {
         }
     }
 
-    static boolean detectAllowContextMapAll(CqCatalog catalog, String artifactId) {
-        final String allowContextMapAll = "allowContextMapAll";
+    static boolean detectComponentOrEndpointOption(CqCatalog catalog, String artifactId, String option) {
         return catalog.filterModels(artifactId)
                 .filter(m -> m instanceof ComponentModel)
                 .map(m -> (ComponentModel) m)
                 .anyMatch(componentModel -> {
                     for (ComponentModel.ComponentOptionModel model : componentModel.getOptions()) {
-                        if (model.getName().equals(allowContextMapAll)) {
+                        if (model.getName().equals(option)) {
                             return true;
                         }
                     }
 
                     for (ComponentModel.EndpointOptionModel model : componentModel.getEndpointOptions()) {
-                        if (model.getName().equals(allowContextMapAll)) {
+                        if (model.getName().equals(option)) {
                             return true;
                         }
                     }
diff --git a/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc b/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc
index ed689e0..92c2e71 100644
--- a/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc
+++ b/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc
@@ -68,6 +68,19 @@ https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
 The `allowContextMapAll` option is not supported in native mode as it requires reflective access to security sensitive camel core classes such as
 `CamelContext` & `Exchange`. This is considered a security risk and thus access to the feature is not provided by default.
 [/#if]
+[#if activatesTransferException ]
+
+== transferException option in native mode
+
+To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
+for more information.
+
+You will also need to enable serialization for the exception classes that you intend to serialize. For example.
+[source,java]
+----
+@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
+----
+[/#if]
 [#if configuration?? || configOptions?size != 0 ]
 
 == Additional Camel Quarkus configuration