You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/08/17 07:30:07 UTC

[camel] branch main updated (ff30215 -> 453e57a)

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

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


    from ff30215  CAMEL-16122: camel-graphql - Supply query via body or header.
     new 0a254cc  Polish and cleanup documentation
     new 3d6c296  Polish and cleanup documentation
     new 757aa58  Polish and cleanup documentation
     new a4fdb3e  Polish and cleanup documentation
     new adbd552  Polish and cleanup documentation
     new 3fdc422  Polish and cleanup documentation
     new a8960f4  Polish and cleanup documentation
     new 6670bff  Polish and cleanup documentation
     new 8821cc2  Polish and cleanup documentation
     new 0138f26  Polish and cleanup documentation
     new 4e323f6  Polish and cleanup documentation
     new c90b1d4  Polished
     new b9d0b23  Upgrade apache any23 and regen
     new 6cd7833  Polish and cleanup documentation
     new 453e57a  Polish and cleanup documentation

The 15 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:
 camel-dependencies/pom.xml                         |   6 +-
 .../apache/camel/catalog/components/graphql.json   |   2 +
 .../camel/catalog/docs/content-enricher.adoc       |   2 +-
 .../camel/catalog/docs/datasonnet-language.adoc    |  13 +-
 .../apache/camel/catalog/docs/groovy-language.adoc |  21 +-
 .../camel/catalog/docs/message-translator.adoc     |   2 +-
 .../camel/catalog/docs/polling-consumer.adoc       |   1 -
 .../catalog/docs/publish-subscribe-channel.adoc    |   2 +-
 .../apache/camel/catalog/docs/rollback-eip.adoc    |  10 -
 .../apache/camel/catalog/docs/spring-summary.adoc  |   3 +-
 .../apache/camel/catalog/docs/sql-component.adoc   |   4 +-
 .../camel/catalog/docs/transactional-client.adoc   |  11 +-
 .../apache/camel/catalog/docs/unmarshal-eip.adoc   |   3 +-
 .../org/apache/camel/catalog/docs/wireTap-eip.adoc |   1 -
 .../apache/camel/catalog/docs/xpath-language.adoc  |  39 +--
 .../camel/catalog/docs/xquery-component.adoc       |   9 +-
 .../apache/camel/catalog/docs/xquery-language.adoc |  13 +-
 components/camel-any23/pom.xml                     |  23 +-
 .../src/main/docs/datasonnet-language.adoc         |  13 +-
 .../src/main/docs/groovy-language.adoc             |  21 +-
 .../src/main/docs/xquery-component.adoc            |   9 +-
 .../camel-saxon/src/main/docs/xquery-language.adoc |  13 +-
 .../camel-spring/src/main/docs/spring-summary.adoc |   3 +-
 .../camel-sql/src/main/docs/sql-component.adoc     |   4 +-
 .../camel-xpath/src/main/docs/xpath-language.adoc  |  39 +--
 .../docs/modules/eips/pages/content-enricher.adoc  |   2 +-
 .../modules/eips/pages/message-translator.adoc     |   2 +-
 .../docs/modules/eips/pages/polling-consumer.adoc  |   1 -
 .../eips/pages/publish-subscribe-channel.adoc      |   2 +-
 .../main/docs/modules/eips/pages/rollback-eip.adoc |  10 -
 .../modules/eips/pages/transactional-client.adoc   |  11 +-
 .../docs/modules/eips/pages/unmarshal-eip.adoc     |   3 +-
 .../main/docs/modules/eips/pages/wireTap-eip.adoc  |   1 -
 .../modules/ROOT/pages/spring-summary.adoc         |   3 +-
 .../modules/ROOT/pages/sql-component.adoc          |   4 +-
 .../modules/ROOT/pages/xquery-component.adoc       |   9 +-
 .../languages/pages/datasonnet-language.adoc       |  13 +-
 .../modules/languages/pages/groovy-language.adoc   |  21 +-
 .../modules/languages/pages/xpath-language.adoc    |  39 +--
 .../modules/languages/pages/xquery-language.adoc   |  13 +-
 docs/user-manual/modules/ROOT/nav.adoc             |   3 -
 .../modules/ROOT/pages/data-format.adoc            |   3 +-
 .../modules/ROOT/pages/getting-started.adoc        |   3 +-
 docs/user-manual/modules/ROOT/pages/index.adoc     |  10 +-
 .../modules/ROOT/pages/spring-xml-extensions.adoc  | 182 ++++++++++++--
 docs/user-manual/modules/ROOT/pages/spring.adoc    | 279 ++-------------------
 .../modules/ROOT/pages/stream-caching.adoc         | 243 ++----------------
 .../user-manual/modules/ROOT/pages/templating.adoc |  50 ----
 docs/user-manual/modules/ROOT/pages/testing.adoc   |  10 -
 docs/user-manual/modules/ROOT/pages/tracer.adoc    |   8 +-
 .../ROOT/pages/transactionerrorhandler.adoc        | 172 -------------
 .../modules/ROOT/pages/transformer.adoc            |  78 +++---
 docs/user-manual/modules/ROOT/pages/transport.adoc |  21 --
 .../modules/ROOT/pages/try-catch-finally.adoc      | 178 +++++++------
 .../modules/ROOT/pages/type-converter.adoc         | 269 +++++++-------------
 docs/user-manual/modules/ROOT/pages/uris.adoc      |  29 ++-
 .../modules/ROOT/pages/using-this-pattern.adoc     |   8 -
 .../modules/ROOT/pages/uuidgenerator.adoc          |  34 +--
 docs/user-manual/modules/ROOT/pages/validator.adoc |  59 ++---
 .../modules/ROOT/pages/writing-components.adoc     |  39 +--
 .../modules/ROOT/pages/xml-configuration.adoc      |  16 --
 ...how-do-i-import-rests-from-other-xml-files.adoc |   3 +-
 ...ow-do-i-import-routes-from-other-xml-files.adoc |   2 +-
 .../how-do-i-use-uris-with-parameters-in-xml.adoc  |   3 +-
 .../modules/faq/pages/is-there-an-ide.adoc         |   3 +-
 .../modules/faq/pages/what-is-camel.adoc           |   9 +-
 parent/pom.xml                                     |   6 +-
 67 files changed, 692 insertions(+), 1429 deletions(-)
 delete mode 100644 docs/user-manual/modules/ROOT/pages/templating.adoc
 delete mode 100644 docs/user-manual/modules/ROOT/pages/transactionerrorhandler.adoc
 delete mode 100644 docs/user-manual/modules/ROOT/pages/transport.adoc
 delete mode 100644 docs/user-manual/modules/ROOT/pages/using-this-pattern.adoc
 delete mode 100644 docs/user-manual/modules/ROOT/pages/xml-configuration.adoc

[camel] 14/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 6cd7833794d1f623911d44ba8848b05a1c0b7dc8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 17 09:15:15 2021 +0200

    Polish and cleanup documentation
---
 docs/user-manual/modules/ROOT/pages/uris.adoc | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/uris.adoc b/docs/user-manual/modules/ROOT/pages/uris.adoc
index 1d5c762..369ec82 100644
--- a/docs/user-manual/modules/ROOT/pages/uris.adoc
+++ b/docs/user-manual/modules/ROOT/pages/uris.adoc
@@ -1,17 +1,28 @@
 [[URIs-URIs]]
 = URIs
 
-Camel makes extensive use of URIs to allow you to refer to xref:endpoint.adoc[Endpoint]s
-which are lazily created by a xref:component.adoc[Component] if you
-refer to them within xref:routes.adoc[Routes] from the xref:dsl.adoc[DSL].
+Camel makes extensive use of URIs to allow you to refer to xref:endpoint.adoc[Endpoint]s.
+
+For example the following URI:
+
+[source,text]
+----
+kafka:cheese?brokers=mykafka:1234&clientId=foo
+----
+
+This endpoint is created by the xref:components::kafka-component.adoc[Kafka] component.
+The URI contains endpoint configurations as context-path and query parameters.
+In this example the context-path is `cheese` which is the kafka topic to use.
+
+The query parameters have two parameters:
+
+- `brokers=mykafka:1234` which is the remote Kafka broker to connect to.
+- `clientId=foo` is the client id
 
-[IMPORTANT]
-====
 Make sure to read
 xref:faq:how-do-i-configure-endpoints.adoc[How do I configure endpoints]
 to learn more about configuring endpoints. For
 example how to refer to beans in the xref:registry.adoc[registry] or how
 to use raw values for password options, and using
-xref:using-propertyplaceholder.adoc[property placeholders] etc.
-====
-
+xref:using-propertyplaceholder.adoc[property placeholders], or how to use
+the type safe xref:Endpoint-dsl.adoc[Endpoint DSL].

[camel] 12/15: Polished

Posted by da...@apache.org.
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

commit c90b1d485090a7ad0ee45c86f0dfe6fa2682c946
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 17 06:19:15 2021 +0200

    Polished
---
 components/camel-any23/pom.xml | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/components/camel-any23/pom.xml b/components/camel-any23/pom.xml
index 3bbb034..fd116d5 100644
--- a/components/camel-any23/pom.xml
+++ b/components/camel-any23/pom.xml
@@ -42,17 +42,6 @@
     </dependency>
 
 
-    <!-- test dependencies -->
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-test-junit5</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.apache.any23</groupId>
       <artifactId>apache-any23-core</artifactId>
@@ -65,6 +54,18 @@
       <groupId>org.eclipse.rdf4j</groupId>
       <artifactId>rdf4j-rio-api</artifactId>
     </dependency>
+
+    <!-- test dependencies -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test-junit5</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-http</artifactId>

[camel] 02/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 3d6c296100291d00f8247b16551f0e5f9a5186eb
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 13:17:00 2021 +0200

    Polish and cleanup documentation
---
 .../modules/ROOT/pages/spring-xml-extensions.adoc  | 182 ++++++++++++--
 docs/user-manual/modules/ROOT/pages/spring.adoc    | 271 ++-------------------
 2 files changed, 175 insertions(+), 278 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc b/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc
index 65dbd15..4b9a6ba 100644
--- a/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc
+++ b/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc
@@ -1,33 +1,165 @@
-[[SpringXMLExtensions-SpringXMLExtensions]]
-= Spring XML Extensions
+[[SpringXML-SpringXM]]
+= Spring XML
 
-The Camel Spring XML Extensions allow you use a very concise XML syntax
-to describe your Camel configuration when you are using spring to wire
-together your application.
+Using Camel with Spring XML files, is a classic way, of using XML DSL with Camel.
+Camel has historically been using Spring XML for a long time.
+The Spring framework started with XML files as a popular and common configuration for building Spring applications.
 
 The following is an example of what it looks like:
 
 [source,xml]
 ----
-<camelContext errorHandlerRef="errorHandler" xmlns="http://camel.apache.org/schema/spring">
-    <route>
-        <from uri="direct:a"/>
-        <choice>
-            <when>
-                <xpath>$foo = 'bar'</xpath>
-                <to uri="direct:b"/>
-            </when>
-            <when>
-                <xpath>$foo = 'cheese'</xpath>
-                <to uri="direct:c"/>
-            </when>
-            <otherwise>
-                <to uri="direct:d"/>
-            </otherwise>
-        </choice>
-    </route>
-</camelContext>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+        <route>
+            <from uri="direct:a"/>
+            <choice>
+                <when>
+                    <xpath>$foo = 'bar'</xpath>
+                    <to uri="direct:b"/>
+                </when>
+                <when>
+                    <xpath>$foo = 'cheese'</xpath>
+                    <to uri="direct:c"/>
+                </when>
+                <otherwise>
+                    <to uri="direct:d"/>
+                </otherwise>
+            </choice>
+        </route>
+    </camelContext>
+
+</beans>
 ----
 
-For more usage examples see the
-xref:{eip-vc}:eips:enterprise-integration-patterns.adoc[Enterprise Integration Patterns].
+== Using Spring XML
+
+You can use Spring XML files to specify Camel routes using XML DSL as shown:
+
+[source,xml]
+--------------------------------------------------------------------------------------------------------------
+<camelContext id="camel-A" xmlns="http://camel.apache.org/schema/spring">
+  <route>
+    <from uri="seda:start"/>
+    <to uri="mock:result"/>
+  </route>
+</camelContext>
+--------------------------------------------------------------------------------------------------------------
+
+=== Configuring Components and Endpoints
+
+You can configure your Component or xref:endpoint.adoc[Endpoint] instances in your Spring XML as follows in this example.
+
+[source,xml]
+--------------------------------------------------------------------------------------------------------------
+<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+</camelContext>
+
+<bean id="activemq" class="org.apache.camel.component.activemq.ActiveMQComponent">
+  <property name="connectionFactory">
+    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+      <property name="brokerURL" value="tcp:someserver:61616"/>
+    </bean>
+  </property>
+</bean>
+--------------------------------------------------------------------------------------------------------------
+
+Which allows you to configure a component using any name, but its common to use the same name
+eg (`activemq`). Then you can refer to the component using `activemq:destinationName`.
+
+This works by the Camel lazily fetching components from the Spring context for the scheme name you use for Endpoint xref:uris.adoc[URI]s.
+
+
+
+
+== Using Java DSL with Spring XML files
+
+You can use Java Code to define your xref:route-builder.adoc[RouteBuilder] implementations. These can be defined as beans in spring and then referenced in your camel context e.g.
+
+[source,xml]
+--------------------------------------------------------------------------------------------------------------
+<camelContext xmlns="http://camel.apache.org/schema/spring">
+  <routeBuilder ref="myBuilder" />
+</camelContext>
+
+<bean id="myBuilder" class="org.apache.camel.spring.example.test1.MyRouteBuilder"/>
+--------------------------------------------------------------------------------------------------------------
+
+=== Using package scanning
+
+Camel also provides a powerful feature that allows for the automatic discovery and initialization of routes in given packages. This is configured by adding tags to the camel context in your spring context definition, specifying the packages to be recursively searched for RouteBuilder implementations. To use this feature in 1.X, requires a <package></package> tag specifying a comma separated list of packages that should be searched e.g.
+
+[source,xml]
+--------------------------------------------------------------------------------------------------------------
+<camelContext>
+  <packageScan>
+    <package>com.foo</package>
+    <excludes>**.*Excluded*</excludes>
+    <includes>**.*</includes>
+  </packageScan>
+</camelContext>
+--------------------------------------------------------------------------------------------------------------
+
+This will scan for `RouteBuilder` classes in the _com.foo_ and sub-packages.
+
+You can also filter the classes with includes or excludes such as:
+
+[source,xml]
+--------------------------------------------------------------------------------------------------------------
+<camelContext>
+  <packageScan>
+    <package>com.foo</package>
+    <excludes>**.*Special*</excludes>
+  </packageScan>
+</camelContext>
+--------------------------------------------------------------------------------------------------------------
+
+Which will skip classes that has _Special_ in the name.
+
+Exclude patterns are applied before the include patterns. If no include or exclude patterns are defined then all the Route classes discovered in the packages will be returned.
+
+`?` matches one character `\*` matches zero or more characters `**` matches zero or more segments of a fully qualified name
+
+=== Using context scanning
+
+You can allow Camel to scan the container context, e.g. the Spring ApplicationContext for route builder instances. This allow you to use the Spring *<component-scan>* feature and have Camel pickup any *`RouteBuilder`* instances which was created by Spring in its scan process.
+
+[source,xml]
+--------------------------------------------------------------------------------------------------------------
+<!-- enable Spring @Component scan -->
+<context:component-scan base-package="org.apache.camel.spring.issues.contextscan"/>
+
+<camelContext xmlns="http://camel.apache.org/schema/spring">
+    <!-- and then let Camel use those @Component scanned route builders -->
+    <contextScan/>
+</camelContext>
+--------------------------------------------------------------------------------------------------------------
+
+This allows you to just annotate your routes using the Spring *`@Component`*  and have those routes included by Camel:
+
+[source,java]
+--------------------------------------------------------------------------------------------------------------
+@Component
+public class MyRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start")
+            .to("mock:result");
+    }
+}
+--------------------------------------------------------------------------------------------------------------
+
+You can also use the ANT style for inclusion and exclusion, as mentioned above in the package scan section.
+
+
+
+== Additional configuration of Spring XML
+
+See more details at xref:advanced-configuration-of-camelcontext-using-spring.adoc[Advanced configuration of CamelContext using Spring].
diff --git a/docs/user-manual/modules/ROOT/pages/spring.adoc b/docs/user-manual/modules/ROOT/pages/spring.adoc
index a474d2b..481e395 100644
--- a/docs/user-manual/modules/ROOT/pages/spring.adoc
+++ b/docs/user-manual/modules/ROOT/pages/spring.adoc
@@ -4,275 +4,40 @@
 Apache Camel is designed to work first class with Spring in a number of ways, such as:
 
 * Camel runs on Spring Boot with the Camel Spring Boot project
-* Camel works with Spring XML configuration files (classic Spring XML)
+* Camel works with Spring XML files (classic Spring XML)
 * Camel works with Spring dependency injection
 * Camel works with Spring configuration and property placeholders
 * Camel works with Spring transactions
 * Camel works with Spring testing
 
-== Using Spring to configure the CamelContext
+== Using Camel on Spring Boot
 
-You can configure a CamelContext inside any spring.xml using the CamelContextFactoryBean. This will automatically start the CamelContext along with any referenced Routes along any referenced Component and Endpoint instances.
+See the xref:/camel-spring-boot/latest/[Camel Spring Boot] project.
 
-* Adding Camel schema
-* Configure Routes in two ways:
-** Using Java Code
-** Using Spring XML
+== Using Camel with Spring XML files
 
-[[Spring-AddingCamelSchema]]
-== Adding Camel Schema
-For Camel 1.x you need to use the following namespace:
-....
-http://activemq.apache.org/camel/schema/spring
-....
+Using Camel with Spring XML files, is a classic way, of using XML DSL with Camel.
+Camel has historically been using Spring XML for a long time. The Spring framework
+started with XML files as a popular and common configuration for building Spring applications.
 
-with the following schema location:
-....
-http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-....
+To use Camel with Spring XML files see the xref:spring-xml-extensions.adoc[Spring XML] documentation.
 
-You need to add Camel to the schemaLocation declaration
-....
-http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-....
+== Using Spring dependency injection
 
-So the XML file looks like this:
+Spring dependency injection is integrated first-class when using Spring and Spring together.
 
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
---------------------------------------------------------------------------------------------------------------
+For example when using Camel on Spring Boot, then you can use any kind of Spring dependency and
+be able to inject Camel resources such as 'CamelContext', xref:endpoint.adoc[Endpoint] and many more.
 
-== Using `camel:` Namespace
-Or you can refer to the camel XSD in the XML declaration:
-....
-xmlns:camel="http://camel.apache.org/schema/spring"
-....
+== Using Camel with Spring configuration and property placeholders
 
-... so the declaration is:
-....
-xsi:schemaLocation="
-http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-....
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<beans xmlns="http://www.springframework.org/schema/beans"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xmlns:camel="http://camel.apache.org/schema/spring"
-        xsi:schemaLocation="
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-           http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+See xref:using-propertyplaceholder.adoc[Using Property Placeholder] documentation.
 
---------------------------------------------------------------------------------------------------------------
+== Using Camel with Spring transactions
 
-... and then use the camel: namespace prefix, and you can omit the inline namespace declaration:
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-  <camel:camelContext id="camel5">
-    <camel:package>org.apache.camel.spring.example</camel:package>
-  </camel:camelContext>
---------------------------------------------------------------------------------------------------------------
+See xref:{eip-vc}:eips:transactional-client.adoc[Transactional Client]} EIP.
 
-== Advanced Configuration Using Spring
-See more details at Advanced configuration of CamelContext using Spring
+== Using Camel with Spring testing
 
-== Using Java Code
-You can use Java Code to define your xref:route-builder.adoc[RouteBuilder] implementations. These can be defined as beans in spring and then referenced in your camel context e.g.
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<camelContext id="camel5" xmlns="http://camel.apache.org/schema/spring">
-  <routeBuilder ref="myBuilder" />
-</camelContext>
-<bean id="myBuilder" class="org.apache.camel.spring.example.test1.MyRouteBuilder"/>
---------------------------------------------------------------------------------------------------------------
-
-== Using <package>
-Camel also provides a powerful feature that allows for the automatic discovery and initialization of routes in given packages. This is configured by adding tags to the camel context in your spring context definition, specifying the packages to be recursively searched for RouteBuilder implementations. To use this feature in 1.X, requires a <package></package> tag specifying a comma separated list of packages that should be searched e.g.
-
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<camel:camelContext id="camel5">
-  <camel:package>org.apache.camel.spring.example</camel:package>
-</camel:camelContext>
---------------------------------------------------------------------------------------------------------------
-Use caution when specifying the package name as org.apache.camel or a sub package of this. This causes Camel to search in its own packages for your routes which could cause problems.
-
-Will ignore already instantiated classes
-
-The *`<package>`* and *`<packageScan>`* will skip any classes which has already been created by Spring etc. So if you define a route builder as a spring bean tag then that class will be skipped. You can include those beans using *`<routeBuilder ref="theBeanId"/>`* or the *`<contextScan>`* feature.
-
-== Using `<packageScan>`
-
-In Camel 2.0 this has been extended to allow selective inclusion and exclusion of discovered route classes using Ant like path matching. In spring this is specified by adding a *`<packageScan/>`* tag. The tag must contain one or more *`package`* elements (similar to *`1.x`*), and optionally one or more *`includes`* or *`excludes`* elements specifying patterns to be applied to the fully qualified names of the discovered classes. e.g.,
-
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<camelContext xmlns="http://camel.apache.org/schema/spring">
-  <packageScan>
-    <package>org.example.routes</package>
-    <excludes>**.*Excluded*</excludes>
-    <includes>**.*</includes>
-  </packageScan>
-</camelContext>
---------------------------------------------------------------------------------------------------------------
-
-Exclude patterns are applied before the include patterns. If no include or exclude patterns are defined then all the Route classes discovered in the packages will be returned.
-
-In the above example, camel will scan all the *`org.example.routes`* package and any subpackages for *`RouteBuilder`* classes. Say the scan finds two *`RouteBuilders`*, one in *`org.example.routes`* called *`MyRoute`* and another *`MyExcludedRoute`* in a subpackage *`excluded`*. The fully qualified names of each of the classes are extracted (*`org.example.routes.MyRoute`*, *`org.example.routes.excluded.MyExcludedRoute`*) and the include and exclude patterns are applied.
-
-The exclude pattern *`**.*Excluded*`* is going to match the FQCN *`org.example.routes.excluded.MyExcludedRoute`* and veto camel from initializing it.
-
-Under the covers, this is using Spring's http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/util/AntPathMatcher.html[AntPatternMatcher] implementation, which matches as follows
-
-? matches one character * matches zero or more characters ** matches zero or more segments of a fully qualified name
-
-For example:
-
-*`**.*Excluded*`* would match
-*`org.simple.Excluded`*, *`org.apache.camel.SomeExcludedRoute`* or
-*`org.example.RouteWhichIsExcluded`*.
-
-*`**.??cluded*`* would match
-*`org.simple.IncludedRoute`*, *`org.simple.Excluded`* but _not_ match
-*`org.simple.PrecludedRoute`*.
-
-== Using `contextScan`
-
-*Since Camel 2.4*
-
-You can allow Camel to scan the container context, e.g. the Spring ApplicationContext for route builder instances. This allow you to use the Spring *<component-scan>* feature and have Camel pickup any *`RouteBuilder`* instances which was created by Spring in its scan process.
-
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<!-- enable Spring @Component scan -->
-<context:component-scan base-package="org.apache.camel.spring.issues.contextscan"/>
-
-<camelContext xmlns="http://camel.apache.org/schema/spring">
-    <!-- and then let Camel use those @Component scanned route builders -->
-    <contextScan/>
-</camelContext>
---------------------------------------------------------------------------------------------------------------
-
-This allows you to just annotate your routes using the Spring *`@Component`*  and have those routes included by Camel:
-[source,java]
---------------------------------------------------------------------------------------------------------------
-@Component
-public class MyRoute extends SpringRouteBuilder {
- @Override public void configure() throws Exception {
-    from("direct:start") .to("mock:result");
- }
-}
-
---------------------------------------------------------------------------------------------------------------
-
-
-You can also use the ANT style for inclusion and exclusion, as mentioned above in the *`<packageScan>`* documentation.
-
-how do i import routes from other xml files
-
-== Test Time Exclusion.
-At test time it is often desirable to be able to selectively exclude matching routes from being initialized that are not applicable or useful to the test scenario. For instance you might a spring context file *`routes-context.xml`* and three Route builders **`RouteA`, **`RouteB` and *`RouteC`* in the *`org.example.routes`* package. The *`packageScan`* definition would discover all three of these routes and initialize them.
-
-Say *`RouteC`* is not applicable to our test scenario and generates a lot of noise during test. It would be nice to be able to exclude this route from this specific test. The *`SpringTestSupport`* class has been modified to allow this. It provides two methods (*`excludedRoute`* and *`excludedRoutes`*) that may be overridden to exclude a single class or an array of classes.
-
-[source,java]
---------------------------------------------------------------------------------------------------------------
-public class RouteAandRouteBOnlyTest extends SpringTestSupport {
-  @Override
-  protected Class excludeRoute() {
-    return RouteC.class;
-  }
-}
---------------------------------------------------------------------------------------------------------------
-
-In order to hook into the *`camelContext`* initialization by spring to exclude the *`MyExcludedRouteBuilder.class`* we need to intercept the spring context creation. When overriding *`createApplicationContext`* to create the spring context, we call the *`getRouteExcludingApplicationContext()`* method to provide a special parent spring context that takes care of the exclusion.
-
-[source,java]
---------------------------------------------------------------------------------------------------------------
-@Override
-protected AbstractXmlApplicationContext createApplicationContext() {
-  return new ClassPathXmlApplicationContext(
-    new String[] {"routes-context.xml"}, getRouteExcludingApplicationContext());
-}
---------------------------------------------------------------------------------------------------------------
-
-*`RouteC`* will now be excluded from initialization. Similarly, in another test that is testing only *`RouteC`*, we could exclude *`RouteB`* and *`RouteA`* by overriding:
-
-[source,java]
---------------------------------------------------------------------------------------------------------------
-@Override
-protected Class[] excludeRoutes() {
- return new Class[]{RouteA.class, RouteB.class};
-}
---------------------------------------------------------------------------------------------------------------
-
-
-== Using Spring XML
-You can use Spring 2.0 XML configuration to specify your XML Configuration for xref:routes.adoc[Routes] such as in the following http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml[example].
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<camelContext id="camel-A" xmlns="http://camel.apache.org/schema/spring">
-  <route>
-    <from uri="seda:start"/>
-    <to uri="mock:result"/>
-  </route>
-</camelContext>
---------------------------------------------------------------------------------------------------------------
-
-Configuring Components and Endpoints
-
-You can configure your Component or xref:endpoint.adoc[Endpoint] instances in your Spring XML as follows in this example.
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-    <jmxAgent id="agent" disabled="true"/>
-</camelContext>
-
-<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
-  <property name="connectionFactory">
-    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-      <property name="brokerURL" value="vm://localhost?broker.persistent=false&amp;broker.useJmx=false"/>
-    </bean>
-  </property>
-</bean>
---------------------------------------------------------------------------------------------------------------
-
-Which allows you to configure a component using some name (*`activemq`* in the above example), then you can refer to the component using *`activemq:[queue:|topic:]destinationName`* This works by the SpringCamelContext lazily fetching components from the spring context for the scheme name you use for Endpoint URIs.
-
-For more detail see Configuring Endpoints and Components.
-
-== Spring Cache Idempotent Repository
-
-Available as of *Camel 2.17.1*
-
-[source,xml]
---------------------------------------------------------------------------------------------------------------
-<bean id="repo" class="org.apache.camel.spring.processor.idempotent.SpringCacheIdempotentRepository">
- <constructor-arg>
-   <bean class="org.springframework.cache.guava.GuavaCacheManager"/>
-</constructor-arg>
- <constructor-arg value="idempotent"/>
-</bean>
-<camelContext xmlns="http://camel.apache.org/schema/spring">
- <route id="idempotent-cache">
-  <from uri="direct:start" />
-    <idempotentConsumer messageIdRepositoryRef="repo" skipDuplicate="true">
-      <header>MessageId</header>
-      <to uri="log:org.apache.camel.spring.processor.idempotent?level=INFO&amp;showAll=true&amp;multiline=true" /> <to uri="mock:result"/>
-    </idempotentConsumer>
- </route>
-</camelContext>
---------------------------------------------------------------------------------------------------------------
-
-CamelContextAware
-If you want to be injected with the xref:camelcontext.adoc[CamelContext] in your POJO just implement the https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/CamelContextAware.html[CamelContextAware interface]; then when Spring creates your POJO the CamelContext will be injected into your POJO. Also see the Bean Integration for further injections.
-
-== Integration Testing
-
-To avoid a hung route when testing using Spring Transactions see the note about Spring Integration Testing under Transactional Client.
+See xref:spring-testing.adoc[Spring testing] documentation.
 

[camel] 07/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit a8960f4941d12987d1b4b68af6d0d0f1ca1de381
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 17:03:33 2021 +0200

    Polish and cleanup documentation
---
 docs/user-manual/modules/ROOT/nav.adoc             |  1 -
 docs/user-manual/modules/ROOT/pages/index.adoc     |  1 -
 .../modules/ROOT/pages/transformer.adoc            | 74 ++++++++++------------
 docs/user-manual/modules/ROOT/pages/transport.adoc | 21 ------
 .../modules/faq/pages/what-is-camel.adoc           |  4 +-
 5 files changed, 35 insertions(+), 66 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/nav.adoc b/docs/user-manual/modules/ROOT/nav.adoc
index 2cad1a5..eb6362b 100644
--- a/docs/user-manual/modules/ROOT/nav.adoc
+++ b/docs/user-manual/modules/ROOT/nav.adoc
@@ -76,7 +76,6 @@
 ** xref:transformer.adoc[Transformer]
 ** xref:threading-model.adoc[Threading Model]
 ** xref:tracer.adoc[Tracer]
-** xref:transport.adoc[Transport]
 ** xref:type-converter.adoc[Type Converter]
 ** xref:uris.adoc[URIs]
 ** xref:uuidgenerator.adoc[UuidGenerator]
diff --git a/docs/user-manual/modules/ROOT/pages/index.adoc b/docs/user-manual/modules/ROOT/pages/index.adoc
index 44bc857..ae53a1a 100644
--- a/docs/user-manual/modules/ROOT/pages/index.adoc
+++ b/docs/user-manual/modules/ROOT/pages/index.adoc
@@ -106,7 +106,6 @@ For a deeper and better understanding of Apache Camel, an xref:faq:what-is-camel
 * xref:stream-caching.adoc[Stream caching]
 * xref:threading-model.adoc[Threading Model]
 * xref:tracer.adoc[Tracer]
-* xref:transport.adoc[Transport]
 * xref:type-converter.adoc[Type Converter]
 * xref:uris.adoc[URIs]
 * xref:uuidgenerator.adoc[UuidGenerator]
diff --git a/docs/user-manual/modules/ROOT/pages/transformer.adoc b/docs/user-manual/modules/ROOT/pages/transformer.adoc
index f3e5f5d..4af8a9f 100644
--- a/docs/user-manual/modules/ROOT/pages/transformer.adoc
+++ b/docs/user-manual/modules/ROOT/pages/transformer.adoc
@@ -1,76 +1,64 @@
 [[Transformer-Transformer]]
 = Transformer
 
-*Since Camel 2.19*
-
-Transformer performs declarative transformation of the message according
-to the declared `Input Type` and/or `Output Type` on a route definition which declares
-the expected message type.
-The default camel Message implements `DataTypeAware`, which allows to hold the message type
+Transformer (`org.apache.camel.spi.Transformer`) performs declarative transformation of the message according
+to the declared _Input Type_ and/or _Output Type_ on a route definition which declares
+the expected message type. The default camel Message implements `DataTypeAware`, which allows to hold the message type
 represented by `DataType`.
-If the input type and/or output type is declared by `Input Type` and/or `Output Type` in the route
+
+If the input type and/or output type is declared by _Input Type_ and/or _Output Type_ in the route
 definition, and it is different from actual message type at runtime, camel internal processor
-looks for a Transformer which transforms from the current message type to the expected message
+looks for a `Transformer` which transforms from the current message type to the expected message
 type and apply. Once transform succeed or message is already in expected type, then the message
- data type is updated.
-
+data type is updated.
 
-
-[[Transformer-DataTypeFormat]]
 == Data type format
-[source]
+
+[source,text]
 ----
 scheme:name
 ----
+
 where *scheme* is the type of data model like `java`, `xml` or `json`, and *name* is the individual
 data type name. If you only specify *scheme* then it hits all the data types which has that scheme like
 a wildcard.
 
-
-
-[[Transformer-SupportedTransformers]]
 == Supported Transformers
 
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Transformer | Description
-
 | Data Format Transformer | Transform with using Data Format
-
 | Endpoint Transformer | Transform with using Endpoint
-
 | Custom Transformer | Transform with using custom transformer class. Transformer must be a subclass of `org.apache.camel.spi.Transformer`
 |===
 
-
-
-[[Transformer-CommonOptions]]
 === Common Options
+
 All transformers have following common options to specify which data type is supported by the transformer. `scheme` or both of `fromType` and `toType` must be specified.
+
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | scheme | Type of data model like `xml` or `json`. For example if `xml` is specified, the transformer is applied for all java -&gt; xml and xml -&gt; java transformation.
- 
 | fromType | xref:transformer.adoc[Data type] to transform from.
- 
 | toType | xref:transformer.adoc[Data type] to transform to.
 |===
 
 
-
-[[Transformer-DataFormat]]
 === DataFormat Transformer Options
+
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | type | Data Format type
-
 | ref | reference to the Data Format ID
 |===
 
-Here is an example to specify bindy DataFormat type:
+Here is an example to specify xref:components:dataformats:bindy-dataformat.adoc[Bindy] DataFormat type:
 
 Java DSL:
+
 [source,java]
 ----
 BindyDataFormat bindy = new BindyDataFormat();
@@ -83,6 +71,7 @@ transformer()
 ----
 
 XML DSL:
+
 [source,xml]
 ----
 <dataFormatTransformer fromType="java:com.example.Order" toType="csv:CSVOrder">
@@ -90,14 +79,12 @@ XML DSL:
 </dataFormatTransformer>
 ----
 
-
-[[Transformer-Endpoint]]
 == Endpoint Transformer Options
+
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | ref | Reference to the Endpoint ID
-
 | uri | Endpoint URI
 |===
 
@@ -112,25 +99,27 @@ transformer()
 ----
 
 And here is an example to specify endpoint ref in XML DSL:
+
 [source,xml]
 ----
 <endpointTransformer ref="myDozerEndpoint" fromType="xml" toType="json"/>
 ----
 
-[[Transformer-Custom]]
 == Custom Transformer Options
+
 Note that Transformer must be a subclass of `org.apache.camel.spi.Transformer`
+
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | ref | Reference to the custom Transformer bean ID
-
 | className | Fully qualified class name of the custom Transformer class
 |===
 
 Here is an example to specify custom Transformer class:
 
 Java DSL:
+
 [source,java]
 ----
 transformer()
@@ -140,20 +129,19 @@ transformer()
 ----
 
 XML DSL:
+
 [source,xml]
 ----
 <customTransformer className="com.example.MyCustomTransformer" fromType="xml" toType="json"/>
 ----
 
-
-
-[[Transformer-Examples]]
-== Examples
+== Example
 
 For example to declare the Endpoint Transformer which uses
 xslt component to transform from `xml:ABCOrder` to `xml:XYZOrder`, we can do as follows:
 
 Java DSL:
+
 [source,java]
 -------------------------------------------------------------------
 transformer()
@@ -163,6 +151,7 @@ transformer()
 -------------------------------------------------------------------
 
 XML DSL:
+
 [source,xml]
 -------------------------------------------------------------------
 <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
@@ -176,17 +165,20 @@ XML DSL:
 If you have following route definition, above transformer will be applied when `direct:abc` endpoint sends the message to `direct:xyz`:
 
 Java DSL:
+
 [source,java]
 -------------------------------------------------------------------
 from("direct:abc")
     .inputType("xml:ABCOrder")
     .to("direct:xyz");
+
 from("direct:xyz")
     .inputType("xml:XYZOrder")
     .to("somewhere:else");
 -------------------------------------------------------------------
 
 XML DSL:
+
 [source,xml]
 -------------------------------------------------------------------
 <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
diff --git a/docs/user-manual/modules/ROOT/pages/transport.adoc b/docs/user-manual/modules/ROOT/pages/transport.adoc
deleted file mode 100644
index 1af3d2e..0000000
--- a/docs/user-manual/modules/ROOT/pages/transport.adoc
+++ /dev/null
@@ -1,21 +0,0 @@
-[[Transport-Transports]]
-= Transports
-
-Apache Camel supports a number of different plugable componets for
-talking to different transports. The transports is implement as Camel
-components.
-
-[[Transport-ComponentsIncluded]]
-== Components Included
-
-Camel includes the following Component implementations via xref:uris.adoc[URIs].
-
-[IMPORTANT]
-====
-Make sure to read xref:faq:how-do-i-configure-endpoints.adoc[How do I configure endpoints?]
-to learn more about configuring endpoints. For
-example how to refer to beans in the xref:registry.adoc[Registry] or how
-to use raw values for password options, and using
-xref:using-propertyplaceholder.adoc[property placeholders] etc.
-====
-
diff --git a/docs/user-manual/modules/faq/pages/what-is-camel.adoc b/docs/user-manual/modules/faq/pages/what-is-camel.adoc
index aed1f87..b57c089 100644
--- a/docs/user-manual/modules/faq/pages/what-is-camel.adoc
+++ b/docs/user-manual/modules/faq/pages/what-is-camel.adoc
@@ -11,7 +11,7 @@ This means you get smart completion of
 routing rules in your IDE, whether in a Java or XML editor.
 
 Apache Camel uses xref:ROOT:uris.adoc[URIs] to work directly with any kind of
-xref:ROOT:transport.adoc[Transport] or messaging model such as
+transport or messaging model such as
 xref:components::http-component.adoc[HTTP], xref:components::activemq-component.adoc[ActiveMQ], xref:components::jms-component.adoc[JMS],
 JBI, SCA, xref:components::mina-component.adoc[MINA] or xref:components::cxf-component.adoc[CXF], as
 well as pluggable xref:ROOT:component.adoc[Components] and
@@ -19,7 +19,7 @@ xref:ROOT:data-format.adoc[Data Format] options. Apache Camel is a small
 library with minimal xref:ROOT:what-are-the-dependencies.adoc[dependencies]
 for easy embedding in any Java application. Apache Camel lets you work
 with the same xref:ROOT:exchange.adoc[API] regardless which kind of
-xref:ROOT:transport.adoc[Transport] is used -- so learn the API once and you
+transport is used -- so learn the API once and you
 can interact with all the xref:components::index.adoc[Components] provided
 out-of-box.
 

[camel] 04/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit a4fdb3e8abb098fd157088275bf4a4b7417b2567
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 16:49:26 2021 +0200

    Polish and cleanup documentation
---
 docs/user-manual/modules/ROOT/pages/testing.adoc | 10 ----------
 docs/user-manual/modules/ROOT/pages/tracer.adoc  |  8 ++++----
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/testing.adoc b/docs/user-manual/modules/ROOT/pages/testing.adoc
index 7555484..688e44f 100644
--- a/docs/user-manual/modules/ROOT/pages/testing.adoc
+++ b/docs/user-manual/modules/ROOT/pages/testing.adoc
@@ -1,13 +1,3 @@
-ifdef::env-github[]
-:icon-frown: :frowning:
-:icon-smile: :smiley:
-endif::[]
-ifndef::env-github[]
-:icons: font
-:icon-frown: icon:frown-o[fw,role=yellow]
-:icon-smile: icon:smile-o[fw,role=yellow]
-endif::[]
-
 [[Testing-Testing]]
 = Testing
 
diff --git a/docs/user-manual/modules/ROOT/pages/tracer.adoc b/docs/user-manual/modules/ROOT/pages/tracer.adoc
index c87a789..9aa1fbc 100644
--- a/docs/user-manual/modules/ROOT/pages/tracer.adoc
+++ b/docs/user-manual/modules/ROOT/pages/tracer.adoc
@@ -1,15 +1,15 @@
 = Tracer
 
 Camel's tracer is used for logging message details during routing, where
-you can see the route path of each message as they happens. Details of the message is also logged such as the message body.
+you can see the route path of each message as they happen. Details of the message is also logged such as the message body.
 
 == Formatting
 
 The tracer formats the execution of exchanges to log lines. They are
-logged at *`INFO`* level in the log category:
-*`org.apache.camel.Tracing`*. 
+logged at `INFO` level in the log category: `org.apache.camel.Tracing`.
 
-The message information from the Exchange is formatted using `ExchangeFormatter` and the default implementation has many options you can configure. See the source code/javadoc of the `org.apache.camel.support.processor.DefaultExchangeFormatter` class.
+The message information from the Exchange is formatted using `ExchangeFormatter` and the default implementation
+has many options you can configure accordingly to the https://www.javadoc.io/doc/org.apache.camel/camel-support/latest/org/apache/camel/support/processor/DefaultExchangeFormatter.html[javadoc].
 
 == Enabling
 

[camel] 06/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 3fdc4226c3dac43106f0a579c97b4c18ab21347c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 16:57:52 2021 +0200

    Polish and cleanup documentation
---
 .../src/main/docs/modules/eips/pages/rollback-eip.adoc        | 10 ----------
 .../main/docs/modules/eips/pages/transactional-client.adoc    | 11 ++++-------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc
index dd54a8a..4eb660f 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc
@@ -186,16 +186,6 @@ then we configure our routes. Notice that all we have to do is mark the
 route as transacted using the *transacted*
 tag.https://github.com/apache/camel/blob/main/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml[TransactionMinimalConfigurationTest.xml]
 
-Transaction error handler
-
-When a route is marked as transacted using *transacted* Camel will
-automatic use the
-xref:latest@manual:ROOT:transactionerrorhandler.adoc[TransactionErrorHandler] as
-xref:latest@manual:ROOT:error-handler.adoc[Error Handler]. It supports basically the same
-feature set as the xref:latest@manual:ROOT:defaulterrorhandler.adoc[DefaultErrorHandler],
-so you can for instance use xref:latest@manual:ROOT:exception-clause.adoc[Exception Clause]
-as well.
-
 == Integration Testing with Spring
 
 An Integration Test here means a test runner class annotated
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/transactional-client.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/transactional-client.adoc
index e66dcdb..f36bd43 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/transactional-client.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/transactional-client.adoc
@@ -288,13 +288,10 @@ route as transacted using the *transacted* tag.
 === Transaction error handler
 
 When a route is marked as transacted using *transacted* Camel will
-automatic use the
-xref:latest@manual:ROOT:transactionerrorhandler.adoc[TransactionErrorHandler]
-as xref:latest@manual:ROOT:error-handler.adoc[Error Handler].
-It supports basically the same feature set as the
-xref:latest@manual:ROOT:defaulterrorhandler.adoc[DefaultErrorHandler],
-so you can for instance use
-xref:latest@manual:ROOT:exception-clause.adoc[Exception Clause]
+automatic use `TransactionErrorHandler` as the
+xref:latest@manual:ROOT:error-handler.adoc[Error Handler]. This error handler supports basically the same
+feature set as the xref:latest@manual:ROOT:defaulterrorhandler.adoc[DefaultErrorHandler],
+so you can for instance use xref:latest@manual:ROOT:exception-clause.adoc[Exception Clause]
 as well.
 
 [[TransactionalClient-IntegrationTestingwithSpring]]

[camel] 15/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 453e57a830d1666982a9ff9493e4e44355a816f8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 17 09:28:37 2021 +0200

    Polish and cleanup documentation
---
 .../modules/ROOT/pages/transformer.adoc            |  4 ++
 .../modules/ROOT/pages/uuidgenerator.adoc          | 34 ++++---------
 docs/user-manual/modules/ROOT/pages/validator.adoc | 59 ++++++++++------------
 .../modules/ROOT/pages/writing-components.adoc     | 39 +++-----------
 4 files changed, 48 insertions(+), 88 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/transformer.adoc b/docs/user-manual/modules/ROOT/pages/transformer.adoc
index 4af8a9f..eec89fe 100644
--- a/docs/user-manual/modules/ROOT/pages/transformer.adoc
+++ b/docs/user-manual/modules/ROOT/pages/transformer.adoc
@@ -194,3 +194,7 @@ XML DSL:
     </route>
 </camelContext>
 -------------------------------------------------------------------
+
+== See Also
+
+The xref:validator.adoc[Validator] is a related functionality.
\ No newline at end of file
diff --git a/docs/user-manual/modules/ROOT/pages/uuidgenerator.adoc b/docs/user-manual/modules/ROOT/pages/uuidgenerator.adoc
index 68cfb0d..881ed0a 100644
--- a/docs/user-manual/modules/ROOT/pages/uuidgenerator.adoc
+++ b/docs/user-manual/modules/ROOT/pages/uuidgenerator.adoc
@@ -1,10 +1,9 @@
 [[UuidGenerator-UuidGenerator]]
 = UuidGenerator
 
-Starting with *Camel 2.5*, Camel supports 3rd party UUID generator(s).
-This is useful, if e.g. your messaging provider does not support UUID's
-with a length of 36 characters (like Websphere MQ). Another useful
-scenario is to use a simple counter for testing purpose. With this it is
+Camel supports 3rd party UUID generator(s).
+
+A useful scenario is to use a simple counter for testing purpose. With this it is
 easier to correlate the exchanges in the log/debugger.
 
 Camel uses UUIDs in the exchange and message ids, and other unique ids
@@ -13,23 +12,15 @@ it uses.
 You only have to implement `org.apache.camel.spi.UuidGenerator` and tell
 Camel, that it should use your custom implementation:
 
-[[UuidGenerator-ConfiguringfromJavaDSL]]
-== Configuring from Java DSL
+== Configuring UuidGenerator
 
 [source,java]
 ----
 getContext().setUuidGenerator(new MyCustomUuidGenerator());
 ----
 
-Warning: You should not change the UUID generator at runtime (it should only be
-set once)!
-
-[[UuidGenerator-ConfiguringfromSpringDSL]]
-== Configuring from XML DSL
-
 Camel will configure this UUID generator by doing a lookup in the Spring
-bean registry to find the bean of the type
-`org.apache.camel.spi.UuidGenerator`.
+bean registry to find the bean of the type `org.apache.camel.spi.UuidGenerator`.
 
 [source,xml]
 ----
@@ -43,18 +34,13 @@ bean registry to find the bean of the type
 </camelContext>
 ----
 
-[[UuidGenerator-Providedimplementations]]
-== Provided implementations
+== Standard UUID Generators
 
-Camel comes with three implementations of
-`org.apache.camel.spi.UuidGenerator`:
+Camel comes with the following implementations out of the box:
 
+* `org.apache.camel.support.ClassicUuidGenerator` - This is the classic Camel 2.x generator
+* `org.apache.camel.support.DefaultUuidGenerator` - Default generator (32 chars) optimized for Camel usage
+* `org.apache.camel.support.ShortUuidGenerator` - Is 50% the size of the default (16 chars) optimized for Camel usage
 * `org.apache.camel.support.SimpleUuidGenerator` - This implementation uses
 internally a `java.util.concurrent.atomic.AtomicLong` and increases the
 ID for every call by one. Starting with 1 as the first id.
-* `org.apache.camel.support.VanillaUuidGenerator` - This implementation uses
-a random generated seed and a counter which increments by one. This generator
-is not unique per host or JVM.
-* `org.apache.camel.impl.engine.DefaultUuidGenerator` - This implementation
-uses a fast unique UUID generation that is cluster safe (similar to uuid
-generator in ActiveMQ). This is the default implementation in use by Camel.
diff --git a/docs/user-manual/modules/ROOT/pages/validator.adoc b/docs/user-manual/modules/ROOT/pages/validator.adoc
index 2aff00c..f7b4d7d 100644
--- a/docs/user-manual/modules/ROOT/pages/validator.adoc
+++ b/docs/user-manual/modules/ROOT/pages/validator.adoc
@@ -1,21 +1,14 @@
 [[Validator-Validator]]
 = Validator
 
-*Since Camel 2.19*
-
 Validator performs declarative validation of the message according to the declared
-`Input Type` and/or `Output Type` on a route definition which declares the expected
-message type. Note that the validation is performed only if `validate` attribute on the
- type declaration is true.
-If `validate` attribute is true on a `Input Type` and/or `Output Type` declaration,
-camel internal processor looks for a corresponding Validator from the registry and apply.
-
+_Input Type_ and/or _Output Type_ on a route definition which declares the expected
+message type.
 
 
-[[Validator-DataTypeFormat]]
 == Data type format
 
-[source]
+[source,text]
 ----
 scheme:name
 ----
@@ -23,45 +16,40 @@ scheme:name
 where *scheme* is the type of data model like `java`, `xml` or `json`, and *name* is the individual
 data type name.
 
-[[Validator-SupportedValidators]]
 == Supported Validators
 
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Validator | Description
-
 | Predicate Validator | Validate with using Expression or Predicate
-
 | Endpoint Validator | Validate by forwarding to the Endpoint to be used with validation component such as Validation Component or Bean Validation Component.
-
 | Custom Validator | Validate with using custom validator class. Validator must be a subclass of `org.apache.camel.spi.Validator`
 |===
 
 
-
-[[Validator-CommonOptions]]
 == Common Options
 All validators have following common options to specify which data type is supported by the validator.
 `type` must be specified.
+
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | type | xref:validator.adoc#Validator-DataTypeFormat[Data type] to validate.
 |===
 
 
-
-[[Validator-Predicate]]
 == Predicate Validator Options
 
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | expression | Expression or Predicate to be used for validation
 |===
 
 Here is an example to specify a validation predicate:
 
 Java DSL:
+
 [source,java]
 ----
 validator()
@@ -70,6 +58,7 @@ validator()
 ----
 
 XML DSL:
+
 [source,xml]
 ----
 <predicateValidator Type="csv:CSVOrder">
@@ -77,19 +66,17 @@ XML DSL:
 </predicateValidator>
 ----
 
-
-[[Validator-Endpoint]]
 == Endpoint Validator Options
 
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | ref | Reference to the Endpoint ID
-
 | uri | Endpoint URI
 |===
 
 Here is an example to specify endpoint URI in Java DSL:
+
 [source,java]
 ----
 validator()
@@ -98,6 +85,7 @@ validator()
 ----
 
 And here is an example to specify endpoint ref in XML DSL:
+
 [source,xml]
 ----
 <endpointValidator uri="validator:xsd/schema.xsd" type="xml"/>
@@ -108,20 +96,21 @@ camel forwards the message to the `validator:` endpoint, which actually is a
 xref:components::validator-component.adoc[Validation Component]. You can also use any other validation component like
 Bean Validation Component.
 
-[[Validator-Custom]]
 == Custom Validator Options
 
-Note that Validator must be a subclass of `org.apache.camel.spi.Validator`
+The validator must be an implementation of `org.apache.camel.spi.Validator`
+
+[width="100%",cols="25%,75%",options="header",]
 |===
 | Name | Description
-
 | ref | Reference to the custom Validator bean ID
-
 | className | Fully qualified class name of the custom Validator class
 |===
 
 Here is an example to specify custom Validator class:
+
 Java DSL:
+
 [source,java]
 ----
 validator()
@@ -130,20 +119,19 @@ validator()
 ----
 
 XML DSL:
+
 [source,xml]
 ----
 <customTransformer className="com.example.MyCustomValidator" type="json"/>
 ----
 
-
-
-[[Validator-Examples]]
 == Examples
 
 For example to declare the Endpoint Validator which uses
 validator component to validate `xml:ABCOrder`, we can do as follows:
 
 Java DSL:
+
 [source,java]
 ----
 validator()
@@ -151,7 +139,8 @@ validator()
     .withUri("validator:xsd/schema.xsd");
 ----
 
-XML DSL:
+And in XML DSL:
+
 [source,xml]
 ----
 <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
@@ -166,6 +155,7 @@ receives the message. Note that `inputTypeWithValidate` is used instead of `inpu
 and the `validate` attribute on the inputType declaration is set to `true` in XML DSL:
 
 Java DSL:
+
 [source,java]
 ----
 from("direct:abc")
@@ -174,6 +164,7 @@ from("direct:abc")
 ----
 
 XML DSL:
+
 [source,xml]
 ----
 <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
@@ -184,3 +175,7 @@ XML DSL:
     </route>
 </camelContext>
 ----
+
+== See Also
+
+The xref:transformer.adoc[Transformer] is a related functionality.
\ No newline at end of file
diff --git a/docs/user-manual/modules/ROOT/pages/writing-components.adoc b/docs/user-manual/modules/ROOT/pages/writing-components.adoc
index d0af930..0eb7107 100644
--- a/docs/user-manual/modules/ROOT/pages/writing-components.adoc
+++ b/docs/user-manual/modules/ROOT/pages/writing-components.adoc
@@ -22,19 +22,10 @@ register with a `CamelContext` or users can use a URI which auto-creates your co
 
 [NOTE]
 ====
-
 It is recommended to bootstrap your initial component using xref:camel-maven-archetypes.adoc[Camel Maven Archetypes], as it will give you all the necessary bits to start developing your component with ease.
-
-====
-
-[NOTE]
-====
-
 You will need as well to make sure to have xref:camel-component-maven-plugin.adoc[Camel Component Maven Plugin] included in your component's `pom.xml` file, order to generate all the necessary metadata and Java files for your component.
-
 ====
 
-[[WritingComponents-WritingEndpoints]]
 == Writing Endpoints
 
 When implementing an xref:endpoint.adoc[Endpoint] you typically may
@@ -44,9 +35,8 @@ implement one or more of the following methods:
 * `createConsumer` implements the xref:{eip-vc}:eips:eventDrivenConsumer-eip.adoc[Event Driven Consumer]
 pattern for consuming message exchanges from the endpoint.
 
-Typically you just derive from `DefaultEndpoint`
+Typically, you just derive from `DefaultEndpoint`
 
-[[WritingComponents-AnnotatingyourEndpoint]]
 == Annotating your Endpoint
 
 If you want to benefit from the automatic generation
@@ -62,35 +52,20 @@ configuration objects).
 Refer to the xref:endpoint-annotations.adoc[Endpoint Annotations guide
 for details].
 
-[[WritingComponents-Dependencyinjectionandauto-discovery]]
-== Dependency injection and auto-discovery
-
-When using auto-discovery the CamelContext will default to its
-xref:injector.adoc[Injector] implementation to inject any required or
-optional dependencies on the component. This allows you to use
-auto-discovery of components via xref:uris.adoc[URIs] while still
-getting the benefits of dependency injection.
 
-For example your component can depend on a JDBC DataSource or JMS
-ConnectionFactory which can be provided in the ApplicationContext in
-Spring.
-
-So you can if you prefer configure your Component using an IoC framework
-like Spring; then add it to the CamelContext. Or you can let
-the Component auto-inject itself as the endpoints are auto-discovered.
-
-[[WritingComponents-Options]]
 == Options
 
 If your component has options you can let it have public getters/setters
 and Camel will automatically set the properties when the endpoint is
-created. If you however want to take the matter in your own hands, then
+created.
+
+If you however want to take the matter in your own hands, then
 you must remove the option from the given parameter list as Camel will
 validate that all options are used. If not Camel will throw a
-ResolveEndpointFailedException stating some of the options are unknown.
+`ResolveEndpointFailedException` stating which options are unknown.
 
-The parameters is provided by Camel in the createEndpoint method from
-DefaultComponent:
+The parameters are provided by Camel in the `createEndpoint` method from
+`DefaultComponent` class:
 
 [source,java]
 ----

[camel] 03/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 757aa584203a4a29d43b1246cfd974403a5a8d68
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 16:44:18 2021 +0200

    Polish and cleanup documentation
---
 .../apache/camel/catalog/docs/sql-component.adoc   |   4 +-
 .../camel-sql/src/main/docs/sql-component.adoc     |   4 +-
 .../docs/modules/eips/pages/content-enricher.adoc  |   2 +-
 .../modules/eips/pages/message-translator.adoc     |   2 +-
 .../modules/ROOT/pages/sql-component.adoc          |   4 +-
 docs/user-manual/modules/ROOT/nav.adoc             |   1 -
 .../modules/ROOT/pages/stream-caching.adoc         | 243 +++------------------
 .../user-manual/modules/ROOT/pages/templating.adoc |  50 -----
 8 files changed, 34 insertions(+), 276 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc
index bb7505c..54a887b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/sql-component.adoc
@@ -260,8 +260,8 @@ You can use the option `useMessageBodyForSql` that
 allows to use the message body as the SQL statement, and then the SQL
 parameters must be provided in a header with the
 key `SqlConstants.SQL_PARAMETERS`. This allows the SQL component to work
-more dynamically as the SQL query is from the message body. Use
-xref:manual::templating.adoc[Camel templating]
+more dynamically as the SQL query is from the message body. Use templating
+(such as xref:components::velocity-component.adoc[Velocity], xref:components::freemarker-component.adoc[Freemarker])
 for conditional processing, e.g. to include or exclude `where` clauses
 depending on the presence of query parameters.
 
diff --git a/components/camel-sql/src/main/docs/sql-component.adoc b/components/camel-sql/src/main/docs/sql-component.adoc
index bb7505c..54a887b 100644
--- a/components/camel-sql/src/main/docs/sql-component.adoc
+++ b/components/camel-sql/src/main/docs/sql-component.adoc
@@ -260,8 +260,8 @@ You can use the option `useMessageBodyForSql` that
 allows to use the message body as the SQL statement, and then the SQL
 parameters must be provided in a header with the
 key `SqlConstants.SQL_PARAMETERS`. This allows the SQL component to work
-more dynamically as the SQL query is from the message body. Use
-xref:manual::templating.adoc[Camel templating]
+more dynamically as the SQL query is from the message body. Use templating
+(such as xref:components::velocity-component.adoc[Velocity], xref:components::freemarker-component.adoc[Freemarker])
 for conditional processing, e.g. to include or exclude `where` clauses
 depending on the presence of query parameters.
 
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc
index 4468a91..a257f19 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc
@@ -14,7 +14,7 @@ image::eip/DataEnricher.gif[image]
 [[ContentEnricher-ContentenrichmentusingaMessageTranslatororaProcessor]]
 == Content enrichment using a Message Translator or a Processor
 
-You can use xref:latest@manual:ROOT:templating.adoc[Templating] to consume a message from
+You can consume a message from
 one destination, transform it with something like
 xref:components::velocity-component.adoc[Velocity] or xref:components::xquery-component.adoc[XQuery], and then send
 it on to another destination. For example using InOnly (one way
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-translator.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-translator.adoc
index 4974569..7dcf17a 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-translator.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-translator.adoc
@@ -52,7 +52,7 @@ invoke a bean
 </route>
 ----
 
-You can also use xref:latest@manual:ROOT:templating.adoc[Templating] to consume a message
+You can also consume a message
 from one destination, transform it with something like
 xref:components::velocity-component.adoc[Velocity] or xref:components::xquery-component.adoc[XQuery] and then send
 it on to another destination. For example using InOnly (one way
diff --git a/docs/components/modules/ROOT/pages/sql-component.adoc b/docs/components/modules/ROOT/pages/sql-component.adoc
index e02e8c8..ff9400a 100644
--- a/docs/components/modules/ROOT/pages/sql-component.adoc
+++ b/docs/components/modules/ROOT/pages/sql-component.adoc
@@ -262,8 +262,8 @@ You can use the option `useMessageBodyForSql` that
 allows to use the message body as the SQL statement, and then the SQL
 parameters must be provided in a header with the
 key `SqlConstants.SQL_PARAMETERS`. This allows the SQL component to work
-more dynamically as the SQL query is from the message body. Use
-xref:manual::templating.adoc[Camel templating]
+more dynamically as the SQL query is from the message body. Use templating
+(such as xref:components::velocity-component.adoc[Velocity], xref:components::freemarker-component.adoc[Freemarker])
 for conditional processing, e.g. to include or exclude `where` clauses
 depending on the presence of query parameters.
 
diff --git a/docs/user-manual/modules/ROOT/nav.adoc b/docs/user-manual/modules/ROOT/nav.adoc
index af14584..2cad1a5 100644
--- a/docs/user-manual/modules/ROOT/nav.adoc
+++ b/docs/user-manual/modules/ROOT/nav.adoc
@@ -18,7 +18,6 @@
 ** xref:error-handler.adoc[Error handler]
 ** xref:using-osgi-blueprint-with-camel.adoc[Using OSGi blueprint with Camel]
 ** xref:using-propertyplaceholder.adoc[How to use Camel property placeholders]
-** xref:templating.adoc[Templating]
 ** xref:testing.adoc[Testing]
 ** xref:rest-dsl.adoc[Working with REST and Rest DSL]
 ** xref:writing-components.adoc[Writing Components]
diff --git a/docs/user-manual/modules/ROOT/pages/stream-caching.adoc b/docs/user-manual/modules/ROOT/pages/stream-caching.adoc
index c798a4c..394dd26 100644
--- a/docs/user-manual/modules/ROOT/pages/stream-caching.adoc
+++ b/docs/user-manual/modules/ROOT/pages/stream-caching.adoc
@@ -3,201 +3,25 @@
 
 While stream types (like `StreamSource`, `InputStream` and `Reader`) are commonly used in messaging for performance reasons, they also have an important drawback: they can only be read once. In order to be able to work with message content multiple times, the stream needs to be cached.
 
-Streams are caching in memory. In Camel 2.0, large stream messages (over 64 KB in Camel 2.11 or older, and 128 KB from Camel 2.12 onwards) will be cached in a temporary file instead -- Camel itself will handle deleting the temporary file once the cached stream is no longer necessary.
+Streams are cached in memory. However, for large stream messages (over 128 KB) will be cached in a temporary file instead -- Camel itself will handle deleting the temporary file once the cached stream is no longer necessary.
 
-* In Camel 2.0 stream cache is default *disabled* out of the box.
-* In Camel 1.x stream cache is default *enabled* out of the box.
-
-[NOTE]
+[IMPORTANT]
 ====
-*StreamCache Affects your payload object*
+*StreamCache - Affecting the message payload*
 
 The `StreamCache` will affect your payload object as it will replace the `Stream` payload with a `org.apache.camel.StreamCache` object.
 This `StreamCache` is capable of being re-readable and thus possible to better be routed within Camel using redelivery or xref:{eip-vc}:eips:content-based-router-eip.adoc[Content Based Router] or the likes.
 
-However to not change the payload under the covers without the end user really knowing we changed the default in Camel 2.0 to *disabled*. So in Camel 2.0 you have to explicit enable it if you want to use it.
+However, to not change the payload under the covers without the end user really knowing then stream caching is by default disabled.
 ====
 
-TIP: If using Camel 2.12 onwards then see xref:stream-caching.adoc[Using StreamCachingStrategy] further below which is the recommended way to configure stream caching options.
-
-[[Streamcaching-Enablingstreamcaching]]
-== Enabling stream caching
-
-In Apache Camel, you can explicitly enable stream caching for a single route with the `streamCaching` DSL method:
-
-[source,java]
-----
-from("jbi:service:http://foo.bar.org/MyService")
-    .streamCaching()
-    .to("jbi:service:http://foo.bar.org/MyOtherService");
-----
-
-In Spring XML you enable it by setting the `streamCache="true"` attribute on the route tag:
+In order to determine if a message payload requires caching, then Camel uses
+the xref:type-converter.adoc[Type Converter] functionality, to determine if
+the message payload type can be converted into an `org.apache.camel.StreamCache` instance.
 
-[source,xml]
-----
-<route streamCache="true">
-    <from uri="jbi:service:http://foo.bar.org/MyService"/>
-    <to uri="jbi:service:http://foo.bar.org/MyOtherService"/>
-</route>
-----
+== Configuring Stream Caching
 
-[[Streamcaching-Scopes]]
-=== Scopes
-
-`StreamCache` supports the global and per route scope. So by setting the `streamCache` attribute on `camelContext` you can enable/disable it globally:
-
-[source,xml]
-----
-<camelContext streamCache="true">
-    ...
-</camelContext>
-----
-
-The route scope is configured by the `streamCache` attribute on the `<route>` tag such as:
-
-[source,xml]
-----
-<route streamCache="true">
-    <from uri="jbi:service:http://foo.bar.org/MyService"/>
-    <to uri="jbi:service:http://foo.bar.org/MyOtherService"/>
-</route>
-----
-
-You can mix and match for instance you can enable it globally and disable it on a particular route such as:
-
-[source,xml]
-----
-<camelContext streamCache="true">
-  <route>
-    <from uri="jbi:service:http://foo.bar.org/MyService"/>
-    <to uri="jbi:service:http://foo.bar.org/MyOtherService"/>
-  </route>
-
-  <route streamCache="false">
-    <from uri="jms:queue:foo"/>
-    <to uri="jms:queue:bar"/>
-  </route>
-</camelContext>
-----
-
-[[Streamcaching-EnablingfromJavaDSL]]
-=== Enabling from Java DSL
-
-You can enable stream cache by setting the property on `CamelContext`, for instance in a `RouteBuilder` class:
-
-[source,java]
-----
-context.setStreamCache(true);
-
-from("jbi:service:http://foo.bar.org/MyService")
-    .to("jbi:service:http://foo.bar.org/MyOtherService");
-----
-
-[[Streamcaching-Disablestreamcachingexplicitly]]
-=== Disable stream caching explicitly
-
-If you have enabled stream caching globally on the `CamelContext` and you want to disable it for certain routes in a selective manner, you can use the following syntax.
-
-Spring DSL:
-
-[source,xml]
-----
-<camelContext streamCache="true">
-  <route streamCache="false">
-    <from uri="jetty:http://0.0.0.0:9090"/>
-    <to uri="file:target/incoming"/>
-  </route>
-</camelContext>
-----
-
-Java DSL:
-
-[source,java]
-----
-context.setStreamCache(true);
-
-from("jetty:http://0.0.0.0:9090").noStreamCaching()
-    .to("file:target/incoming");
-----
-
-[[Streamcaching-Streamingcachetofiles]]
-== Streaming cache to files
-
-When stream cache is enabled it will by default spool big streams to files instead of keeping them in memory. The default threshold is 64 KB but you can configure it with the following properties:
-
-[width="100%",cols="20%,20%,60%",options="header"]
-|=======================================================================
-| Property | Default | Description
-
-| CamelCachedOutputStreamBufferSize | 2 KB
-| *Camel 2.9.4, 2.10.2, 2.11.0:* Size in bytes of the buffer used in the stream.
-
-| CamelCachedOutputStreamThreshold | 64 KB or 128 KB
-| 64 KB for *Camel 2.11* or older. 128 KB for *Camel 2.12* onwards. Size in bytes when the stream should be spooled to disk instead of keeping in memory. Use a value of 0 or negative to disable it all together so streams is always kept in memory regardless of their size.
-
-| CamelCachedOutputStreamOutputDirectory | java.io.tmpdir
-| Base directory where temporary files for spooled streams should be stored.
-
-| CamelCachedOutputStreamCipherTransformation | null
-| *Camel 2.11.0:* If set, the temporary files are encrypted using the specified cipher transformation (i.e., a valid stream or 8-bit cipher name such as "RC4", "AES/CTR/NoPadding". An empty name "" is treated as null).
-|=======================================================================
-
-You set these properties on the `CamelContext` as shown below, where we use a 1 MB threshold to spool to disk for messages bigger than 1 MB:
-
-[source,java]
-----
-context.getGlobalOptions().put(CachedOutputStream.TEMP_DIR, "/tmp/cachedir");
-context.getGlobalOptions().put(CachedOutputStream.THRESHOLD, "1048576");
-context.getGlobalOptions().put(CachedOutputStream.BUFFER_SIZE, "131072");
-// to enable encryption using RC4
-// context.getGlobalOptions().put(CachedOutputStream.CIPHER_TRANSFORMATION, "RC4");
-----
-
-And in XML you do:
-
-[source,xml]
-----
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-  <!-- disable stream caching spool to disk -->
-  <properties>
-    <property key="CamelCachedOutputStreamOutputDirectory" value="/tmp/cachedir"/>
-    <property key="CamelCachedOutputStreamThreshold" value="1048576"/>
-    <property key="CamelCachedOutputStreamBufferSize" value="131072"/>
-  </properties>
-----
-
-[[Streamcaching-Disablingspoolingtodisk]]
-=== Disabling spooling to disk
-
-You can disable spooling to disk by setting a threshold of 0 or a negative value.
-
-[source,java]
-----
-// disable spooling to disk
-context.getGlobalOptions().put(CachedOutputStream.THRESHOLD, "-1");
-----
-
-And in XML you do:
-
-[source,xml]
-----
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-  <!-- disable stream caching spool to disk -->
-  <properties>
-    <property key="CamelCachedOutputStreamThreshold" value="-1"/>
-  </properties>
-----
-
-[[Streamcaching-UsingStreamCachingStrategy]]
-== Using StreamCachingStrategy
-
-*Since Camel 2.12*
-
-Stream caching is from Camel 2.12 onwards intended to be configured using `org.apache.camel.spi.StreamCachingStrategy`.
-The old kind of configuration using properties on the xref:camelcontext.adoc[CamelContext] has been marked as deprecated.
+Stream caching is configured using `org.apache.camel.spi.StreamCachingStrategy`.
 
 The strategy has the following options:
 
@@ -233,7 +57,6 @@ The strategy has the following options:
 | Whether utilization statistics is enabled. By enabling this you can see these statics for example with JMX.
 |=======================================================================
 
-[[Streamcaching-SpoolDirectorynamingpattern]]
 === SpoolDirectory naming pattern
 
 The following patterns is supported:
@@ -264,10 +87,9 @@ To store in `KARAF_HOME/tmp/bundleId` directory:
 context.getStreamCachingStrategy().setSpoolDirectory"${env:KARAF_HOME}/tmp/bundle#bundleId#");
 ----
 
-[[Streamcaching-UsingStreamCachingStrategyinJava]]
-=== Using StreamCachingStrategy in Java
+== Enabling StreamCachingStrategy in Java
 
-You can configure the StreamCachingStrategy in Java as shown below:
+You can configure the `StreamCachingStrategy` in Java as shown below:
 
 [source,java]
 ----
@@ -278,21 +100,29 @@ context.getStreamCachingStrategy().setBufferSize(16 * 1024);
 // context.getStreamCachingStrategy().setSpoolCipher("RC4");
 ----
 
-And remember to enable Stream caching on the CamelContext or on routes:
+And remember to enable Stream caching on the `CamelContext`:
 
 [source,java]
 ----
 context.setStreamCaching(true);
 ----
 
-[[Streamcaching-UsingStreamCachingStrategyinXML]]
-=== Using StreamCachingStrategy in XML
+or on routes:
 
-In XML you do:
+[source,java]
+----
+from("file:inbox")
+  .streamCaching()
+  .to("bean:foo");
+----
+
+== Enabling StreamCachingStrategy in XML
+
+In XML you can enable stream caching on the `<camelContext>` and then do the configuration in the `streamCaching` element:
 
 [source,xml]
 ----
-<camelContext streamCache="true" xmlns="http://camel.apache.org/schema/blueprint">
+<camelContext streamCache="true">
 
   <streamCaching id="myCacheConfig" bufferSize="16384" spoolDirectory="/tmp/cachedir" spoolThreshold="65536"/>
 
@@ -304,22 +134,6 @@ In XML you do:
 </camelContext>
 ----
 
-You can also define a `<bean>` instead of using the `<streamCaching>` tag:
-
-[source,xml]
-----
-<!-- define a bean of type StreamCachingStrategy which CamelContext will automatic use -->
-<bean id="streamStrategy" class="org.apache.camel.impl.DefaultStreamCachingStrategy">
-  <property name="spoolDirectory" value="/tmp/cachedir"/>
-  <property name="spoolThreshold" value="65536"/>
-  <property name="bufferSize" value="16384"/>
-</bean>
-
-<!-- remember to enable stream caching -->
-<camelContext streamCaching="true" xmlns="http://camel.apache.org/schema/spring">
-----
-
-[[Streamcaching-UsingspoolUsedHeapMemoryThreshold]]
 === Using spoolUsedHeapMemoryThreshold
 
 By default stream caching will spool only big payloads (128 KB or bigger) to disk. However you can also set the `spoolUsedHeapMemoryThreshold` option which is a percentage of used heap memory. This can be used to also spool to disk when running low on memory.
@@ -349,15 +163,14 @@ If we only want to spool to disk if we run low on memory then we can set:
 
 then we do not use the `spoolThreshold` rule, and only the heap memory based is in use.
 
-By default the upper limit of the used heap memory is based on the maximum heap size. Though you can also configure to use the committed heap size as the upper limit, this is done using the `spoolUsedHeapMemoryThreshold` option as shown below:
+By default, the upper limit of the used heap memory is based on the maximum heap size. Though you can also configure to use the committed heap size as the upper limit, this is done using the `spoolUsedHeapMemoryThreshold` option as shown below:
 
 [source,xml]
 ----
 <streamCaching id="myCacheConfig" spoolDirectory="/tmp/cachedir" spoolUsedHeapMemoryThreshold="70" spoolUsedHeapMemoryLimit="Committed"/>
 ----
 
-[[Streamcaching-UsingcustomSpoolRuleimplementations]]
-=== Using custom SpoolRule implementations
+== Using custom SpoolRule implementations
 
 You can implement your custom rules to determine if the stream should be spooled to disk. This can be done by implementing the interface `org.apache.camel.spi.StreamCachingStrategy.SpoolRule` which has a single method:
 
@@ -391,7 +204,3 @@ Using the spoolRules attribute on `<streamCaching>`. if you have more rules, the
 <streamCaching id="myCacheConfig" spoolDirectory="/tmp/cachedir" spoolRules="mySpoolRule,myOtherSpoolRule"/>
 ----
 
-[[Streamcaching-Howitworks]]
-== How it works
-
-In order to determine if a type requires caching, we leverage the type converter feature. Any type that requires stream caching can be converted into an `org.apache.camel.StreamCache` instance.
diff --git a/docs/user-manual/modules/ROOT/pages/templating.adoc b/docs/user-manual/modules/ROOT/pages/templating.adoc
deleted file mode 100644
index 70c85cf..0000000
--- a/docs/user-manual/modules/ROOT/pages/templating.adoc
+++ /dev/null
@@ -1,50 +0,0 @@
-[[Templating-Templating]]
-= Templating
-
-When you are testing distributed systems its a very common requirement
-to have to stub out certain external systems with some stub so that you
-can test other parts of the system until a specific system is available
-or written etc.
-
-A great way to do this is using some kind of Template system to generate
-responses to requests generating a dynamic message using a mostly-static
-body.
-
-There are a number of templating components included in the Camel
-distribution you could use
-
-* xref:components::freemarker-component.adoc[FreeMarker]
-* xref:components::mustache-component.adoc[Mustache]
-* xref:components::string-template-component.adoc[StringTemplate]
-* xref:components::velocity-component.adoc[Velocity]
-* xref:components::xquery-component.adoc[XQuery]
-* xref:components::xslt-component.adoc[XSLT]
-
-or the following external Camel components
-
-* https://scalate.github.io/scalate/camel.html[Scalate]
-
-[[Templating-Example]]
-== Example
-
-Here's a simple example showing how we can respond to InOut requests on
-the *My.Queue* queue on xref:components::activemq-component.adoc[ActiveMQ] with a template
-generated response. The reply would be sent back to the JMSReplyTo
-Destination.
-
-[source,syntaxhighlighter-pre]
-----
-from("activemq:My.Queue").
-  to("velocity:com/acme/MyResponse.vm");
-----
-
-If you want to use InOnly and consume the message and send it to another
-destination you could use
-
-[source,syntaxhighlighter-pre]
-----
-from("activemq:My.Queue").
-  to("velocity:com/acme/MyResponse.vm").
-  to("activemq:Another.Queue");
-----
-

[camel] 01/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 0a254ccd9428995d66f39d5e530644e97b2757b0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 12:50:04 2021 +0200

    Polish and cleanup documentation
---
 .../camel/catalog/docs/datasonnet-language.adoc    | 13 ++++++--
 .../apache/camel/catalog/docs/groovy-language.adoc | 21 +++++-------
 .../catalog/docs/publish-subscribe-channel.adoc    |  2 +-
 .../apache/camel/catalog/docs/spring-summary.adoc  |  3 +-
 .../apache/camel/catalog/docs/unmarshal-eip.adoc   |  3 +-
 .../apache/camel/catalog/docs/xpath-language.adoc  | 39 +++++++++++-----------
 .../camel/catalog/docs/xquery-component.adoc       |  9 ++---
 .../apache/camel/catalog/docs/xquery-language.adoc | 13 ++++----
 .../src/main/docs/datasonnet-language.adoc         | 13 ++++++--
 .../src/main/docs/groovy-language.adoc             | 21 +++++-------
 .../src/main/docs/xquery-component.adoc            |  9 ++---
 .../camel-saxon/src/main/docs/xquery-language.adoc | 13 ++++----
 .../camel-spring/src/main/docs/spring-summary.adoc |  3 +-
 .../camel-xpath/src/main/docs/xpath-language.adoc  | 39 +++++++++++-----------
 .../eips/pages/publish-subscribe-channel.adoc      |  2 +-
 .../docs/modules/eips/pages/unmarshal-eip.adoc     |  3 +-
 .../modules/ROOT/pages/spring-summary.adoc         |  3 +-
 .../modules/ROOT/pages/xquery-component.adoc       |  9 ++---
 .../languages/pages/datasonnet-language.adoc       | 13 ++++++--
 .../modules/languages/pages/groovy-language.adoc   | 21 +++++-------
 .../modules/languages/pages/xpath-language.adoc    | 39 +++++++++++-----------
 .../modules/languages/pages/xquery-language.adoc   | 13 ++++----
 docs/user-manual/modules/ROOT/nav.adoc             |  1 -
 .../modules/ROOT/pages/data-format.adoc            |  3 +-
 .../modules/ROOT/pages/getting-started.adoc        |  3 +-
 docs/user-manual/modules/ROOT/pages/index.adoc     |  9 +----
 docs/user-manual/modules/ROOT/pages/spring.adoc    |  8 ++---
 .../modules/ROOT/pages/xml-configuration.adoc      | 16 ---------
 ...how-do-i-import-rests-from-other-xml-files.adoc |  3 +-
 ...ow-do-i-import-routes-from-other-xml-files.adoc |  2 +-
 .../how-do-i-use-uris-with-parameters-in-xml.adoc  |  3 +-
 .../modules/faq/pages/is-there-an-ide.adoc         |  3 +-
 .../modules/faq/pages/what-is-camel.adoc           |  5 +--
 33 files changed, 165 insertions(+), 195 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc
index 39eece1..03e8085 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc
@@ -9,13 +9,20 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/datasonnet.
 
 *Since Camel {since}*
 
-Camel supports https://datasonnet.com/[DataSonnet] transformations to allow an Expression or Predicate to be used in the Java DSL or  xref:manual::xml-configuration.adoc[XML
-Configuration].
+Camel supports https://datasonnet.com/[DataSonnet] transformations to allow an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use DataSonnet to create an
+Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
+Filter] or as an Expression for a
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 To use a DataSonnet expression use the following Java code:
+
 [source,java]
 ---------------------------------------
-... datasonnet("someDSExpression") ...
+datasonnet("someDSExpression")
 ---------------------------------------
 
 == DataSonnet Options
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc
index 40ba5fa..a767a59 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc
@@ -9,17 +9,20 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/groovy.adoc
 
 *Since Camel {since}*
 
-Camel supports http://groovy.codehaus.org/[Groovy] among other
-Scripting Languages to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration].
+Camel supports http://www.groovy-lang.org/[Groovy] to allow an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use Groovy to create an
+Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
+Filter] or as an Expression for a
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 To use a Groovy expression use the following Java code
 
 [source,java]
 ---------------------------------------
-... groovy("someGroovyExpression") ...
+groovy("someGroovyExpression")
 ---------------------------------------
 
 For example you could use the *groovy* function to create an
@@ -114,16 +117,12 @@ And the Spring DSL:
 
 == Additional arguments to ScriptingEngine
 
-*Since Camel 2.8*
-
 You can provide additional arguments to the `ScriptingEngine` using a
 header on the Camel message with the key `CamelScriptArguments`. +
  See this example:
 
 == Loading script from external resource
 
-*Since Camel 2.11*
-
 You can externalize the script and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
@@ -136,8 +135,6 @@ eg to refer to a file on the classpath you can do:
 
 == How to get the result from multiple statements script
 
-*Since Camel 2.14*
-
 As the scripteengine evaluate method just return a Null if it runs a
 multiple statements script. Camel now look up the value of script result
 by using the key of "result" from the value set. If you have multiple
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/publish-subscribe-channel.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/publish-subscribe-channel.adoc
index c9b7c5e..55f2fe4 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/publish-subscribe-channel.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/publish-subscribe-channel.adoc
@@ -23,7 +23,7 @@ image::eip/PublishSubscribeSolution.gif[image]
 Another option is to explicitly list the publish-subscribe relationship
 in your routing logic; this keeps the producer and consumer decoupled
 but lets you control the fine grained routing configuration using the
-xref:latest@manual:ROOT:dsl.adoc[DSL] or xref:latest@manual:ROOT:xml-configuration.adoc[Xml Configuration].
+xref:latest@manual:ROOT:dsl.adoc[DSL].
 
 In Java code:
 
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-summary.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-summary.adoc
index fa93d8e..f56472d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-summary.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-summary.adoc
@@ -215,8 +215,7 @@ above in the `<packageScan>` documentation.
 
 == How do I import routes from other XML files
 
-When defining routes in Camel using xref:manual::xml-configuration.adoc[Xml
-Configuration] you may want to define some routes in other XML files.
+When defining routes in Camel using Spring XML you may want to define some routes in other XML files.
 For example you may have many routes and it may help to maintain the
 application if some of the routes are in separate XML files. You may
 also want to store common and reusable routes in other XML files, which
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/unmarshal-eip.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/unmarshal-eip.adoc
index c9f15be..d998681 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/unmarshal-eip.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/unmarshal-eip.adoc
@@ -1,7 +1,8 @@
 [[unmarshal-eip]]
 = Unmarshal EIP
 
-If you receive a message from one of the Camel xref:components::index.adoc[Components] such as xref:components::file-component.adoc[File], xref:components::http-component.adoc[HTTP] or xref:components::jms-component.adoc[JMS] you often want to unmarshal the payload into some bean so that you can process it using some xref:latest@manual:ROOT:bean-integration.adoc[Bean Integration] or perform xref:latest@manual:ROOT:predicate.adoc[Predicate] evaluation and so forth. To do this use the *unm [...]
+If you receive a message from one of the Camel xref:components::index.adoc[Components] such as xref:components::file-component.adoc[File], xref:components::http-component.adoc[HTTP] or xref:components::jms-component.adoc[JMS] you often want to unmarshal the payload into some bean so that you can process it using some xref:latest@manual:ROOT:bean-integration.adoc[Bean Integration] or perform xref:latest@manual:ROOT:predicate.adoc[Predicate] evaluation and so forth.
+
 
 == Options
 
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc
index fe007d12..bc4f79d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc
@@ -10,12 +10,13 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/xpath.adoc[
 *Since Camel {since}*
 
 Camel supports http://www.w3.org/TR/xpath[XPath] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XPath to create an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use XPath to create an
 Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
 Filter] or as an Expression for a
-Recipient List.
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 *Streams*
 
@@ -212,8 +213,6 @@ type so the concat function works.
 
 == Using XPath on Headers
 
-*Since Camel 2.11*
-
 Some users may have XML stored in a header. To apply an XPath to a
 header's value you can do this by defining the 'headerName' attribute.
 
@@ -279,8 +278,6 @@ public class Foo {
 
 == Using XPathBuilder without an Exchange
 
-*Since Camel 2.3*
-
 You can now use the `org.apache.camel.builder.XPathBuilder` without the
 need for an Exchange. This comes handy if you want
 to use it as a helper to do custom xpath evaluations.
@@ -319,8 +316,6 @@ String name = XPathBuilder.xpath("foo/bar").evaluate(context, "<foo><bar>cheese<
 
 == Using Saxon with XPathBuilder
 
-*Since Camel 2.3*
-
 You need to add *camel-saxon* as dependency to your project.
 
 Its now easier to use http://saxon.sourceforge.net/[Saxon] with the
@@ -334,8 +329,6 @@ The easy one
 
 == Setting a custom XPathFactory using System Property
 
-*Since Camel 2.3*
-
 Camel now supports reading the
 http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/XPathFactory.html#newInstance(java.lang.String)[JVM
 system property `javax.xml.xpath.XPathFactory`] that can be used to set
@@ -361,8 +354,6 @@ To use Apache Xerces you can configure the system property
 
 == Enabling Saxon from Spring DSL
 
-*Since Camel 2.10*
-
 Similarly to Java DSL, to enable Saxon from Spring DSL you have three
 options:
 
@@ -389,8 +380,6 @@ Shortcut
 
 == Namespace auditing to aid debugging
 
-*Since Camel 2.10*
-
 A large number of XPath-related issues that users frequently face are
 linked to the usage of namespaces. You may have some misalignment
 between the namespaces present in your message and those that your XPath
@@ -483,8 +472,6 @@ xmlns:b=[http://apache.org/camelA, http://apache.org/camelB]}
 
 == Loading script from external resource
 
-*Since Camel 2.11*
-
 You can externalize the script and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
@@ -497,6 +484,20 @@ eg to refer to a file on the classpath you can do:
 
 == Dependencies
 
-The XPath language is part of camel-core.
+To use XPath in your camel routes you need to add the a dependency on
+*camel-xpath* which implements the XPath language.
+
+If you use maven you could just add the following to your pom.xml,
+substituting the version number for the latest & greatest release (see
+the download page for the latest versions).
+
+[source,xml]
+--------------------------------------
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-xpath</artifactId>
+  <version>x.x.x</version>
+</dependency>
+--------------------------------------
 
 include::{page-component-version}@camel-spring-boot::page$xpath-starter.adoc[]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-component.adoc
index a359565..e602b19 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-component.adoc
@@ -12,12 +12,7 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/xquery.ado
 
 *{component-header}*
 
-Camel supports http://www.w3.org/TR/xquery/[XQuery] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XQuery to create an
-Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
-Filter] or as an Expression for a Recipient List.
+Camel supports http://www.w3.org/TR/xquery/[XQuery] component for message transformation
 
 // component-configure options: START
 == Configuring Options
@@ -219,7 +214,7 @@ attribute:
 
 [source,xml]
 -------------------------------------------------------------------------------
-    <xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
+<xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
 -------------------------------------------------------------------------------
 
 == Using XQuery as transformation
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc
index 44a5668..76ccd4c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc
@@ -10,12 +10,13 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/xquery.adoc
 *Since Camel {since}*
 
 Camel supports http://www.w3.org/TR/xquery/[XQuery] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XQuery to create an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use XQuery to create an
 Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
 Filter] or as an Expression for a
-Recipient List.
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 == XQuery Language options
 
@@ -116,7 +117,7 @@ attribute:
 
 [source,xml]
 -------------------------------------------------------------------------------
-    <xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
+<xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
 -------------------------------------------------------------------------------
 
 == Learning XQuery
@@ -153,7 +154,7 @@ If you use maven you could just add the following to your pom.xml,
 substituting the version number for the latest & greatest release (see
 the download page for the latest versions).
 
-[source,java]
+[source,xml]
 --------------------------------------
 <dependency>
   <groupId>org.apache.camel</groupId>
diff --git a/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc b/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc
index 39eece1..03e8085 100644
--- a/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc
+++ b/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc
@@ -9,13 +9,20 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/datasonnet.
 
 *Since Camel {since}*
 
-Camel supports https://datasonnet.com/[DataSonnet] transformations to allow an Expression or Predicate to be used in the Java DSL or  xref:manual::xml-configuration.adoc[XML
-Configuration].
+Camel supports https://datasonnet.com/[DataSonnet] transformations to allow an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use DataSonnet to create an
+Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
+Filter] or as an Expression for a
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 To use a DataSonnet expression use the following Java code:
+
 [source,java]
 ---------------------------------------
-... datasonnet("someDSExpression") ...
+datasonnet("someDSExpression")
 ---------------------------------------
 
 == DataSonnet Options
diff --git a/components/camel-groovy/src/main/docs/groovy-language.adoc b/components/camel-groovy/src/main/docs/groovy-language.adoc
index 40ba5fa..a767a59 100644
--- a/components/camel-groovy/src/main/docs/groovy-language.adoc
+++ b/components/camel-groovy/src/main/docs/groovy-language.adoc
@@ -9,17 +9,20 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/groovy.adoc
 
 *Since Camel {since}*
 
-Camel supports http://groovy.codehaus.org/[Groovy] among other
-Scripting Languages to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration].
+Camel supports http://www.groovy-lang.org/[Groovy] to allow an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use Groovy to create an
+Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
+Filter] or as an Expression for a
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 To use a Groovy expression use the following Java code
 
 [source,java]
 ---------------------------------------
-... groovy("someGroovyExpression") ...
+groovy("someGroovyExpression")
 ---------------------------------------
 
 For example you could use the *groovy* function to create an
@@ -114,16 +117,12 @@ And the Spring DSL:
 
 == Additional arguments to ScriptingEngine
 
-*Since Camel 2.8*
-
 You can provide additional arguments to the `ScriptingEngine` using a
 header on the Camel message with the key `CamelScriptArguments`. +
  See this example:
 
 == Loading script from external resource
 
-*Since Camel 2.11*
-
 You can externalize the script and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
@@ -136,8 +135,6 @@ eg to refer to a file on the classpath you can do:
 
 == How to get the result from multiple statements script
 
-*Since Camel 2.14*
-
 As the scripteengine evaluate method just return a Null if it runs a
 multiple statements script. Camel now look up the value of script result
 by using the key of "result" from the value set. If you have multiple
diff --git a/components/camel-saxon/src/main/docs/xquery-component.adoc b/components/camel-saxon/src/main/docs/xquery-component.adoc
index a359565..e602b19 100644
--- a/components/camel-saxon/src/main/docs/xquery-component.adoc
+++ b/components/camel-saxon/src/main/docs/xquery-component.adoc
@@ -12,12 +12,7 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/xquery.ado
 
 *{component-header}*
 
-Camel supports http://www.w3.org/TR/xquery/[XQuery] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XQuery to create an
-Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
-Filter] or as an Expression for a Recipient List.
+Camel supports http://www.w3.org/TR/xquery/[XQuery] component for message transformation
 
 // component-configure options: START
 == Configuring Options
@@ -219,7 +214,7 @@ attribute:
 
 [source,xml]
 -------------------------------------------------------------------------------
-    <xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
+<xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
 -------------------------------------------------------------------------------
 
 == Using XQuery as transformation
diff --git a/components/camel-saxon/src/main/docs/xquery-language.adoc b/components/camel-saxon/src/main/docs/xquery-language.adoc
index 44a5668..76ccd4c 100644
--- a/components/camel-saxon/src/main/docs/xquery-language.adoc
+++ b/components/camel-saxon/src/main/docs/xquery-language.adoc
@@ -10,12 +10,13 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/xquery.adoc
 *Since Camel {since}*
 
 Camel supports http://www.w3.org/TR/xquery/[XQuery] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XQuery to create an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use XQuery to create an
 Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
 Filter] or as an Expression for a
-Recipient List.
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 == XQuery Language options
 
@@ -116,7 +117,7 @@ attribute:
 
 [source,xml]
 -------------------------------------------------------------------------------
-    <xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
+<xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
 -------------------------------------------------------------------------------
 
 == Learning XQuery
@@ -153,7 +154,7 @@ If you use maven you could just add the following to your pom.xml,
 substituting the version number for the latest & greatest release (see
 the download page for the latest versions).
 
-[source,java]
+[source,xml]
 --------------------------------------
 <dependency>
   <groupId>org.apache.camel</groupId>
diff --git a/components/camel-spring/src/main/docs/spring-summary.adoc b/components/camel-spring/src/main/docs/spring-summary.adoc
index fa93d8e..f56472d 100644
--- a/components/camel-spring/src/main/docs/spring-summary.adoc
+++ b/components/camel-spring/src/main/docs/spring-summary.adoc
@@ -215,8 +215,7 @@ above in the `<packageScan>` documentation.
 
 == How do I import routes from other XML files
 
-When defining routes in Camel using xref:manual::xml-configuration.adoc[Xml
-Configuration] you may want to define some routes in other XML files.
+When defining routes in Camel using Spring XML you may want to define some routes in other XML files.
 For example you may have many routes and it may help to maintain the
 application if some of the routes are in separate XML files. You may
 also want to store common and reusable routes in other XML files, which
diff --git a/components/camel-xpath/src/main/docs/xpath-language.adoc b/components/camel-xpath/src/main/docs/xpath-language.adoc
index fe007d12..bc4f79d 100644
--- a/components/camel-xpath/src/main/docs/xpath-language.adoc
+++ b/components/camel-xpath/src/main/docs/xpath-language.adoc
@@ -10,12 +10,13 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/xpath.adoc[
 *Since Camel {since}*
 
 Camel supports http://www.w3.org/TR/xpath[XPath] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XPath to create an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use XPath to create an
 Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
 Filter] or as an Expression for a
-Recipient List.
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 *Streams*
 
@@ -212,8 +213,6 @@ type so the concat function works.
 
 == Using XPath on Headers
 
-*Since Camel 2.11*
-
 Some users may have XML stored in a header. To apply an XPath to a
 header's value you can do this by defining the 'headerName' attribute.
 
@@ -279,8 +278,6 @@ public class Foo {
 
 == Using XPathBuilder without an Exchange
 
-*Since Camel 2.3*
-
 You can now use the `org.apache.camel.builder.XPathBuilder` without the
 need for an Exchange. This comes handy if you want
 to use it as a helper to do custom xpath evaluations.
@@ -319,8 +316,6 @@ String name = XPathBuilder.xpath("foo/bar").evaluate(context, "<foo><bar>cheese<
 
 == Using Saxon with XPathBuilder
 
-*Since Camel 2.3*
-
 You need to add *camel-saxon* as dependency to your project.
 
 Its now easier to use http://saxon.sourceforge.net/[Saxon] with the
@@ -334,8 +329,6 @@ The easy one
 
 == Setting a custom XPathFactory using System Property
 
-*Since Camel 2.3*
-
 Camel now supports reading the
 http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/XPathFactory.html#newInstance(java.lang.String)[JVM
 system property `javax.xml.xpath.XPathFactory`] that can be used to set
@@ -361,8 +354,6 @@ To use Apache Xerces you can configure the system property
 
 == Enabling Saxon from Spring DSL
 
-*Since Camel 2.10*
-
 Similarly to Java DSL, to enable Saxon from Spring DSL you have three
 options:
 
@@ -389,8 +380,6 @@ Shortcut
 
 == Namespace auditing to aid debugging
 
-*Since Camel 2.10*
-
 A large number of XPath-related issues that users frequently face are
 linked to the usage of namespaces. You may have some misalignment
 between the namespaces present in your message and those that your XPath
@@ -483,8 +472,6 @@ xmlns:b=[http://apache.org/camelA, http://apache.org/camelB]}
 
 == Loading script from external resource
 
-*Since Camel 2.11*
-
 You can externalize the script and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
@@ -497,6 +484,20 @@ eg to refer to a file on the classpath you can do:
 
 == Dependencies
 
-The XPath language is part of camel-core.
+To use XPath in your camel routes you need to add the a dependency on
+*camel-xpath* which implements the XPath language.
+
+If you use maven you could just add the following to your pom.xml,
+substituting the version number for the latest & greatest release (see
+the download page for the latest versions).
+
+[source,xml]
+--------------------------------------
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-xpath</artifactId>
+  <version>x.x.x</version>
+</dependency>
+--------------------------------------
 
 include::{page-component-version}@camel-spring-boot::page$xpath-starter.adoc[]
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/publish-subscribe-channel.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/publish-subscribe-channel.adoc
index c9b7c5e..55f2fe4 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/publish-subscribe-channel.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/publish-subscribe-channel.adoc
@@ -23,7 +23,7 @@ image::eip/PublishSubscribeSolution.gif[image]
 Another option is to explicitly list the publish-subscribe relationship
 in your routing logic; this keeps the producer and consumer decoupled
 but lets you control the fine grained routing configuration using the
-xref:latest@manual:ROOT:dsl.adoc[DSL] or xref:latest@manual:ROOT:xml-configuration.adoc[Xml Configuration].
+xref:latest@manual:ROOT:dsl.adoc[DSL].
 
 In Java code:
 
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/unmarshal-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/unmarshal-eip.adoc
index c9f15be..d998681 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/unmarshal-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/unmarshal-eip.adoc
@@ -1,7 +1,8 @@
 [[unmarshal-eip]]
 = Unmarshal EIP
 
-If you receive a message from one of the Camel xref:components::index.adoc[Components] such as xref:components::file-component.adoc[File], xref:components::http-component.adoc[HTTP] or xref:components::jms-component.adoc[JMS] you often want to unmarshal the payload into some bean so that you can process it using some xref:latest@manual:ROOT:bean-integration.adoc[Bean Integration] or perform xref:latest@manual:ROOT:predicate.adoc[Predicate] evaluation and so forth. To do this use the *unm [...]
+If you receive a message from one of the Camel xref:components::index.adoc[Components] such as xref:components::file-component.adoc[File], xref:components::http-component.adoc[HTTP] or xref:components::jms-component.adoc[JMS] you often want to unmarshal the payload into some bean so that you can process it using some xref:latest@manual:ROOT:bean-integration.adoc[Bean Integration] or perform xref:latest@manual:ROOT:predicate.adoc[Predicate] evaluation and so forth.
+
 
 == Options
 
diff --git a/docs/components/modules/ROOT/pages/spring-summary.adoc b/docs/components/modules/ROOT/pages/spring-summary.adoc
index 31e91d2..91c157e 100644
--- a/docs/components/modules/ROOT/pages/spring-summary.adoc
+++ b/docs/components/modules/ROOT/pages/spring-summary.adoc
@@ -217,8 +217,7 @@ above in the `<packageScan>` documentation.
 
 == How do I import routes from other XML files
 
-When defining routes in Camel using xref:manual::xml-configuration.adoc[Xml
-Configuration] you may want to define some routes in other XML files.
+When defining routes in Camel using Spring XML you may want to define some routes in other XML files.
 For example you may have many routes and it may help to maintain the
 application if some of the routes are in separate XML files. You may
 also want to store common and reusable routes in other XML files, which
diff --git a/docs/components/modules/ROOT/pages/xquery-component.adoc b/docs/components/modules/ROOT/pages/xquery-component.adoc
index 6bb12d0..7da682a 100644
--- a/docs/components/modules/ROOT/pages/xquery-component.adoc
+++ b/docs/components/modules/ROOT/pages/xquery-component.adoc
@@ -14,12 +14,7 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/xquery.ado
 
 *{component-header}*
 
-Camel supports http://www.w3.org/TR/xquery/[XQuery] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XQuery to create an
-Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
-Filter] or as an Expression for a Recipient List.
+Camel supports http://www.w3.org/TR/xquery/[XQuery] component for message transformation
 
 // component-configure options: START
 == Configuring Options
@@ -221,7 +216,7 @@ attribute:
 
 [source,xml]
 -------------------------------------------------------------------------------
-    <xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
+<xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
 -------------------------------------------------------------------------------
 
 == Using XQuery as transformation
diff --git a/docs/components/modules/languages/pages/datasonnet-language.adoc b/docs/components/modules/languages/pages/datasonnet-language.adoc
index 0cc6dd6..fb832d1 100644
--- a/docs/components/modules/languages/pages/datasonnet-language.adoc
+++ b/docs/components/modules/languages/pages/datasonnet-language.adoc
@@ -11,13 +11,20 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/datasonnet.
 
 *Since Camel {since}*
 
-Camel supports https://datasonnet.com/[DataSonnet] transformations to allow an Expression or Predicate to be used in the Java DSL or  xref:manual::xml-configuration.adoc[XML
-Configuration].
+Camel supports https://datasonnet.com/[DataSonnet] transformations to allow an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use DataSonnet to create an
+Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
+Filter] or as an Expression for a
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 To use a DataSonnet expression use the following Java code:
+
 [source,java]
 ---------------------------------------
-... datasonnet("someDSExpression") ...
+datasonnet("someDSExpression")
 ---------------------------------------
 
 == DataSonnet Options
diff --git a/docs/components/modules/languages/pages/groovy-language.adoc b/docs/components/modules/languages/pages/groovy-language.adoc
index fcc0d57..e4cf0a0 100644
--- a/docs/components/modules/languages/pages/groovy-language.adoc
+++ b/docs/components/modules/languages/pages/groovy-language.adoc
@@ -11,17 +11,20 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/groovy.adoc
 
 *Since Camel {since}*
 
-Camel supports http://groovy.codehaus.org/[Groovy] among other
-Scripting Languages to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration].
+Camel supports http://www.groovy-lang.org/[Groovy] to allow an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use Groovy to create an
+Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
+Filter] or as an Expression for a
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 To use a Groovy expression use the following Java code
 
 [source,java]
 ---------------------------------------
-... groovy("someGroovyExpression") ...
+groovy("someGroovyExpression")
 ---------------------------------------
 
 For example you could use the *groovy* function to create an
@@ -116,16 +119,12 @@ And the Spring DSL:
 
 == Additional arguments to ScriptingEngine
 
-*Since Camel 2.8*
-
 You can provide additional arguments to the `ScriptingEngine` using a
 header on the Camel message with the key `CamelScriptArguments`. +
  See this example:
 
 == Loading script from external resource
 
-*Since Camel 2.11*
-
 You can externalize the script and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
@@ -138,8 +137,6 @@ eg to refer to a file on the classpath you can do:
 
 == How to get the result from multiple statements script
 
-*Since Camel 2.14*
-
 As the scripteengine evaluate method just return a Null if it runs a
 multiple statements script. Camel now look up the value of script result
 by using the key of "result" from the value set. If you have multiple
diff --git a/docs/components/modules/languages/pages/xpath-language.adoc b/docs/components/modules/languages/pages/xpath-language.adoc
index 00b1647..616b0e4 100644
--- a/docs/components/modules/languages/pages/xpath-language.adoc
+++ b/docs/components/modules/languages/pages/xpath-language.adoc
@@ -12,12 +12,13 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/xpath.adoc[
 *Since Camel {since}*
 
 Camel supports http://www.w3.org/TR/xpath[XPath] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XPath to create an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use XPath to create an
 Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
 Filter] or as an Expression for a
-Recipient List.
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 *Streams*
 
@@ -214,8 +215,6 @@ type so the concat function works.
 
 == Using XPath on Headers
 
-*Since Camel 2.11*
-
 Some users may have XML stored in a header. To apply an XPath to a
 header's value you can do this by defining the 'headerName' attribute.
 
@@ -281,8 +280,6 @@ public class Foo {
 
 == Using XPathBuilder without an Exchange
 
-*Since Camel 2.3*
-
 You can now use the `org.apache.camel.builder.XPathBuilder` without the
 need for an Exchange. This comes handy if you want
 to use it as a helper to do custom xpath evaluations.
@@ -321,8 +318,6 @@ String name = XPathBuilder.xpath("foo/bar").evaluate(context, "<foo><bar>cheese<
 
 == Using Saxon with XPathBuilder
 
-*Since Camel 2.3*
-
 You need to add *camel-saxon* as dependency to your project.
 
 Its now easier to use http://saxon.sourceforge.net/[Saxon] with the
@@ -336,8 +331,6 @@ The easy one
 
 == Setting a custom XPathFactory using System Property
 
-*Since Camel 2.3*
-
 Camel now supports reading the
 http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/XPathFactory.html#newInstance(java.lang.String)[JVM
 system property `javax.xml.xpath.XPathFactory`] that can be used to set
@@ -363,8 +356,6 @@ To use Apache Xerces you can configure the system property
 
 == Enabling Saxon from Spring DSL
 
-*Since Camel 2.10*
-
 Similarly to Java DSL, to enable Saxon from Spring DSL you have three
 options:
 
@@ -391,8 +382,6 @@ Shortcut
 
 == Namespace auditing to aid debugging
 
-*Since Camel 2.10*
-
 A large number of XPath-related issues that users frequently face are
 linked to the usage of namespaces. You may have some misalignment
 between the namespaces present in your message and those that your XPath
@@ -485,8 +474,6 @@ xmlns:b=[http://apache.org/camelA, http://apache.org/camelB]}
 
 == Loading script from external resource
 
-*Since Camel 2.11*
-
 You can externalize the script and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
@@ -499,6 +486,20 @@ eg to refer to a file on the classpath you can do:
 
 == Dependencies
 
-The XPath language is part of camel-core.
+To use XPath in your camel routes you need to add the a dependency on
+*camel-xpath* which implements the XPath language.
+
+If you use maven you could just add the following to your pom.xml,
+substituting the version number for the latest & greatest release (see
+the download page for the latest versions).
+
+[source,xml]
+--------------------------------------
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-xpath</artifactId>
+  <version>x.x.x</version>
+</dependency>
+--------------------------------------
 
 include::{page-component-version}@camel-spring-boot::page$xpath-starter.adoc[]
diff --git a/docs/components/modules/languages/pages/xquery-language.adoc b/docs/components/modules/languages/pages/xquery-language.adoc
index 7bb71b0..0a82120 100644
--- a/docs/components/modules/languages/pages/xquery-language.adoc
+++ b/docs/components/modules/languages/pages/xquery-language.adoc
@@ -12,12 +12,13 @@ include::{cq-version}@camel-quarkus:ROOT:partial$reference/languages/xquery.adoc
 *Since Camel {since}*
 
 Camel supports http://www.w3.org/TR/xquery/[XQuery] to allow an
-Expression or Predicate to be
-used in the DSL or xref:manual::xml-configuration.adoc[Xml
-Configuration]. For example you could use XQuery to create an
+xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] to be
+used in the xref:manual::dsl.adoc[DSL].
+
+For example you could use XQuery to create an
 Predicate in a xref:{eip-vc}:eips:filter-eip.adoc[Message
 Filter] or as an Expression for a
-Recipient List.
+xref:{eip-vc}:eips:recipientList-eip.adoc[Recipient List].
 
 == XQuery Language options
 
@@ -118,7 +119,7 @@ attribute:
 
 [source,xml]
 -------------------------------------------------------------------------------
-    <xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
+<xquery type="java.lang.String">concat('mock:foo.', /person/@city)</xquery>
 -------------------------------------------------------------------------------
 
 == Learning XQuery
@@ -155,7 +156,7 @@ If you use maven you could just add the following to your pom.xml,
 substituting the version number for the latest & greatest release (see
 the download page for the latest versions).
 
-[source,java]
+[source,xml]
 --------------------------------------
 <dependency>
   <groupId>org.apache.camel</groupId>
diff --git a/docs/user-manual/modules/ROOT/nav.adoc b/docs/user-manual/modules/ROOT/nav.adoc
index d65554c..af14584 100644
--- a/docs/user-manual/modules/ROOT/nav.adoc
+++ b/docs/user-manual/modules/ROOT/nav.adoc
@@ -22,7 +22,6 @@
 ** xref:testing.adoc[Testing]
 ** xref:rest-dsl.adoc[Working with REST and Rest DSL]
 ** xref:writing-components.adoc[Writing Components]
-** xref:xml-configuration.adoc[XML Configuration]
 ** xref:release-guide.adoc[Release guide]
 ** xref:improving-the-documentation.adoc[Improving the Documentation]
 * xref:migration-and-upgrade.adoc[Migration and Upgrade]
diff --git a/docs/user-manual/modules/ROOT/pages/data-format.adoc b/docs/user-manual/modules/ROOT/pages/data-format.adoc
index bd74d8a..c05f6bc 100644
--- a/docs/user-manual/modules/ROOT/pages/data-format.adoc
+++ b/docs/user-manual/modules/ROOT/pages/data-format.adoc
@@ -18,8 +18,7 @@ xref:components::http-component.adoc[HTTP] or xref:components::jms-component.ado
 the payload into some bean so that you can process it using some
 xref:bean-integration.adoc[Bean Integration] or perform
 xref:predicate.adoc[Predicate] evaluation and so forth. To do this use
-the `unmarshal` word in the xref:dsl.adoc[DSL] in Java or the
-xref:xml-configuration.adoc[XML DSL].
+the `unmarshal` word in the xref:dsl.adoc[DSL].
 
 For example:
 
diff --git a/docs/user-manual/modules/ROOT/pages/getting-started.adoc b/docs/user-manual/modules/ROOT/pages/getting-started.adoc
index 42c3d6c..da8ee05 100644
--- a/docs/user-manual/modules/ROOT/pages/getting-started.adoc
+++ b/docs/user-manual/modules/ROOT/pages/getting-started.adoc
@@ -11,8 +11,7 @@ documentation before continuing:
 * Longer xref:book-getting-started.adoc[Getting Started Guide]
 * Find out about xref:{eip-vc}:eips:enterprise-integration-patterns.adoc[Enterprise Integration Patterns]
   and how to implement them with Camel
-* Review the xref:architecture.adoc[Architecture guide] to see how to build Routes using the xref:java-dsl.adoc[Java DSL]
-  or xref:xml-configuration.adoc[XML DSL]
+* Review the xref:architecture.adoc[Architecture guide] to see how to build Routes using the xref:dsl.adoc[DSL].
 
 == Working with CamelContexts and RouteBuilders
 
diff --git a/docs/user-manual/modules/ROOT/pages/index.adoc b/docs/user-manual/modules/ROOT/pages/index.adoc
index cb1353f..44bc857 100644
--- a/docs/user-manual/modules/ROOT/pages/index.adoc
+++ b/docs/user-manual/modules/ROOT/pages/index.adoc
@@ -5,10 +5,7 @@ known xref:{eip-vc}:eips:enterprise-integration-patterns.adoc[Enterprise Integra
 Patterns].
 
 Camel empowers you to define routing and mediation rules in a variety of
-domain-specific languages, including a Java-based xref:dsl.adoc[Fluent
-API], xref:spring.adoc[Spring] or
-xref:using-osgi-blueprint-with-camel.adoc[Blueprint]
-xref:xml-configuration.adoc[XML Configuration] files.
+domain-specific languages (xref:manual::dsl.adoc[DSL], such as Java, XML, Groovy, Kotlin, and YAML).
 This means you get smart completion of
 routing rules in your IDE, whether in a Java or XML editor.
 
@@ -57,9 +54,6 @@ For a deeper and better understanding of Apache Camel, an xref:faq:what-is-camel
 * xref:using-propertyplaceholder.adoc[How to use Camel property placeholders]
 * xref:examples.adoc[Examples]
 * xref:testing.adoc[Testing]
-* xref:xml-configuration.adoc[XML Configuration]
-* [Using CamelProxy] for how to use proxies for clients to easily invoke
-camel routes without them knowing
 * xref:camel-maven-plugin.adoc[Camel Maven Plugin] for running Camel from a Maven goal
 * xref:camel-component-maven-plugin.adoc[Camel Component Maven Plugin] to generate all the necessary metadata and Java file for your custom component.
 * xref:camel-report-maven-plugin.adoc[Camel Maven Report Plugin] to validate your source code and report the code coverage of your camel routes
@@ -116,7 +110,6 @@ camel routes without them knowing
 * xref:type-converter.adoc[Type Converter]
 * xref:uris.adoc[URIs]
 * xref:uuidgenerator.adoc[UuidGenerator]
-* xref:xml-configuration.adoc[XML Configuration]
 
 === xref:dsl.adoc[DSL]
 
diff --git a/docs/user-manual/modules/ROOT/pages/spring.adoc b/docs/user-manual/modules/ROOT/pages/spring.adoc
index 00850a8..a474d2b 100644
--- a/docs/user-manual/modules/ROOT/pages/spring.adoc
+++ b/docs/user-manual/modules/ROOT/pages/spring.adoc
@@ -1,14 +1,14 @@
 [[Spring-Spring]]
 = Spring
 
-Apache Camel is designed to work nicely with the Spring Framework in a number of ways.
+Apache Camel is designed to work first class with Spring in a number of ways, such as:
 
 * Camel runs on Spring Boot with the Camel Spring Boot project
 * Camel works with Spring XML configuration files (classic Spring XML)
 * Camel works with Spring dependency injection
-* Camel works with configuration and property placeholders
-* Camel works with Spring Transaction
-* Camel works with Spring Testing making it easy to write unit and integration tests with Camel and Spring
+* Camel works with Spring configuration and property placeholders
+* Camel works with Spring transactions
+* Camel works with Spring testing
 
 == Using Spring to configure the CamelContext
 
diff --git a/docs/user-manual/modules/ROOT/pages/xml-configuration.adoc b/docs/user-manual/modules/ROOT/pages/xml-configuration.adoc
deleted file mode 100644
index 972cc4d..0000000
--- a/docs/user-manual/modules/ROOT/pages/xml-configuration.adoc
+++ /dev/null
@@ -1,16 +0,0 @@
-[[XMLConfiguration-XMLConfiguration]]
-= XML Configuration
-
-We recommend developers use the Java xref:dsl.adoc[Domain Specific Language] when writing routing rules as this provides maximum IDE
-completion and functionality while being the most expressive. However if
-you wish to put your routing rules in XML you can via the Camel XML
-language.
-
-Camel XML uses xref:components::spring-summary.adoc[Spring] 2 namespaces; so that you can
-configure your routing rules within your 
-xref:components::spring-summary.adoc[Spring XML configuration file]; you can also use
-xref:faq:how-do-i-configure-endpoints.adoc[Java code to configure components and endpoints].
-
-For examples on how to use Camel XML, see the
-xref:{eip-vc}:eips:enterprise-integration-patterns.adoc[Enterprise Integration Patterns] or refer to the xref:components::spring-summary.adoc[Spring Support].
-
diff --git a/docs/user-manual/modules/faq/pages/how-do-i-import-rests-from-other-xml-files.adoc b/docs/user-manual/modules/faq/pages/how-do-i-import-rests-from-other-xml-files.adoc
index aa20088..bb6e894 100644
--- a/docs/user-manual/modules/faq/pages/how-do-i-import-rests-from-other-xml-files.adoc
+++ b/docs/user-manual/modules/faq/pages/how-do-i-import-rests-from-other-xml-files.adoc
@@ -3,8 +3,7 @@
 
 *Since Camel 2.14*
 
-When defining rests in Camel using xref:ROOT:xml-configuration.adoc[Xml
-Configuration] you may want to define some rests in other XML files. For
+When defining rests in Camel using Spring XML you may want to define some rests in other XML files. For
 example you may have many rest services and it may help to maintain the
 application if some of the rests are in separate XML files. You may also
 want to store common and reusable rests in other XML files, which you
diff --git a/docs/user-manual/modules/faq/pages/how-do-i-import-routes-from-other-xml-files.adoc b/docs/user-manual/modules/faq/pages/how-do-i-import-routes-from-other-xml-files.adoc
index a96e27c..f8b39e1 100644
--- a/docs/user-manual/modules/faq/pages/how-do-i-import-routes-from-other-xml-files.adoc
+++ b/docs/user-manual/modules/faq/pages/how-do-i-import-routes-from-other-xml-files.adoc
@@ -3,7 +3,7 @@
 
 *Since Camel 2.3*
 
-When defining routes in Camel using xref:ROOT:xml-configuration.adoc[XML Configuration]
+When defining routes in Camel using Spring XML
 you may want to define some routes in other XML files.
 For example you may have many routes and it may help to maintain the
 application if some of the routes are in separate XML files. You may
diff --git a/docs/user-manual/modules/faq/pages/how-do-i-use-uris-with-parameters-in-xml.adoc b/docs/user-manual/modules/faq/pages/how-do-i-use-uris-with-parameters-in-xml.adoc
index 14c1839..b7a13ce 100644
--- a/docs/user-manual/modules/faq/pages/how-do-i-use-uris-with-parameters-in-xml.adoc
+++ b/docs/user-manual/modules/faq/pages/how-do-i-use-uris-with-parameters-in-xml.adoc
@@ -2,8 +2,7 @@
 = How do I use URIs with parameters in XML?
 
 If you try and use one of the Camel xref:ROOT:uris.adoc[URIs] in an
-xref:ROOT:xml-configuration.adoc[XML Configuration] using the URI query
-parameter notation, such as:
+XML DSL using the URI query parameter notation, such as:
 
 [source,xml]
 ----
diff --git a/docs/user-manual/modules/faq/pages/is-there-an-ide.adoc b/docs/user-manual/modules/faq/pages/is-there-an-ide.adoc
index 13ea101..0ed573b 100644
--- a/docs/user-manual/modules/faq/pages/is-there-an-ide.adoc
+++ b/docs/user-manual/modules/faq/pages/is-there-an-ide.adoc
@@ -7,8 +7,7 @@ You could use your Java IDE for smart completion when creating
 xref:ROOT:routes.adoc[Java routing rules] via the xref:ROOT:dsl.adoc[DSL] which
 will give you smart completion in Java code.
 Or you can use your XML IDE (with XSD smart completion) to edit the
-xref:ROOT:spring.adoc[routing rules in XML] using the
-xref:ROOT:xml-configuration.adoc[XML Configuration]
+xref:ROOT:spring.adoc[routing rules in XML] using Spring XML files.
 
 Some of the xref:ROOT:commercial-camel-offerings.adoc[Commercial Companies]
 offers IDE's and other tooling for Camel.
diff --git a/docs/user-manual/modules/faq/pages/what-is-camel.adoc b/docs/user-manual/modules/faq/pages/what-is-camel.adoc
index 02356b2..aed1f87 100644
--- a/docs/user-manual/modules/faq/pages/what-is-camel.adoc
+++ b/docs/user-manual/modules/faq/pages/what-is-camel.adoc
@@ -6,10 +6,7 @@ known xref:{eip-vc}:eips:enterprise-integration-patterns.adoc[Enterprise Integra
 Patterns].
 
 Camel empowers you to define routing and mediation rules in a variety of
-domain-specific languages, including a Java-based xref:ROOT:dsl.adoc[Fluent
-API], xref:ROOT:spring.adoc[Spring] or
-xref:ROOT:using-osgi-blueprint-with-camel.adoc[Blueprint]
-xref:ROOT:xml-configuration.adoc[XML Configuration] files.
+domain-specific languages (xref:manual::dsl.adoc[DSL], such as Java, XML, Groovy, Kotlin, and YAML).
 This means you get smart completion of
 routing rules in your IDE, whether in a Java or XML editor.
 

[camel] 05/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit adbd552dabd41f85a65b0de9eacc3bd79be3eea2
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 16:54:47 2021 +0200

    Polish and cleanup documentation
---
 .../ROOT/pages/transactionerrorhandler.adoc        | 172 ---------------------
 1 file changed, 172 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/transactionerrorhandler.adoc b/docs/user-manual/modules/ROOT/pages/transactionerrorhandler.adoc
deleted file mode 100644
index 2b1f276..0000000
--- a/docs/user-manual/modules/ROOT/pages/transactionerrorhandler.adoc
+++ /dev/null
@@ -1,172 +0,0 @@
-[[TransactionErrorHandler-TransactionErrorHandler]]
-= TransactionErrorHandler
-
-*Since Camel 2.0*
-
-This is the new default transaction error handler in Camel 2.0 onwards,
-used for transacted routes.
-
-It uses the same base as the
-xref:defaulterrorhandler.adoc[DefaultErrorHandler] so it has the same
-feature set as this error handler.
-
-By default any exception thrown during routing will be propagated back
-to the caller and the xref:exchange.adoc[Exchange] ends immediately.
-However you can use the xref:exception-clause.adoc[Exception Clause] to
-catch a given exception and lower the exception by marking it as
-handled. If so the exception will *not* be sent back to the caller and
-the xref:exchange.adoc[Exchange] continues to be routed.
-
-[[TransactionErrorHandler-Example]]
-== Example
-
-In this route below, any exception thrown in eg the `validateOrder` bean
-will be propagated back to the caller, and its the jetty endpoint. It
-will return a HTTP error message back to the client.
-
-[source,java]
-----
-from("jetty:http://localhost/myservice/order").transacted().to("bean:validateOrder").to("jms:queue:order");
-----
-
-We can add a *onException* in case we want to catch certain exceptions
-and route them differently, for instance to catch a
-*ValidationException* and return a fixed response to the caller.
-
-[source,java]
-----
-onException(ValidationException.class).handled(true).transform(body(constant("INVALID ORDER")));
-
-from("jetty:http://localhost/myservice/order").transacted().to("bean:validateOrder").to("jms:queue:order");
-----
-
-When the *ValidationException* is thrown from the validate order bean it
-is intercepted by the
-xref:transactionerrorhandler.adoc[TransactionErrorHandler] and it let
-the `onException(ValidationException.class` handle it so the
-xref:exchange.adoc[Exchange] is routed to this route and since we use
-*handled(true)* then the original exception is lowered (= cleared) and
-we transform the message into a fixed response that are returned to
-jetty endpoint that returns it to the original caller.
-
-[[TransactionErrorHandler-Conventionoverconfiguration]]
-== Convention over configuration
-
-When you configure a route to be transacted you just mark it as
-transacted as follows:
-
-[source,java]
-----
-from("jms:queue:foo").transacted().to("bean:handleFoo");
-----
-
-And in Spring DSL:
-
-[source,xml]
-----
-<route>
-   <from uri="jms:queue:foo"/>
-   <transacted/>
-   <to uri="bean:handleFoo"/>
-</route>
-----
-
-What happens is that Camel will automatic lookup the right Spring
-transaction manager. It does using the following rules, in order: +
-1. If there is only 1 bean with the type
-`org.apache.camel.spi.TransactedPolicy` then its used. +
-2. If there is a bean with id `PROPAGATION_REQUIRED` and of type
-`org.apache.camel.spi.TransactedPolicy` then its used. +
-3. If there is only 1 bean with the type
-`org.springframework.transaction.PlatformTransactionManager` then its
-used.
-
-However you can explicit configure what you want to use. For instance
-the *transacted* DSL accepts a String reference parameter to indicate
-the bean id of the `org.apache.camel.spi.TransactedPolicy` bean to use
-in case you have multiple beans. For instance a PROPAGATION_REQUIRES_NEW
-bean.
-
-The *transactionErrorHandler* like the *transacted* also supprts
-convention over configuration and it will also automatic lookup the
-right Spring transaction manager. It does using the following rules, in
-order: +
-1. If there is only 1 bean with the type
-`org.apache.camel.spi.TransactedPolicy` then its used. +
-2. If there is a bean with id `PROPAGATION_REQUIRED` and of type
-`org.apache.camel.spi.TransactedPolicy` then its used. +
-3. If there is only 1 bean with the type
-`org.springframework.transaction.support.TransactionTemplate` then its
-used. +
-4. If there is only 1 bean with the type
-`org.springframework.transaction.PlatformTransactionManager` then its
-used.
-
-However you can explicit configure what you want to use. For instance
-the *transactionErrorHandler* DSL accepts either a TransactedPolicy, a
-TransactionTemplate or a PlatformTransactionManager.
-
-[[TransactionErrorHandler-UsingCameltodoredeliveries]]
-== Using Camel to do redeliveries
-
-As the xref:transactionerrorhandler.adoc[TransactionErrorHandler] also
-supports to let Camel do redeliveries you can use both worlds. Letting
-Camel do some redeliveries and at the end the backing transaction
-manager doing other redeliveries. In fact in the end the transaction
-manager have the final word. That means if Camel cannot process the
-exchange then its thrown back to the transaction manager that will
-perform the rollback, and redelivery.
-
-[[TransactionErrorHandler-ExamplewithusingCameltodoredeliveries]]
-=== Example with using Camel to do redeliveries
-
-In the route below we have configured a transaction error handler. It
-will by default do local redeliveries up till 6 times. In Case Camel
-could not redeliver the message it will be thrown back to the
-transaction manager that will do a rollback, and a redelivery if it was
-configured to do so.
-
-Notice that as we have all the powers from
-xref:defaulterrorhandler.adoc[DefaultErrorHandler] we can configure an
-*onException* where we state that in case of this particular exception,
-an IllegalArgumentException we will only do redeliveries up till 4
-times. (Yes the code is based on an unit test).
-
-And also notice that we mark the routes as transacted using
-*transacted*. This is always needed to instruct Camel that these routes
-are transacted.
-
-If you do not provide any Spring TransactionTemplate to either the
-*transactionErrorHandler*, then Camel will automatic lookup in the
-Spring application context for a transaction manager to use. See more in
-the Convention over configuration section on this page.
-
-And now the route:
-
-[source,java]
-----
-// configure transacted error handler to use up till 4 redeliveries
-// we have not passed in any spring TX manager. Camel will automatic
-// find it in the spring application context. You only need to help
-// Camel in case you have multiple TX managers
-errorHandler(transactionErrorHandler().maximumRedeliveries(6));
-
-// speical for this exception we only want to do it at most 4 times
-onException(IllegalArgumentException.class).maximumRedeliveries(4);
-
-from("direct:okay")
-    // marks this route as transacted, and we dont pass in any parameters so we
-    // will auto lookup and use the Policy defined in the spring XML file
-    .transacted()
-    .setBody(constant("Tiger in Action")).bean("bookService")
-    .setBody(constant("Elephant in Action")).bean("bookService");
-
-// marks this route as transacted that will use the single policy defined in the registry
-from("direct:fail")
-    // marks this route as transacted, and we dont pass in any parameters so we
-    // will auto lookup and use the Policy defined in the spring XML file
-    .transacted()
-    .setBody(constant("Tiger in Action")).bean("bookService")
-    .setBody(constant("Donkey in Action")).bean("bookService");
-----
-

[camel] 13/15: Upgrade apache any23 and regen

Posted by da...@apache.org.
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

commit b9d0b23e03294d8a986ad1dfcc2629bc4961da35
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 17 07:31:54 2021 +0200

    Upgrade apache any23 and regen
---
 camel-dependencies/pom.xml                                    |  6 +++---
 .../org/apache/camel/catalog/components/graphql.json          |  2 ++
 .../org/apache/camel/catalog/docs/content-enricher.adoc       |  2 +-
 .../org/apache/camel/catalog/docs/message-translator.adoc     |  2 +-
 .../org/apache/camel/catalog/docs/polling-consumer.adoc       |  1 -
 .../resources/org/apache/camel/catalog/docs/rollback-eip.adoc | 10 ----------
 .../org/apache/camel/catalog/docs/transactional-client.adoc   | 11 ++++-------
 .../resources/org/apache/camel/catalog/docs/wireTap-eip.adoc  |  1 -
 parent/pom.xml                                                |  6 +++---
 9 files changed, 14 insertions(+), 27 deletions(-)

diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index 371850e..173f210 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -36,7 +36,7 @@
     <activemq-artemis-version>2.17.0</activemq-artemis-version>
     <activemq-version>5.16.2</activemq-version>
     <ahc-version>2.12.3</ahc-version>
-    <apache-any23-version>2.3</apache-any23-version>
+    <apache-any23-version>2.4</apache-any23-version>
     <apache-drill-version>1.19.0</apache-drill-version>
     <apache-gora-version>0.9</apache-gora-version>
     <apacheds-version>2.0.0.AM26</apacheds-version>
@@ -467,8 +467,8 @@
     <quartz-version>2.3.2</quartz-version>
     <quickfixj-version>2.3.0</quickfixj-version>
     <rabbitmq-amqp-client-version>5.12.0</rabbitmq-amqp-client-version>
-    <rdf4j-model-version>2.4.4</rdf4j-model-version>
-    <rdf4j-rio-version>2.4.4</rdf4j-rio-version>
+    <rdf4j-model-version>3.7.2</rdf4j-model-version>
+    <rdf4j-rio-version>3.7.2</rdf4j-rio-version>
     <reactive-streams-version>1.0.3</reactive-streams-version>
     <reactor-netty-version>1.0.2</reactor-netty-version>
     <reactor-version>3.4.5</reactor-version>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/graphql.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/graphql.json
index d02a6fa..89b6011 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/graphql.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/graphql.json
@@ -32,7 +32,9 @@
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The proxy host in the format hostname:port." },
     "query": { "kind": "parameter", "displayName": "Query", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The query text." },
     "queryFile": { "kind": "parameter", "displayName": "Query File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The query file name located in the classpath." },
+    "queryHeader": { "kind": "parameter", "displayName": "Query Header", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of a header containing the GraphQL query." },
     "variables": { "kind": "parameter", "displayName": "Variables", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.util.json.JsonObject", "deprecated": false, "autowired": false, "secret": false, "description": "The JsonObject instance containing the operation variables." },
+    "variablesHeader": { "kind": "parameter", "displayName": "Variables Header", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of a header containing a JsonObject instance containing the operation variables." },
     "accessToken": { "kind": "parameter", "displayName": "Access Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The access token sent in the Authorization header." },
     "jwtAuthorizationType": { "kind": "parameter", "displayName": "Jwt Authorization Type", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Bearer", "description": "The JWT Authorization type. Default is Bearer." },
     "password": { "kind": "parameter", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The password for Basic authentication." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/content-enricher.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/content-enricher.adoc
index 4468a91..a257f19 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/content-enricher.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/content-enricher.adoc
@@ -14,7 +14,7 @@ image::eip/DataEnricher.gif[image]
 [[ContentEnricher-ContentenrichmentusingaMessageTranslatororaProcessor]]
 == Content enrichment using a Message Translator or a Processor
 
-You can use xref:latest@manual:ROOT:templating.adoc[Templating] to consume a message from
+You can consume a message from
 one destination, transform it with something like
 xref:components::velocity-component.adoc[Velocity] or xref:components::xquery-component.adoc[XQuery], and then send
 it on to another destination. For example using InOnly (one way
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/message-translator.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/message-translator.adoc
index 4974569..7dcf17a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/message-translator.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/message-translator.adoc
@@ -52,7 +52,7 @@ invoke a bean
 </route>
 ----
 
-You can also use xref:latest@manual:ROOT:templating.adoc[Templating] to consume a message
+You can also consume a message
 from one destination, transform it with something like
 xref:components::velocity-component.adoc[Velocity] or xref:components::xquery-component.adoc[XQuery] and then send
 it on to another destination. For example using InOnly (one way
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/polling-consumer.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/polling-consumer.adoc
index ba3dadd..5602085 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/polling-consumer.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/polling-consumer.adoc
@@ -424,5 +424,4 @@ defined in the xref:latest@manual:ROOT:registry.adoc[Registry] with the bean id
 from("file://inbox/?pollStrategy=#myPoll").to("activemq:queue:inbox")
 ----
 
-xref:latest@manual:ROOT:using-this-pattern.adoc[Using This Pattern]
 
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/rollback-eip.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/rollback-eip.adoc
index dd54a8a..4eb660f 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/rollback-eip.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/rollback-eip.adoc
@@ -186,16 +186,6 @@ then we configure our routes. Notice that all we have to do is mark the
 route as transacted using the *transacted*
 tag.https://github.com/apache/camel/blob/main/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml[TransactionMinimalConfigurationTest.xml]
 
-Transaction error handler
-
-When a route is marked as transacted using *transacted* Camel will
-automatic use the
-xref:latest@manual:ROOT:transactionerrorhandler.adoc[TransactionErrorHandler] as
-xref:latest@manual:ROOT:error-handler.adoc[Error Handler]. It supports basically the same
-feature set as the xref:latest@manual:ROOT:defaulterrorhandler.adoc[DefaultErrorHandler],
-so you can for instance use xref:latest@manual:ROOT:exception-clause.adoc[Exception Clause]
-as well.
-
 == Integration Testing with Spring
 
 An Integration Test here means a test runner class annotated
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/transactional-client.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/transactional-client.adoc
index e66dcdb..f36bd43 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/transactional-client.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/transactional-client.adoc
@@ -288,13 +288,10 @@ route as transacted using the *transacted* tag.
 === Transaction error handler
 
 When a route is marked as transacted using *transacted* Camel will
-automatic use the
-xref:latest@manual:ROOT:transactionerrorhandler.adoc[TransactionErrorHandler]
-as xref:latest@manual:ROOT:error-handler.adoc[Error Handler].
-It supports basically the same feature set as the
-xref:latest@manual:ROOT:defaulterrorhandler.adoc[DefaultErrorHandler],
-so you can for instance use
-xref:latest@manual:ROOT:exception-clause.adoc[Exception Clause]
+automatic use `TransactionErrorHandler` as the
+xref:latest@manual:ROOT:error-handler.adoc[Error Handler]. This error handler supports basically the same
+feature set as the xref:latest@manual:ROOT:defaulterrorhandler.adoc[DefaultErrorHandler],
+so you can for instance use xref:latest@manual:ROOT:exception-clause.adoc[Exception Clause]
 as well.
 
 [[TransactionalClient-IntegrationTestingwithSpring]]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wireTap-eip.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wireTap-eip.adoc
index de9b7ac..2c87f2c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wireTap-eip.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wireTap-eip.adoc
@@ -202,4 +202,3 @@ The following example sends a new message which has
 
 See details at xref:multicast-eip.adoc[Multicast]
 
-xref:latest@manual:ROOT:using-this-pattern.adoc[Using This Pattern]
diff --git a/parent/pom.xml b/parent/pom.xml
index 156fb84..07578e9 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -52,7 +52,7 @@
         <activemq-artemis-version>2.17.0</activemq-artemis-version>
         <ahc-version>2.12.3</ahc-version>
         <apacheds-version>2.0.0.AM26</apacheds-version>
-        <apache-any23-version>2.3</apache-any23-version>
+        <apache-any23-version>2.4</apache-any23-version>
         <apache-drill-version>1.19.0</apache-drill-version>
         <apache-gora-version>0.9</apache-gora-version>
         <arangodb-java-version>6.12.3</arangodb-java-version>
@@ -453,8 +453,8 @@
         <quartz-version>2.3.2</quartz-version>
         <quickfixj-version>2.3.0</quickfixj-version>
         <rabbitmq-amqp-client-version>5.12.0</rabbitmq-amqp-client-version>
-        <rdf4j-rio-version>2.4.4</rdf4j-rio-version>
-        <rdf4j-model-version>2.4.4</rdf4j-model-version>
+        <rdf4j-rio-version>3.7.2</rdf4j-rio-version>
+        <rdf4j-model-version>3.7.2</rdf4j-model-version>
         <reactive-streams-version>1.0.3</reactive-streams-version>
         <reactor-version>3.4.5</reactor-version>
         <reactor-netty-version>1.0.2</reactor-netty-version>

[camel] 10/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 0138f26aa66bbffaff07ad3c46c2b9c833ed9f0f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 21:48:33 2021 +0200

    Polish and cleanup documentation
---
 .../modules/ROOT/pages/type-converter.adoc         | 269 +++++++--------------
 1 file changed, 84 insertions(+), 185 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/type-converter.adoc b/docs/user-manual/modules/ROOT/pages/type-converter.adoc
index a9c8feb..f40bff6 100644
--- a/docs/user-manual/modules/ROOT/pages/type-converter.adoc
+++ b/docs/user-manual/modules/ROOT/pages/type-converter.adoc
@@ -9,56 +9,75 @@ Conversions regularly occur between the following types:
 * `byte[]` and `ByteBuffer`
 * `InputStream` and `OutputStream`
 * `Reader` and `Writer`
-* `Document` and `Source`
+* XML payloads such as `Document` and `Source`
 
-To convert the body of a message to another type:
+For example to convert the message body to XML `Document` type
+then this can be done as follows in Java:
 
 [source,java]
 ----
-Message message = exchange.getIn();
-Document document = message.getBody(Document.class); // <1>
+Message message = exchange.getMessage();
+Document document = message.getBody(Document.class);
 ----
-<1> where https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Message.html#getBody-java.lang.Class-[`Message#getBody(Class)`] performs the conversion.
 
-[[TypeConverter-HowTypeConversionworks]]
+Notice that the code only tells Camel what you *want* as the result type (`Document`)
+and not what the input type is, or how Camel should do this.
+
 == How Type Conversion works
 
 The type conversion strategy is defined by the
 https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/TypeConverter.html[TypeConverter]
-interface that can be customized on a
-https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/CamelContext.html[CamelContext].
+interface. The interface has several methods, however the most important and common API is:
+
+[source,java]
+----
+<T> T convertTo(Class<T> type, Exchange exchange, Object value) throws TypeConversionException;
+----
+
+This API is used by Camel when it converts an object from one type to another. However if
+you pay attention then this API only has the result type in the contract. The input type
+is inferred from the _value_ parameter.
 
-Camel provides a default type converter registry.
-From Camel 3 onwards, the type converter registry implementation generates source code using the Camel Maven
-Package Plugin, allowing Camel, at runtime, to load and invoke these type converters via
-quick Java method invocations. In Camel 2, type converters are registered using annotation based discovery, invoking the type converters via the https://docs.oracle.com/javase/tutorial/reflect/[Java Reflection API].
+There are many type converters in Camel, some comes out of the box from camel-core, and others
+are additional converters that are shipped in various Camel components.
 
+=== Type converter registry
 
-[[TypeConverter-TypeConverterRegistry]]
-== TypeConverterRegistry
+To keep track of all those converters, then Camel has a registry for type converters
+(`org.apache.camel.spi.TypeConverterRegistry`).
 
-Add a `TypeConverter` to the
-https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/spi/TypeConverterRegistry.html[`TypeConverterRegistry`]
-at runtime using the xref:camelcontext.adoc[CamelContext]:
+This registry keeps track of all possible type converter combinations, such as which converters
+that can convert to an `InputStream` and so forth.
+
+So the example from before, what Camel would do is to lookup in the `TypeConverterRegistry`
+to find a suitable converter that can convert the given input value to the `Document` type.
+
+The `TypeConverterRegistry` can be accessed via Java:
 
 [source,java]
 ----
-CamelContext context = ...;
-context.getTypeConverterRegistry();
+TypeConverterRegistry tcr = camelContext.getTypeConverterRegistry();
+TypeConverter tc = tcr.lookup(Document.class, InputStream.class);
 ----
 
-NOTE: This is useful on platforms where the automatic type converters discovery fails due to classloading issues.
+However often you would not work directly with the `TypeConverterRegistry` or `TypeConverter` APIs in Camel;
+as type conversion are often implicit in use where you would just declare the result type; and Camel takes care of this.
 
-[[TypeConverter-TypeConverterRegistryutilizationstatistics]]
-=== TypeConverterRegistry utilization statistics
+[NOTE]
+====
+In Camel, all the official Camel components, comes with source code generated `TypeConverter`
+(via `camel-component-maven-plugin`) that allows Camel to load these converters very quickly,
+and invoke these type converters at runtime via quick Java method invocations (no reflection overhead).
+====
+
+=== Type converter registry utilization statistics
 
 Camel can gather utilization statistics of the runtime usage of type
-converters. These statistics are available in JMX as well as
+converters. These statistics are available in xref:jmx.adoc[JMX] as well as
 from https://www.javadoc.io/doc/org.apache.camel/camel-api/latest/org/apache/camel/spi/TypeConverterRegistry.html#getStatistics--[`TypeConverterRegistry#getStatistics()`].
 
 These statistics are turned off by
-default as there is some performance overhead under very high concurrent
-load.
+default as there is some performance overhead under very high concurrent load.
 
 Enabling statistics in Java:
 
@@ -72,113 +91,46 @@ Enabling statistics in XML DSL:
 
 [source,xml]
 ----
-<camelContext xmlns="http://camel.apache.org/schema/spring" typeConverterStatisticsEnabled="true">
+<camelContext typeConverterStatisticsEnabled="true">
     ...
 </camelContext>
 ----
 
-[[TypeConverter-Addtypeconverterclassesatruntime]]
-=== Add type converter classes at runtime
+== TypeConverter using @Converter annotation
+
+All the type converters that comes out of the box are coded as Java methods on _converter_ classes.
 
-Classes implementing https://www.javadoc.io/doc/org.apache.camel/camel-api/latest/org/apache/camel/TypeConverters.html[`TypeConverters`] are added to the type converter registry
-at runtime. Use https://javadoc.io/doc/org.apache.camel/camel-api/latest/org/apache/camel/Converter.html[`@Converter`] to mark each type converter.
+This means a class has been annotated with `@Converter` and the methods in the class
+becomes a type converter _pair_ when the methods is also annotated with `@Converter` such as:
 
 [source,java]
 ----
-private class MyOrderTypeConverters implements TypeConverters {
+@Converter(generateLoader = true)
+public class IOConverter {
     @Converter
-    public MyOrder toMyOrder(String orderId) {
-        MyOrder order = new MyOrder();
-        order.setId(Integer.parseInt(orderId));
-        return order;
+    public static InputStream toInputStream(File file) throws FileNotFoundException {
+        return new BufferedInputStream(new FileInputStream(file));
     }
 }
 ----
 
-Then, add these converters to the registry:
-
-[source,xml]
-----
-MyOrderTypeConverters myClass = ...;
-context.getTypeConverterRegistry().addTypeConverters(myClass);
-----
-
-If you are using Spring or Blueprint, then you can just declare a `<bean>`
-then `CamelContext` will automatic discover and add the converters.
-
-[source,xml]
-----
-<bean id="myOrderTypeConverters" class="..."/>
-    <camelContext ...>
-        ...
-    </camelContext>
-----
+This is from camel-core where the `IOConverter` class has a number of converters (only 1 shown).
+The method `toInputStream` is annotated with `@Converter` which then becomes a type converter
+that can convert from `File` to `InputStream`.
 
-You can declare multiple `<bean>`s if you have more classes.
+All these _converter_ classes are discovered and loaded by Camel.
 
-[[TypeConverter-DiscoveringTypeConverters]]
 == Discovering Type Converters
 
 Camel automatically discovers and loads the type converters from all JARs on the classpath at startup.
 
 Camel searches the classpath for a file called
 `META-INF/services/org/apache/camel/TypeConverterLoader` which lists
-all type converter loader classes. These are automatically generated by the Camel Maven Package Plugin.
+all type converter loader classes. These are automatically generated by the Camel Component Package Plugin.
 These _loader_ classes will load the type converters into the Camel type converter registry
 and invoke them in a _fast way_ using standard Java method calls.
 
-=== Discovering Camel 2.x based type converters (not loader)
-
-Camel will not perform additional package scanning for type converters which have no source code generated for loader classes.
-
-To enable additional package scanning in Java:
-
-[source,java]
-----
-camelContext.setLoadTypeConverters(true);
-----
-
-In XML DSL:
-
-[source,xml]
-----
-<camelContext loadTypeConverters="true">
-...
-</camelContext>
-----
-
-In Spring Boot `application.properties`:
-
-[source,properties]
-----
-camel.springboot.load-type-converters=true
-----
-
-Camel will discover Camel 2.x compatible type converters by
-searching the classpath for a file called `META-INF/services/org/apache/camel/TypeConverter`
-which lists all type converter classes. These classes are automatically registered in the type converter
-registry. However, invoking these type converters does **not** happen in a _fast way_ and uses the Java Reflection API.
-It is therefore recommended to upgrade any type converters to use the faster way. See below for more details.
-
-TIP: You can turn off the fallback of discovering Camel 2.x compatible type converters by
-setting `CamelContext.setLoadTypeConverters(false)`.
-
-`@Converter` must appear at the class and method level for each type converter.
-
-.Register a type converter from `File` to `InputStream`
-
-[source,java]
-----
-@Converter
-public class IOConverter {
-    @Converter
-    public static InputStream toInputStream(File file) throws FileNotFoundException {
-        return new BufferedInputStream(new FileInputStream(file));
-    }
-}
-----
-
-=== Discovering Type Converters in the fast way
+=== Discovering Type Converters (fast way)
 
 To enable the fast type converter way, you should enable `generateLoader = true`
 on the class level annotation as shown:
@@ -194,78 +146,10 @@ public class IOConverter {
 }
 ----
 
-And then you should have the Camel Maven Package Plugin in as build plugin when compiling the project.
-Also add the build helper plugin which ensures the generated source code in `src/generated` will be included in the source path.
-
-When using Maven you add:
-
-[source,xml]
-----
-      <plugin>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-package-maven-plugin</artifactId>
-        <version>${camel-version}</version>
-        <executions>
-          <execution>
-            <id>generate</id>
-            <goals>
-              <goal>generate-component</goal>
-            </goals>
-            <phase>process-classes</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>initialize</phase>
-            <goals>
-              <goal>add-source</goal>
-              <goal>add-resource</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>src/generated/java</source>
-              </sources>
-              <resources>
-                <resource>
-                  <directory>src/generated/resources</directory>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-----
-
-[[TypeConverter-Returningnullvalues]]
-=== Returning null values
-
-By default when using a method in a POJO annotation with @Converter
-returning null is not a valid response. If null is returned, then Camel
-will regard that type converter as a _miss_, and prevent from using it
-in the future. If null should be allowed as a valid response, then from
-*Camel 2.11.2/2.12* onwards you can specify this in the annotation as
-shown:
-
-[source,java]
-----
-@Converter(allowNull = true)
-public static InputStream toInputStream(File file) throws IOException {
-    if (file.exist()) {
-        return new BufferedInputStream(new FileInputStream(file));
-    } else {
-        return null;
-    }
-}
-----
+And then you should have the xref:camel-component-maven-plugin.adoc[Camel Component Package Plugin] in as build plugin when compiling the project.
 
 === Discovering Type Converters in the fastest way
 
-*Available in Camel 3.7*
-
 In Camel 3.7 we optimized the type converter system for optimal performance when using the built-in converters.
 This was done by bulking together all the converters in the same Maven module into a single class. The class has a single
 `convert` method where all the supported converters are available and discovered in a fast way using Java primitives.
@@ -288,7 +172,7 @@ There is a few limitations:
 
 - fallback converters is not supported
 - the order of the `@Converter` methods matters. If you have multiple `@Converter` methods that accept as _from_ type
-  types which are from the same class hierachy then put the methods first that are the most concrete.
+types which are from the same class hierachy then put the methods first that are the most concrete.
 
 For example in `camel-xml-jaxp` we have in the `XmlConverter` multiple `@Converter` methods which can convert to `DomSource`.
 We had to put the method that takes `org.w3c.dom.Document` before the method that takes `org.w3c.dom.Node` as `Document` extends `Node`.
@@ -306,10 +190,27 @@ The following code shows snippet of the source code generated bulk class. As you
             }
 ----
 
-[[TypeConverter-DiscoveringFallbackTypeConverters]]
-== Discovering Fallback Type Converters
+=== Returning null values
+
+By default, when using a method in a POJO annotation with `@Converter`
+returning `null` is not a valid response. If null is returned, then Camel
+will regard that type converter as a _miss_, and prevent from using it
+in the future. If `null` should be allowed as a valid response, then
+you must specify this in the annotation (via `allowNull`) as shown:
+
+[source,java]
+----
+@Converter(allowNull = true)
+public static InputStream toInputStream(File file) throws IOException {
+    if (file.exist()) {
+        return new BufferedInputStream(new FileInputStream(file));
+    } else {
+        return null;
+    }
+}
+----
 
-*Available in Camel 2.0*
+== Fallback Type Converters
 
 The
 https://www.javadoc.io/doc/org.apache.camel/camel-base/current/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.html[AnnotationTypeConverterLoader]
@@ -371,12 +272,11 @@ public static <T> T convertTo(Class<T> type, Exchange exchange, Object value, Ty
 }
 ----
 
-[[TypeConverter-WritingyourownTypeConverters]]
 == Writing your own Type Converters
 
 You are welcome to write your own converters. Remember to use the
 `@Converter` annotations on the classes and methods you wish to use.
-And on the top-level class add `Converter(loader = true)` to support the _fast way_
+And on the top-level class add `Converter(generateLoader = true)` to support the _fast way_
 of using type converters.
 
 * static methods are encouraged to reduce caching, but instance methods
@@ -384,8 +284,7 @@ are fine, particularly if you want to allow optional dependency
 injection to customize the converter
 * converter methods should be thread safe and reentrant
 
-[[TypeConverter-Exchangeparameter]]
-== Exchange parameter
+=== Exchange parameter
 
 The type converter accepts the `Exchange` as an optional 2nd parameter.
 This is usable if the type converter for instance needs information from

[camel] 09/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 8821cc2dd84813329b4643b83925e2d38e70a2ca
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 20:12:33 2021 +0200

    Polish and cleanup documentation
---
 .../modules/ROOT/pages/try-catch-finally.adoc      | 178 +++++++++++----------
 1 file changed, 97 insertions(+), 81 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/try-catch-finally.adoc b/docs/user-manual/modules/ROOT/pages/try-catch-finally.adoc
index d3b543a..e4b2f37 100644
--- a/docs/user-manual/modules/ROOT/pages/try-catch-finally.adoc
+++ b/docs/user-manual/modules/ROOT/pages/try-catch-finally.adoc
@@ -1,87 +1,121 @@
 [[TryCatchFinally-TryCatchFinally]]
 = Try ... Catch ... Finally
 
-Camel supports the Java equivalent of try .. catch and finally directly
-in the DSL.
+Camel supports the Java equivalent of try ... catch ... finally directly in the DSL.
 It aims to work like its Java sisters but with more power.
 
-In Camel we prefix the keywords with `do` to avoid having same keyword
-as Java. So we have:
+In Camel we prefix the keywords with `do` to avoid having same keyword as Java.
+So we have:
 
-* `doTry`
-* `doCatch`
-* `doFinally`
-* `end` to end the block in Java DSL
+- `doTry`
+- `doCatch`
+- `doFinally`
+- `end` to end the block in Java DSL
 
-== Camel error handling is disabled
+When using `doTry ... doCatch ... doFinally` then the regular Camel
+xref:error-handler.adoc[Error Handler] is not in use; meaning any
+`onException` or the likes does not trigger.
+The reason is that
+`doTry ... doCatch ... doFinally` is in fact its own error handler and mimics how try/catch/finally works in Java.
 
-When using `doTry .. doCatch .. doFinally` then the regular Camel
-xref:error-handler.adoc[Error Handler] does not apply. That means any
-`onException` or the likes does not trigger. The reason is that
-`doTry .. doCatch .. doFinally` is in fact its own error handler and
-that it aims to mimic and work like how try/catch/finally works in Java.
+== Using doTry ... doCatch ... doFinally
 
-[[TryCatchFinally-AboutdoCatchanditspoweroverJava]]
-== About `doCatch` and its power over Java
+In the route below we have all of them in action:
 
-The `doCatch` in Camel is empowered over its Java sister.
-
-First of all you can define multiple exceptions to catch in a single
-block.
+[source,java]
+----
+from("direct:start")
+    .doTry()
+        .process(new ProcessorFail())
+        .to("mock:result")
+    .doCatch(IOException.class, IllegalStateException.class)
+        .to("mock:catch")
+    .doFinally()
+        .to("mock:finally")
+    .end();
+----
 
-And second of all an important aspect over the regular Java counter
-parts is that Camel will check in the exception hierarchy when it
-matches a thrown exception against the `doCatch` blocks. The reason is
-that many times the original caused exceptions is wrapped by other
-wrapper exceptions, typically transposing the exception from a checked
-to a runtime exception.
-Camel for instance does this by wrapping it in a `RuntimeCamelException`.
-So if the original caused exception is an `java.io.IOException` then
-Camel will still match a `doCatch` block defined with an
-`java.io.IOException`. And just like Java the order in which you have
-multiple `doCatch` blocks matters. Camel will iterate from the top going
-down and use the first `doCatch` that matches the exception. The reason
-is to keep it similar to the regular java and how it selects a catch
-block. This differs from the xref:exception-clause.adoc[Exception
-Clause] that has a more intelligent exception selection strategy among
-multiple `onException` definitions, where it also considers the delta in
-the exception hierarchy to select the best definition.
+And in XML DSL
 
-A third feature is that you can attach a `onWhen` predicate to signal if
-the catch should trigger or not at runtime.
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <doTry>
+    <process ref="processorFail"/>
+    <to uri="mock:result"/>
+    <doCatch>
+      <exception>java.io.IOException</exception>
+      <exception>java.lang.IllegalStateException</exception>
+      <to uri="mock:catch"/>
+    </doCatch>
+    <doFinally>
+       <to uri="mock:finally"/>
+    </doFinally>
+  </doTry>
+</route>
+----
 
-[[TryCatchFinally-UsingtrycatchfinallyinJavaDSL]]
-== Using try .. catch .. finally in Java DSL
+=== Using onWhen with doCatch
 
-In the route below we have all keywords in action. As the code is based
-on a unit test we route using xref:components::mock-component.adoc[Mock].
+You can use xref:predicate.adoc[Predicate]s with `doCatch` to make it runtime determine if the block should be triggered or not.
+In our case we only want to trigger if the caused exception message contains the *damn* word.
 
-https://github.com/apache/camel/tree/main/core/camel-core/src/test/java/org/apache/camel/processor/TryProcessorMultipleExceptionTest.java[TryProcessorMultipleExceptionTest.java]
+[source,java]
+----
+from("direct:start")
+    .doTry()
+        .process(new ProcessorFail())
+        .to("mock:result")
+    .doCatch(IOException.class, IllegalStateException.class).onWhen(exceptionMessage().contains("Damn"))
+        .to("mock:catch")
+    .doCatch(CamelExchangeException.class)
+        .to("mock:catchCamel")
+    .doFinally()
+        .to("mock:finally")
+    .end();
+----
 
-And finally we have an example of the `onWhen` predicate in action. We
-can attach it to a `doCatch` block and at runtime determine if the block
-should be triggered or not.
-In our case we only want to trigger if the caused exception message
-contains the *damn* word.
+And in XML DSL
 
-https://github.com/apache/camel/tree/main/core/camel-core/src/test/java/org/apache/camel/processor/TryProcessorOnWhenTest.java[TryProcessorOnWhenTest.java]
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <doTry>
+    <process ref="processorFail"/>
+    <to uri="mock:result"/>
+    <doCatch>
+      <exception>java.io.IOException</exception>
+      <exception>java.lang.IllegalStateException</exception>
+      <onWhen>
+        <simple>${exception.message} contains 'Damn'</simple>
+      </onWhen>
+      <to uri="mock:catch"/>
+    </doCatch>
+    <doCatch>
+      <exception>org.apache.camel.CamelExchangeException</exception>
+      <to uri="mock:catchCamel"/>
+    </doCatch>
+    <doFinally>
+       <to uri="mock:finally"/>
+    </doFinally>
+  </doTry>
+</route>
+----
 
 === Use end() to end the block
 
-Notice when using Java DSL we must use `end()` to indicate where the try
-.. catch .. finally block ends. As the example above has a finally, then
-the `end()` should be at the end of the finally block. If we are not
-using a finally, then the `end()` should be at the end of the `doCatch`
+Notice when using Java DSL we must use `end()` to indicate where the try ... catch ... finally block ends.
+As the example above has a finally, then the `end()` should be at the end of the finally block.
+If we are not using a finally, then the `end()` should be at the end of the `doCatch`
 to indicate the end there.
 
-TIP: Instead of `end()` you can use `endDoTry()` to end and return back to try .. catch scope.
+TIP: Instead of `end()` you can use `endDoTry()` to end and _return back_ to the try ... catch scope.
 
-=== Using nested doTry .. doCatch EIPs
+=== Using nested doTry ... doCatch EIPs
 
-When nesting doTry .. doCatch from an outer doTry .. doCatch EIP, then pay extra attention
-when using Java DSL as the Java programming language is not _indent aware_ so you may write
-Java code that are indented in a way where you think that a catch block is associated with
-the other doTry but it is not.
+When nesting doTry ... doCatch from an outer doTry ... doCatch EIP, then pay extra attention when using Java DSL as the Java programming language is not _indent aware_ so you may write Java code that are indented in a way where you think that a catch block is associated with the other doTry but it is not.
 
 Given the following Java DSL:
 
@@ -102,8 +136,7 @@ from("direct:test").routeId("myroute")
 Then you may think that _docatch2_ is associated on the outer doTry because of how the code is formatted.
 But it is **not**, both __docatch1__ and __docatch2__ are in the inner doTry, and the outer doTry has no catch blocks.
 
-So in this example the route will throw the 1st exception which is then handled in __docatch1__ which
-then throw a 2nd exception, that is not caught.
+So in this example the route will throw the 1st exception which is then handled in __docatch1__ which then throw a 2nd exception, that is not caught.
 
 So what you must do is to end the doCatch block correct (notice how we use `doEndTry()` two times) as shown below:
 
@@ -124,10 +157,10 @@ from("direct:test").routeId("myroute")
 ----
 
 And by using the `doEndTry()` we can end the block correctly, and an XML representation of the route would be as follows:
+
 [source,xml]
 ----
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<route xmlns="http://camel.apache.org/schema/spring">
+<route>
     <from uri="direct:test"/>
     <doTry>
         <doTry>
@@ -143,20 +176,3 @@ And by using the `doEndTry()` we can end the block correctly, and an XML represe
     </doTry>
 </route>
 ----
-
-[[TryCatchFinally-Usingtry..catch..finallyinSpringDSL]]
-== Using try .. catch .. finally in XML DSL
-
-In the route below we have all keywords in action. As the code is based
-on a unit test we route using xref:components::mock-component.adoc[Mock].
-
-https://github.com/apache/camel/tree/main/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml[SpringTryProcessorMultipleExceptionTest.xml]
-
-And finally we have an example of the `onWhen` predicate in action. We
-can attach it to a `doCatch` block and at runtime determine if the block
-should be triggered or not.
-In our case we only want to trigger if the caused exception message
-contains the *damn* word.
-
-https://github.com/apache/camel/tree/main/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorOnWhenTest.xml[SpringTryProcessorOnWhenTest.xml]
-

[camel] 11/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 4e323f67db0d63315f801894a328dc7a27506200
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 21:50:32 2021 +0200

    Polish and cleanup documentation
---
 docs/user-manual/modules/ROOT/pages/uris.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/uris.adoc b/docs/user-manual/modules/ROOT/pages/uris.adoc
index ddb8961..1d5c762 100644
--- a/docs/user-manual/modules/ROOT/pages/uris.adoc
+++ b/docs/user-manual/modules/ROOT/pages/uris.adoc
@@ -1,16 +1,16 @@
 [[URIs-URIs]]
 = URIs
 
-Camel makes extensive use of URIs to allow you to refer to endpoints
+Camel makes extensive use of URIs to allow you to refer to xref:endpoint.adoc[Endpoint]s
 which are lazily created by a xref:component.adoc[Component] if you
-refer to them within xref:routes.adoc[Routes].
+refer to them within xref:routes.adoc[Routes] from the xref:dsl.adoc[DSL].
 
 [IMPORTANT]
 ====
 Make sure to read
 xref:faq:how-do-i-configure-endpoints.adoc[How do I configure endpoints]
 to learn more about configuring endpoints. For
-example how to refer to beans in the xref:registry.adoc[Registry] or how
+example how to refer to beans in the xref:registry.adoc[registry] or how
 to use raw values for password options, and using
 xref:using-propertyplaceholder.adoc[property placeholders] etc.
 ====

[camel] 08/15: Polish and cleanup documentation

Posted by da...@apache.org.
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

commit 6670bff613d1f4647b2d200b2f4a69c2b1cfbacd
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 16 17:08:28 2021 +0200

    Polish and cleanup documentation
---
 .../src/main/docs/modules/eips/pages/polling-consumer.adoc        | 1 -
 .../src/main/docs/modules/eips/pages/wireTap-eip.adoc             | 1 -
 docs/user-manual/modules/ROOT/pages/using-this-pattern.adoc       | 8 --------
 3 files changed, 10 deletions(-)

diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc
index ba3dadd..5602085 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc
@@ -424,5 +424,4 @@ defined in the xref:latest@manual:ROOT:registry.adoc[Registry] with the bean id
 from("file://inbox/?pollStrategy=#myPoll").to("activemq:queue:inbox")
 ----
 
-xref:latest@manual:ROOT:using-this-pattern.adoc[Using This Pattern]
 
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/wireTap-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/wireTap-eip.adoc
index de9b7ac..2c87f2c 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/wireTap-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/wireTap-eip.adoc
@@ -202,4 +202,3 @@ The following example sends a new message which has
 
 See details at xref:multicast-eip.adoc[Multicast]
 
-xref:latest@manual:ROOT:using-this-pattern.adoc[Using This Pattern]
diff --git a/docs/user-manual/modules/ROOT/pages/using-this-pattern.adoc b/docs/user-manual/modules/ROOT/pages/using-this-pattern.adoc
deleted file mode 100644
index 81af7de..0000000
--- a/docs/user-manual/modules/ROOT/pages/using-this-pattern.adoc
+++ /dev/null
@@ -1,8 +0,0 @@
-= Using This Pattern
-
-If you would like to use this EIP Pattern then please read the
-xref:getting-started.adoc[Getting Started], you may also find the
-xref:architecture.adoc[Architecture] useful particularly the description
-of xref:endpoint.adoc[Endpoint] and xref:uris.adoc[URIs]. Then you could
-try out some of the xref:examples.adoc[Examples] first before trying
-this pattern out.