anchor.diff:  </camelContext>
   ----
   
  +== Local vs Global Transactions
  +
  +When talking about transactions, you need to distinguish between single- and
  +multiple-resource transactions. The former are also known as local transactions,
  +and the latter as global transactions
  +
  +=== Local Transactions
  +
  +If you only have a single resource (such as one database, or one messaging system) then
  +transactions can be simpler to orchestrate by the transaction manager. This is known as local transactions.
  +
  +The previous two examples above are both using a single resource, and are therefore using local transactions.
  +When using local transactions and Spring Transactions, then you can use the dedicated transaction manager for the resource type:
  +
  +- org.springframework.jdbc.datasource.DataSourceTransactionManager
  +- org.springframework.jms.connection.JmsTransactionManager
  +
  +TIP: Consult the spring documentation for more local transaction managers.
  +
  +=== Global Transactions
  +
  +The situation changes when you need to span multiple resources in the
  +same transaction, such as JMS and JDBC resources together.
  +
  +To support multiple resources you need to use a JTA (XA) capable transaction manager,
  +which means using `org.springframework.transaction.jta.JtaTransactionManager` with Spring Transactions.
  +
  +NOTE: For more information on JTA, see the Wikipedia page on the subject:
  +http://en.wikipedia.org/wiki/Java_Transaction_API. XA is also briefly discussed
  +here: http://en.wikipedia.org/wiki/X/Open_XA.
  +
  +That is not all, you also need to use a JTA transaction implementation such as:
  +
  +- Atomikos - https://www.atomikos.com/
  +- Narayana - https://narayana.io/
  +- JEE Application Server with JTA
  +
  +And all of this must be configured correctly to have JTA transaction working.
  +You may also need to do special configuration from the vendors of the resources (i.e. database or messaging system)
  +to have this work properly with JTA/XA transactions. Consult the documentation of those systems for more details.
  +
  
positive.code: === About JTA Transactions
  
  TODO:
  
  == Using Transactions in Camel
  
  TODO:
  
  === Transaction error handler
  
  When a route is marked as transacted using ``<transacted/>` Camel will
  automatically 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].
  
  === Transaction Policies
  
  Outbound endpoints will automatically enlist in the current transaction
  context. But what if you do not want your outbound endpoint to enlist in
  the same transaction as your inbound endpoint? The solution is to add a
  Transaction Policy to the processing route. You first have to define
  transaction policies that you will be using. The policies use a spring
  TransactionTemplate under the covers for declaring the transaction
  demarcation to use. So you will need to add something like the following
  to your spring xml:
  
  [source,xml]
  ----
  <bean id="PROPAGATION_REQUIRED" class="org.apache.camel.spring.spi.SpringTransactionPolicy">
      <property name="transactionManager" ref="jmsTransactionManager"/>
  </bean>
  
  <bean id="PROPAGATION_REQUIRES_NEW" class="org.apache.camel.spring.spi.SpringTransactionPolicy">
      <property name="transactionManager" ref="jmsTransactionManager"/>
      <property name="propagationBehaviorName" value="PROPAGATION_REQUIRES_NEW"/>
  </bean>
  ----
  
  Then in your
  https://www.javadoc.io/doc/org.apache.camel/camel-spring/current/org/apache/camel/spring/SpringRouteBuilder.html[SpringRouteBuilder],
  you just need to create new SpringTransactionPolicy objects for each of
  the templates.
  
  [source,java]
  ----
  public void configure() {
      ...
      Policy required = bean(SpringTransactionPolicy.class, "PROPAGATION_REQUIRED"));
      Policy requirenew = bean(SpringTransactionPolicy.class, "PROPAGATION_REQUIRES_NEW"));
      ...
  }
  ----
  
  Once created, you can use the Policy objects in your processing routes:
  
  [source,java]
  ----
  // Send to bar in a new transaction
  from("activemq:queue:foo").policy(requirenew)
      .to("activemq:queue:bar");
  
  // Send to bar without a transaction.
  from("activemq:queue:foo").policy(notsupported)
      .to("activemq:queue:bar");
  ----
  
  == Transaction example with database
  
  
negative.code: 
  === About Spring Transactions
  
  Camel uses Spring Transaction (`camel-spring`) to manage transactions via its `TransactionManager`
  API. Depending on the kinds of resources that are taking part in the transaction,
  an appropriate implementation of the transaction manager must be chosen. Spring
  offers a number of transaction managers out of the box that work for various local
  