Author: buildbot
Date: Thu Mar  6 09:19:52 2014
New Revision: 900225

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/transactional-client.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/transactional-client.html
==============================================================================
--- websites/production/camel/content/transactional-client.html (original)
+++ websites/production/camel/content/transactional-client.html Thu Mar  6 
09:19:52 2014
@@ -86,32 +86,15 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h3 
id="TransactionalClient-TransactionalClient">Transactional Client</h3>
-<p>Camel recommends supporting the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/TransactionalClient.html"; 
rel="nofollow">Transactional Client</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using spring 
transactions.</p>
-
-<p><img class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif";></p>
-
-<p>Transaction Oriented Endpoints (<a shape="rect" 
href="what-is-a-camel-toe.html">Camel Toes</a>) like <a shape="rect" 
href="jms.html">JMS</a> support using a transaction for both inbound and 
outbound message exchanges.  Endpoints that support transactions will 
participate in the current transaction context that they are called from.</p>
-
-    <div class="aui-message success shadowed information-macro">
+<div class="wiki-content maincontent"><h3 
id="TransactionalClient-TransactionalClient">Transactional Client</h3><p>Camel 
recommends supporting the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/TransactionalClient.html"; 
rel="nofollow">Transactional Client</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using spring 
transactions.</p><p><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif";></p><p>Transaction
 Oriented Endpoints (<a shape="rect" href="what-is-a-camel-toe.html">Camel 
Toes</a>) like <a shape="rect" href="jms.html">JMS</a> support using a 
transaction for both inbound and outbound message exchanges. Endpoints that 
support transactions will participate in the current transaction context that 
they 
 are called from.</p>    <div class="aui-message success shadowed 
information-macro">
                     <p class="title">Configuration of Redelivery</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>The redelivery in transacted mode is <strong>not</strong> handled by Camel 
but by the backing system (the transaction manager). In such cases you should 
resort to the backing system how to configure the redelivery. </p>
+                            <p>The redelivery in transacted mode is 
<strong>not</strong> handled by Camel but by the backing system (the 
transaction manager). In such cases you should resort to the backing system how 
to configure the redelivery.</p>
                     </div>
     </div>
-
-
-<p>You should use the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/SpringRouteBuilder.html";>SpringRouteBuilder</a>
 to setup the routes since you will need to setup the spring context with the 
<a shape="rect" class="external-link" 
href="http://www.springframework.org/docs/api/org/springframework/transaction/support/TransactionTemplate.html";
 rel="nofollow">TransactionTemplate</a>s that will define the transaction 
manager configuration and policies.</p>
-
-<p>For inbound endpoint to be transacted, they normally need to be configured 
to use a Spring <a shape="rect" class="external-link" 
href="http://www.springframework.org/docs/api/org/springframework/transaction/PlatformTransactionManager.html";
 rel="nofollow">PlatformTransactionManager</a>.  In the case of the JMS 
component, this can be done by looking it up in the spring context.</p>
-
-<p>You first define needed object in the spring configuration.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-  &lt;bean id=&quot;jmsTransactionManager&quot; 
class=&quot;org.springframework.jms.connection.JmsTransactionManager&quot;&gt;
+<p>You should use the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/SpringRouteBuilder.html";>SpringRouteBuilder</a>
 to setup the routes since you will need to setup the spring context with the 
<a shape="rect" class="external-link" 
href="http://www.springframework.org/docs/api/org/springframework/transaction/support/TransactionTemplate.html";
 rel="nofollow">TransactionTemplate</a>s that will define the transaction 
manager configuration and policies.</p><p>For inbound endpoint to be 
transacted, they normally need to be configured to use a Spring <a shape="rect" 
class="external-link" 
href="http://www.springframework.org/docs/api/org/springframework/transaction/PlatformTransactionManager.html";
 rel="nofollow">PlatformTransactionManager</a>. In the case of the JMS 
component, this can be done by looking it up in the spring context.</p><p>You 
first define needed object in the spring configuration.</p><div class=
 "code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[  &lt;bean 
id=&quot;jmsTransactionManager&quot; 
class=&quot;org.springframework.jms.connection.JmsTransactionManager&quot;&gt;
     &lt;property name=&quot;connectionFactory&quot; 
ref=&quot;jmsConnectionFactory&quot; /&gt;
   &lt;/bean&gt;
   
@@ -119,28 +102,15 @@
     &lt;property name=&quot;brokerURL&quot; 
value=&quot;tcp://localhost:61616&quot;/&gt;
   &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>Then you look them up and use them to create the JmsComponent.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-  PlatformTransactionManager transactionManager = (PlatformTransactionManager) 
spring.getBean(&quot;jmsTransactionManager&quot;);
+</div></div><p>Then you look them up and use them to create the 
JmsComponent.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[  PlatformTransactionManager 
transactionManager = (PlatformTransactionManager) 
spring.getBean(&quot;jmsTransactionManager&quot;);
   ConnectionFactory connectionFactory = (ConnectionFactory) 
spring.getBean(&quot;jmsConnectionFactory&quot;);
   JmsComponent component = 
JmsComponent.jmsComponentTransacted(connectionFactory, transactionManager);
   component.getConfiguration().setConcurrentConsumers(1);
   ctx.addComponent(&quot;activemq&quot;, component);
 ]]></script>
-</div></div>
-
-
-<h4 id="TransactionalClient-TransactionPolicies">Transaction Policies</h4>
-
-<p>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 <a 
shape="rect" class="external-link" 
href="http://www.springframework.org/docs/api/org/springframework/transaction/support/TransactionTemplate.html";
 rel="nofollow">TransactionTemplate</a> under the covers for declaring the 
transaction demarcation to use.  So you will need to add something like the 
following to your spring xml:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-  &lt;bean id=&quot;PROPAGATION_REQUIRED&quot; 
class=&quot;org.apache.camel.spring.spi.SpringTransactionPolicy&quot;&gt;
+</div></div><h4 id="TransactionalClient-TransactionPolicies">Transaction 
Policies</h4><p>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 <a 
shape="rect" class="external-link" 
href="http://www.springframework.org/docs/api/org/springframework/transaction/support/TransactionTemplate.html";
 rel="nofollow">TransactionTemplate</a> under the covers for declaring the 
transaction demarcation to use. So you will need to add something like the 
following to your spring xml:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[  &lt;bean 
id=&quot;PROPAGATION_REQUIRED&quot; 
class=&quot;org.apache.camel.spring.spi.SpringTransactionPolicy&quot;&gt;
     &lt;property name=&quot;transactionManager&quot; 
ref=&quot;jmsTransactionManager&quot;/&gt;
   &lt;/bean&gt;
 
@@ -149,68 +119,36 @@
     &lt;property name=&quot;propagationBehaviorName&quot; 
value=&quot;PROPAGATION_REQUIRES_NEW&quot;/&gt;
   &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>Then in your <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/SpringRouteBuilder.html";>SpringRouteBuilder</a>,
 you just need to create new SpringTransactionPolicy objects for each of the 
templates.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-public void configure() {
+</div></div><p>Then in your <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/SpringRouteBuilder.html";>SpringRouteBuilder</a>,
 you just need to create new SpringTransactionPolicy objects for each of the 
templates.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[public void configure() {
    ...
    Policy requried = bean(SpringTransactionPolicy.class, 
&quot;PROPAGATION_REQUIRED&quot;));
    Policy requirenew = bean(SpringTransactionPolicy.class, 
&quot;PROPAGATION_REQUIRES_NEW&quot;));
    ...
 }
 ]]></script>
-</div></div>
-
-<p>Once created, you can use the Policy objects in your processing routes:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-
-   // Send to bar in a new transaction
+</div></div><p>Once created, you can use the Policy objects in your processing 
routes:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[   // Send to bar in a new transaction
    
from(&quot;activemq:queue:foo&quot;).policy(requirenew).to(&quot;activemq:queue:bar&quot;);
 
    // Send to bar without a transaction.
    from(&quot;activemq:queue:foo&quot;).policy(notsupported 
).to(&quot;activemq:queue:bar&quot;);
 
 ]]></script>
-</div></div>
-
-<h4 id="TransactionalClient-OSGiBlueprint">OSGi Blueprint</h4>
-
-<p>If you are using <a shape="rect" 
href="using-osgi-blueprint-with-camel.html">OSGi Blueprint</a> then you most 
likely have to explicit declare a policy and refer to the policy from the 
transacted in the route.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-  &lt;bean id=&quot;required&quot; 
class=&quot;org.apache.camel.spring.spi.SpringTransactionPolicy&quot;&gt;
+</div></div><h4 id="TransactionalClient-OSGiBlueprint">OSGi 
Blueprint</h4><p>If you are using <a shape="rect" 
href="using-osgi-blueprint-with-camel.html">OSGi Blueprint</a> then you most 
likely have to explicit declare a policy and refer to the policy from the 
transacted in the route.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[  &lt;bean id=&quot;required&quot; 
class=&quot;org.apache.camel.spring.spi.SpringTransactionPolicy&quot;&gt;
     &lt;property name=&quot;transactionManager&quot; 
ref=&quot;jmsTransactionManager&quot;/&gt;
     &lt;property name=&quot;propagationBehaviorName&quot; 
value=&quot;PROPAGATION_REQUIRED&quot;/&gt;
   &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>And then refer to "required" from the route:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><p>And then refer to "required" from the route:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;activemq:queue:foo&quot;/&gt;
   &lt;transacted ref=&quot;required&quot;/&gt;
   &lt;to uri=&quot;activemq:queue:bar&quot;/&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<h3 id="TransactionalClient-DatabaseSample">Database Sample</h3>
-<p>In this sample we want to ensure that two endpoints is under transaction 
control. These two endpoints inserts data into a database.<br clear="none">
-The sample is in its full as a <a shape="rect" class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMinimalConfigurationTest.java?view=log";>unit
 test</a>.</p>
-
-<p>First of all we setup the usual spring stuff in its configuration file. 
Here we have defined a DataSource to the HSQLDB and a most importantly<br 
clear="none">
-the Spring DataSoruce TransactionManager that is doing the heavy lifting of 
ensuring our transactional policies. You are of course free to use any<br 
clear="none">
-of the Spring based TransactionMananger, eg. if you are in a full blown J2EE 
container you could use JTA or the WebLogic or WebSphere specific managers.</p>
-
-<p>As we use the new convention over configuration we do <strong>not</strong> 
need to configure a transaction policy bean, so we do not have any 
<code>PROPAGATION_REQUIRED</code> beans.<br clear="none">
-All the beans needed to be configured is <strong>standard</strong> Spring 
beans only, eg. there are no Camel specific configuration at all.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h3 id="TransactionalClient-DatabaseSample">Database 
Sample</h3><p>In this sample we want to ensure that two endpoints is under 
transaction control. These two endpoints inserts data into a database.<br 
clear="none"> The sample is in its full as a <a shape="rect" 
class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMinimalConfigurationTest.java?view=log";>unit
 test</a>.</p><p>First of all we setup the usual spring stuff in its 
configuration file. Here we have defined a DataSource to the HSQLDB and a most 
importantly&#160;the Spring DataSource TransactionManager that is doing the 
heavy lifting of ensuring our transactional policies. You are of course free to 
use any&#160;of the Spring based TransactionMananger, eg. if you are in a full 
blown J2EE container you could use JTA or the WebLogic or WebSphere specific 
managers.</p><p>As we use the new convention o
 ver configuration we do <strong>not</strong> need to configure a transaction 
policy bean, so we do not have any <code>PROPAGATION_REQUIRED</code> 
beans.&#160;All the beans needed to be configured is <strong>standard</strong> 
Spring beans only, eg. there are no Camel specific configuration at 
all.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
 &lt;!-- this example uses JDBC so we define a data source --&gt;
 &lt;jdbc:embedded-database id=&quot;dataSource&quot; type=&quot;DERBY&quot;&gt;
@@ -228,11 +166,7 @@ All the beans needed to be configured is
     &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot;/&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>Then we are ready to define our Camel routes. We have two routes: 1 for 
success conditions, and 1 for a forced rollback condition.<br clear="none">
-This is after all based on a unit test. Notice that we mark each route as 
transacted using the <strong>transacted</strong> tag.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>Then we are ready to define our Camel routes. We have two 
routes: 1 for success conditions, and 1 for a forced rollback condition.<br 
clear="none"> This is after all based on a unit test. Notice that we mark each 
route as transacted using the <strong>transacted</strong> tag.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
 &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;route&gt;
@@ -268,15 +202,7 @@ This is after all based on a unit test. 
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<p>That is all that is needed to configure a Camel route as being transacted. 
Just remember to use the <strong>transacted</strong> DSL. The rest is standard 
Spring XML to setup the transaction manager.</p>
-
-<h3 id="TransactionalClient-JMSSample">JMS Sample</h3>
-<p>In this sample we want to listen for messages on a queue and process the 
messages with our business logic java code and send them along. Since its based 
on a <a shape="rect" class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.java?view=log";>unit
 test</a> the destination is a mock endpoint.</p>
-
-<p>First we configure the standard Spring XML to declare a JMS connection 
factory, a JMS transaction manager and our ActiveMQ component that we use in 
our routing.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>That is all that is needed to configure a Camel route as being 
transacted. Just remember to use the <strong>transacted</strong> DSL. The rest 
is standard Spring XML to setup the transaction manager.</p><h3 
id="TransactionalClient-JMSSample">JMS Sample</h3><p>In this sample we want to 
listen for messages on a queue and process the messages with our business logic 
java code and send them along. Since its based on a <a shape="rect" 
class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.java?view=log";>unit
 test</a> the destination is a mock endpoint.</p><p>First we configure the 
standard Spring XML to declare a JMS connection factory, a JMS transaction 
manager and our ActiveMQ component that we use in our routing.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
 &lt;!-- setup JMS connection factory --&gt;
 &lt;bean id=&quot;poolConnectionFactory&quot; 
class=&quot;org.apache.activemq.pool.PooledConnectionFactory&quot;&gt;
@@ -304,10 +230,7 @@ This is after all based on a unit test. 
     &lt;property name=&quot;transactionManager&quot; 
ref=&quot;jmsTransactionManager&quot;/&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>And then we configure our routes. Notice that all we have to do is mark the 
route as transacted using the <strong>transacted</strong> tag.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>And then we configure our routes. Notice that all we have to do 
is mark the route as transacted using the <strong>transacted</strong> 
tag.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
 &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;!-- disable JMX during testing --&gt;
@@ -326,26 +249,14 @@ This is after all based on a unit test. 
 
 &lt;bean id=&quot;myProcessor&quot; 
class=&quot;org.apache.camel.component.jms.tx.JMSTransactionalClientTest$MyProcessor&quot;/&gt;
 ]]></script>
-</div></div>
-
-    <div class="aui-message success shadowed information-macro">
+</div></div>    <div class="aui-message success shadowed information-macro">
                     <p class="title">Transaction error handler</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>When a route is marked as transacted using <strong>transacted</strong> 
Camel will automatic use the <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a> as <a 
shape="rect" href="error-handler.html">Error Handler</a>. It supports basically 
the same feature set as the <a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, so you can for 
instance use <a shape="rect" href="exception-clause.html">Exception Clause</a> 
as well.</p>
+                            <p>When a route is marked as transacted using 
<strong>transacted</strong> Camel will automatic use the <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a> as <a 
shape="rect" href="error-handler.html">Error Handler</a>. It supports basically 
the same feature set as the <a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, so you can for 
instance use <a shape="rect" href="exception-clause.html">Exception Clause</a> 
as well.</p>
                     </div>
     </div>
-
-
-<h2 
id="TransactionalClient-Usingmultiplerouteswithdifferentpropagationbehaviors">Using
 multiple routes with different propagation behaviors</h2>
-<p><strong>Available as of Camel 2.2</strong><br clear="none">
-Suppose you want to route a message through two routes and by which the 2nd 
route should run in its own transaction. How do you do that? You use 
propagation behaviors for that where you configure it as follows:</p>
-<ul class="alternate"><li>The first route use 
<code>PROPAGATION_REQUIRED</code></li><li>The second route use 
<code>PROPAGATION_REQUIRES_NEW</code></li></ul>
-
-
-<p>This is configured in the Spring XML file:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<h2 
id="TransactionalClient-Usingmultiplerouteswithdifferentpropagationbehaviors">Using
 multiple routes with different propagation behaviors</h2><p><strong>Available 
as of Camel 2.2</strong><br clear="none"> Suppose you want to route a message 
through two routes and by which the 2nd route should run in its own 
transaction. How do you do that? You use propagation behaviors for that where 
you configure it as follows:</p><ul class="alternate"><li>The first route use 
<code>PROPAGATION_REQUIRED</code></li><li>The second route use 
<code>PROPAGATION_REQUIRES_NEW</code></li></ul><p>This is configured in the 
Spring XML file:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
 &lt;bean id=&quot;PROPAGATION_REQUIRED&quot; 
class=&quot;org.apache.camel.spring.spi.SpringTransactionPolicy&quot;&gt;
     &lt;property name=&quot;transactionManager&quot; 
ref=&quot;txManager&quot;/&gt;
@@ -357,10 +268,7 @@ Suppose you want to route a message thro
     &lt;property name=&quot;propagationBehaviorName&quot; 
value=&quot;PROPAGATION_REQUIRES_NEW&quot;/&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>Then in the routes you use transacted DSL to indicate which of these two 
propagations it uses.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>Then in the routes you use transacted DSL to indicate which of 
these two propagations it uses.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:mixed&quot;)
     // using required
@@ -382,16 +290,7 @@ from(&quot;direct:mixed2&quot;)
     // this step will fail with donkey
     .setBody(constant(&quot;Donkey in 
Action&quot;)).beanRef(&quot;bookService&quot;);
 ]]></script>
-</div></div>
-
-<p>Notice how we have configured the <code>onException</code> in the 2nd route 
to indicate in case of any exceptions we should handle it and just rollback 
this transaction. <br clear="none">
-This is done using the <code>markRollbackOnlyLast</code> which tells Camel to 
only do it for the current transaction and not globally.</p>
-
-<h4 id="TransactionalClient-SeeAlso">See Also</h4>
-<ul><li><a shape="rect" href="error-handling-in-camel.html">Error handling in 
Camel</a></li><li><a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a></li><li><a 
shape="rect" href="error-handler.html">Error Handler</a></li><li><a 
shape="rect" href="jms.html">JMS</a></li></ul>
-
-
-<h4 id="TransactionalClient-UsingThisPattern">Using This Pattern</h4>
+</div></div><p>Notice how we have configured the <code>onException</code> in 
the 2nd route to indicate in case of any exceptions we should handle it and 
just rollback this transaction. This is done using the 
<code>markRollbackOnlyLast</code> which tells Camel to only do it for the 
current transaction and not globally.</p><h4 
id="TransactionalClient-SeeAlso">See Also</h4><ul><li><a shape="rect" 
href="error-handling-in-camel.html">Error handling in Camel</a></li><li><a 
shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a></li><li><a 
shape="rect" href="error-handler.html">Error Handler</a></li><li><a 
shape="rect" href="jms.html">JMS</a></li></ul><p></p><h4 
id="TransactionalClient-UsingThisPattern">Using This Pattern</h4>
 
 <p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div>
         </td>


Reply via email to