You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2014/03/04 17:19:24 UTC

svn commit: r900001 [2/3] - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache xmlrpc.html xstream.html

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Tue Mar  4 16:19:23 2014
@@ -4260,11 +4260,11 @@ While not actual tutorials you might fin
                     </div>
     </div>
 <h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1393618717451 {padding: 0px;}
-div.rbtoc1393618717451 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1393618717451 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1393949900205 {padding: 0px;}
+div.rbtoc1393949900205 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1393949900205 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1393618717451">
+/*]]>*/</style></p><div class="toc-macro rbtoc1393949900205">
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Preface">Preface</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-About">About</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#Tutorial-JmsRemoting-WritingtheServer">Writing the Server</a>
@@ -6450,11 +6450,11 @@ So we completed the last piece in the pi
 
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1393618717683 {padding: 0px;}
-div.rbtoc1393618717683 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1393618717683 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1393949900780 {padding: 0px;}
+div.rbtoc1393949900780 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1393949900780 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1393618717683">
+/*]]>*/</style><div class="toc-macro rbtoc1393949900780">
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Introduction">Introduction</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Maven2">Maven 2</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-wsdl">wsdl</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-RunningtheExample">Running the Example</a></li></ul>
@@ -11020,39 +11020,26 @@ from(&quot;activemq:My.Queue&quot;).
 &lt;/dependency&gt;
 ]]></script>
 </div></div>
-<h2 id="BookInOnePage-XStream">XStream</h2>
-
-<p>XStream is a <a shape="rect" href="data-format.html">Data Format</a> which uses the <a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">XStream library</a> to marshal and unmarshal Java objects to and from XML.</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[
-// lets turn Object messages into XML then send to MQSeries
+<h2 id="BookInOnePage-XStream">XStream</h2><p>XStream is a <a shape="rect" href="data-format.html">Data Format</a> which uses the <a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">XStream library</a> to marshal and unmarshal Java objects to and from XML.</p><p>To use XStream in your camel routes you need to add the a dependency on&#160;<strong>camel-xstream</strong>&#160;which implements this data format.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code>&#160;for this component:</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;dependency&gt;
+  &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+  &lt;artifactId&gt;camel-xstream&lt;/artifactId&gt;
+  &lt;version&gt;x.x.x&lt;/version&gt;
+  &lt;!-- use the same version as your Camel core version --&gt;
+&lt;/dependency&gt;
+]]></script>
+</div></div><h3 id="BookInOnePage-UsingtheJavaDSL.1">Using the Java DSL</h3><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[// lets turn Object messages into XML then send to MQSeries
 from(&quot;activemq:My.Queue&quot;).
   marshal().xstream().
   to(&quot;mqseries:Another.Queue&quot;);
 ]]></script>
-</div></div>
-
-<h3 id="BookInOnePage-XMLInputFactoryandXMLOutputFactory">XMLInputFactory and XMLOutputFactory </h3>
-<p><a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">The XStream library</a> uses the <code>javax.xml.stream.XMLInputFactory</code> and <code>javax.xml.stream.XMLOutputFactory</code>,  you can control which implementation of this factory should be used.</p>
-
-<p>The Factory is discovered using this algorithm:<br clear="none">
-1. Use the <code>javax.xml.stream.XMLInputFactory</code> , <code>javax.xml.stream.XMLOutputFactory</code> system property.<br clear="none">
-2. Use the <code>lib/xml.stream.properties</code> file in the <code>JRE_HOME</code> directory.<br clear="none">
-3. Use the Services API, if available, to determine the classname by looking in the <code>META-INF/services/javax.xml.stream.XMLInputFactory</code>, <code>META-INF/services/javax.xml.stream.XMLOutputFactory</code>  files in jars available to the JRE.<br clear="none">
-4. Use the platform default XMLInputFactory,XMLOutputFactory instance.</p>
-
-<h3 id="BookInOnePage-HowtosettheXMLencodinginXstreamDataFormat?">How to set the XML encoding in Xstream DataFormat?</h3>
-<p>From Camel 2.2.0, you can set the encoding of XML in Xstream DataFormat by setting the Exchange's property with the key <code>Exchange.CHARSET_NAME</code>, or setting the encoding property on Xstream from DSL or Spring config.</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;activemq:My.Queue&quot;).
+</div></div><h3 id="BookInOnePage-XMLInputFactoryandXMLOutputFactory">XMLInputFactory and XMLOutputFactory</h3><p><a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">The XStream library</a> uses the <code>javax.xml.stream.XMLInputFactory</code> and <code>javax.xml.stream.XMLOutputFactory</code>, you can control which implementation of this factory should be used.</p><p>The Factory is discovered using this algorithm:<br clear="none"> 1. Use the <code>javax.xml.stream.XMLInputFactory</code> , <code>javax.xml.stream.XMLOutputFactory</code> system property.<br clear="none"> 2. Use the <code>lib/xml.stream.properties</code> file in the <code>JRE_HOME</code> directory.<br clear="none"> 3. Use the Services API, if available, to determine the classname by looking in the <code>META-INF/services/javax.xml.stream.XMLInputFactory</code>, <code>META-INF/services/javax.xml.stream.XMLOutputFactory</code> files in jars available to the JRE.<br clear="none"> 4. U
 se the platform default XMLInputFactory,XMLOutputFactory instance.</p><h3 id="BookInOnePage-HowtosettheXMLencodinginXstreamDataFormat?">How to set the XML encoding in Xstream DataFormat?</h3><p>From Camel 2.2.0, you can set the encoding of XML in Xstream DataFormat by setting the Exchange's property with the key <code>Exchange.CHARSET_NAME</code>, or setting the encoding property on Xstream from DSL or Spring config.</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;activemq:My.Queue&quot;).
   marshal().xstream(&quot;UTF-8&quot;).
   to(&quot;mqseries:Another.Queue&quot;);
 ]]></script>
-</div></div>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><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 id=&quot;camel&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     
@@ -11077,22 +11064,6 @@ from(&quot;activemq:My.Queue&quot;).
 &lt;/camelContext&gt;
 ]]></script>
 </div></div>
-
-<h3 id="BookInOnePage-Dependencies.22">Dependencies</h3>
-
-<p>To use XStream in your camel routes you need to add the a dependency on <strong>camel-xstream</strong> which implements this data format. </p>
-
-<p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</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[
-&lt;dependency&gt;
-  &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-  &lt;artifactId&gt;camel-xstream&lt;/artifactId&gt;
-  &lt;version&gt;x.x.x&lt;/version&gt;
-&lt;/dependency&gt;
-]]></script>
-</div></div>
 <h2 id="BookInOnePage-CSV">CSV</h2><p>The CSV <a shape="rect" href="data-format.html">Data Format</a> uses <a shape="rect" class="external-link" href="http://commons.apache.org/proper/commons-csv/">Apache Commons CSV</a> to handle CSV payloads (Comma Separated Values) such as those exported/imported by Excel.</p><h3 id="BookInOnePage-Options.3">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>config</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>CSVConfig</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Can be used to set a custom <code>CSVConfig</code> object.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>strategy</p></td><td colspan="1" rowspan="
 1" class="confluenceTd"><p>CSVStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Can be used to set a custom <code>CSVStrategy</code>; the default is <code>CSVStrategy.DEFAULT_STRATEGY</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>autogenColumns</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not columns are auto-generated in the resulting CSV. The default value is <code>true</code>; subsequent messages use the previously created columns with new fields being added at the end of the line.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>delimiter</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> The column delimiter to use; the default value is "<code>,</code>".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenc
 eTd"><p>skipFirstLine</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether or not to skip the first line of CSV input when unmarshalling (e.g. if the content has headers on the first line); the default value is <code>false</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">lazyLoad</td><td colspan="1" rowspan="1" class="confluenceTd">boolean</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.12.2:</strong><span><span>&#160;Whether or not to </span></span><span style="line-height: 1.4285715;">Sequential access CSV input through an iterator which could avoid OOM exception when processing huge CSV file; </span><span>the default value is false </span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">useMaps</td><td colspan="1" rowspan="1" class="confluenceTd">boolean</td><td colspan="1" rowspan="1" class="confluenceTd"><str
 ong>Camel 2.13:</strong> Whether to use List&lt;Map&gt; when unmarshalling instead of List&lt;List&gt;.</td></tr></tbody></table></div><h3 id="BookInOnePage-MarshallingaMaptoCSV">Marshalling a Map to CSV</h3><p>The component allows you to marshal a Java Map (or any other message type that can be <a shape="rect" href="type-converter.html">converted</a> in a Map) into a CSV payload.</p><p>An example: if you send a message with this map...</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[
 Map&lt;String, Object&gt; body = new HashMap&lt;String, Object&gt;();
@@ -11266,7 +11237,7 @@ csvConfig.setDelimiter(&#39;;&#39;);
 </div></div><p>doesn't work. You have to set the delimiter as a String!</p>
                     </div>
     </div>
-<h3 id="BookInOnePage-Dependencies.23">Dependencies</h3><p>To use CSV in your Camel routes you need to add a dependency on <strong>camel-csv</strong>, which implements this data format.</p><p>If you use Maven you can just add the following to your pom.xml, substituting the version number for the latest and greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<h3 id="BookInOnePage-Dependencies.22">Dependencies</h3><p>To use CSV in your Camel routes you need to add a dependency on <strong>camel-csv</strong>, which implements this data format.</p><p>If you use Maven you can just add the following to your pom.xml, substituting the version number for the latest and greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</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[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-csv&lt;/artifactId&gt;
@@ -11298,7 +11269,7 @@ from(&quot;jms://queue/order&quot;).unma
 ]]></script>
 </div></div>
 
-<h3 id="BookInOnePage-Dependencies.24">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.23">Dependencies</h3>
 
 <p>This data format is provided in <strong>camel-core</strong> so no additional dependencies is needed.</p>
 <h3 id="BookInOnePage-HL7DataFormat">HL7 DataFormat</h3>
@@ -11395,7 +11366,7 @@ from(&quot;seda:people&quot;).marshal(df
 </div></div>
 <p>In the code above we marshal the data from a Object representation as a <code>List</code> of rows as <code>Maps</code>. The rows as <code>Map</code> contains the column name as the key, and the the corresponding value. This structure can be created in Java code from e.g. a processor. We marshal the data according to the Flatpack format and convert the result as a <code>String</code> object and store it on a JMS queue.</p>
 
-<h3 id="BookInOnePage-Dependencies.25">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.24">Dependencies</h3>
 
 <p>To use Flatpack in your camel routes you need to add the a dependency on <strong>camel-flatpack</strong> which implements this data format. </p>
 
@@ -11645,7 +11616,7 @@ from(&quot;activemq:queue:MY_QUEUE&quot;
 ]]></script>
 </div></div>
 
-<h3 id="BookInOnePage-Dependencies.26">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.25">Dependencies</h3>
 
 <p>This data format is provided in <strong>camel-core</strong> so no additional dependencies is needed.</p>
 <h2 id="BookInOnePage-TidyMarkup">TidyMarkup</h2>
@@ -11691,7 +11662,7 @@ from(&quot;file://site/inbox&quot;).unma
 </div></div>
 
 
-<h3 id="BookInOnePage-Dependencies.27">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.26">Dependencies</h3>
 
 <p>To use TidyMarkup in your camel routes you need to add the a dependency on <strong>camel-tagsoup</strong> which implements this data format. </p>
 
@@ -12891,7 +12862,7 @@ public class Security {
 ]]></script>
 </div></div>
 
-<h3 id="BookInOnePage-UsingtheJavaDSL.1">Using the Java DSL</h3>
+<h3 id="BookInOnePage-UsingtheJavaDSL.2">Using the Java DSL</h3>
 
 <p>The next step consists in instantiating the DataFormat <em>bindy</em> class associated with this record type and providing Java package name(s) as parameter.</p>
 
@@ -13202,7 +13173,7 @@ public class BindyComplexCsvUnmarshallTe
     </div>
 
 
-<h3 id="BookInOnePage-Dependencies.28">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.27">Dependencies</h3>
 
 <p>To use Bindy in your camel routes you need to add the a dependency on <strong>camel-bindy</strong> which implements this data format.</p>
 
@@ -13415,7 +13386,7 @@ context.addRoutes(new RouteBuilder() {
 ]]></script>
 </div></div>
 
-<h3 id="BookInOnePage-Dependencies.29">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.28">Dependencies</h3>
 
 <p>This data format is provided within the <strong>camel-xmlsecurity</strong> component.</p>
 The GZip <a shape="rect" href="data-format.html">Data Format</a> is a message compression and de-compression format. It uses the same deflate algorithm that is used in <a shape="rect" href="zip-dataformat.html">Zip DataFormat</a>, although some additional headers are provided. This format is produced by popular <code>gzip</code>/<code>gunzip</code> tool. Messages marshalled using GZip compression can be unmarshalled using GZip decompression just prior to being consumed at the endpoint. The compression capability is quite useful when you deal with large XML and Text based payloads or when you read messages previously comressed using <code>gzip</code> tool.
@@ -13442,7 +13413,7 @@ from(&quot;activemq:queue:MY_QUEUE&quot;
 ]]></script>
 </div></div>
 
-<h3 id="BookInOnePage-Dependencies.30">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.29">Dependencies</h3>
 
 <p>This data format is provided in <strong>camel-core</strong> so no additional dependencies is needed.</p>
 <h2 id="BookInOnePage-Castor">Castor</h2>
@@ -13452,7 +13423,7 @@ from(&quot;activemq:queue:MY_QUEUE&quot;
 
 <p>As usually you can use either Java DSL or Spring XML to work with Castor Data Format. </p>
 
-<h3 id="BookInOnePage-UsingtheJavaDSL.2">Using the Java DSL</h3>
+<h3 id="BookInOnePage-UsingtheJavaDSL.3">Using the Java DSL</h3>
 <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:order&quot;).
@@ -13557,7 +13528,7 @@ castor.getUnmarshaller();
 <div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> encoding </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> UTF-8 </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Encoding to use when marshalling an Object to XML </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> validation </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Boolean </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether validation is turned on or off. </p></td>
 </tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> mappingFile </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Path to a Castor mapping file to load from the classpath. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> packages </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String[] </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Add additional packages to Castor XmlContext </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> classNames </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String[] </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Add additional class names to Castor XmlContext </p></td></t
 r></tbody></table></div>
 
 
-<h3 id="BookInOnePage-Dependencies.31">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.30">Dependencies</h3>
 
 <p>To use Castor in your camel routes you need to add the a dependency on <strong>camel-castor</strong> which implements this data format. </p>
 
@@ -13684,7 +13655,7 @@ message AddressBook {
 ]]></script>
 </div></div>
 
-<h3 id="BookInOnePage-Dependencies.32">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.31">Dependencies</h3>
 
 <p>To use Protobuf in your camel routes you need to add the a dependency on <strong>camel-protobuf</strong> which implements this data format. </p>
 
@@ -13733,7 +13704,7 @@ message AddressBook {
 
 <p>If you have generated the web service stub code with cxf-codegen or a similar tool then you probably will want to use the ServiceInterfaceStrategy. In the case you have no annotated service interface you should use QNameStrategy or TypeNameStrategy.</p>
 
-<h3 id="BookInOnePage-UsingtheJavaDSL.3">Using the Java DSL</h3>
+<h3 id="BookInOnePage-UsingtheJavaDSL.4">Using the Java DSL</h3>
 
 <p>The following example uses a named DataFormat of <em>soap</em> which is configured with the package com.example.customerservice to initialize the <a shape="rect" class="external-link" href="http://java.sun.com/javase/6/docs/api/javax/xml/bind/JAXBContext.html" rel="nofollow">JAXBContext</a>. The second parameter is the ElementNameStrategy. The route is able to marshal normal objects as well as exceptions.  (Note the below just sends a SOAP Envelope to a queue. A web service provider would actually need to be listening to the queue for a SOAP call to actually occur, in which case it would be a one way SOAP request. If you need request reply then you should look at the next example.)</p>
 
@@ -13902,7 +13873,7 @@ from(&quot;jms://queue:customerServiceQu
 ]]></script>
 </div></div>
 
-<h3 id="BookInOnePage-Dependencies.33">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.32">Dependencies</h3>
 
 <p>To use the SOAP dataformat in your camel routes you need to add the following dependency to your pom.</p>
 
@@ -14178,7 +14149,7 @@ from(&quot;direct:start&quot;)
          ...     
         .marshal(pgpSignAndEncryptSeveralSignerKeys)
         ...      ]]></script>
-</div></div><h3 id="BookInOnePage-SupportofSub-KeysandKeyFlagsinPGPDataFormatMarshaler">Support of Sub-Keys and Key Flags in PGP Data Format Marshaler</h3><p>Since&#160;<strong>Camel 2.12.3.<br clear="none"></strong>An <a shape="rect" class="external-link" href="https://tools.ietf.org/html/rfc4880#section-12.1" rel="nofollow">OpenPGP V4 key</a> can have a primary key and sub-keys. The usage of the keys is indicated by the so called <a shape="rect" class="external-link" href="https://tools.ietf.org/html/rfc4880#section-5.2.3.21" rel="nofollow">Key Flags</a>. For example, you can have a primary key with two sub-keys; the primary key shall only be used for certifying other keys (Key Flag 0x01), the first sub-key&#160; shall only be used for signing (Key Flag 0x02), and the second sub-key shall only be used for encryption (Key Flag 0x04 or 0x08). The PGP Data Format marshaler takes into account these Key Flags of the primary key and sub-keys in order to determine the right key for signi
 ng and encryption. This is necessary because the primary key and its sub-keys have the same User IDs.</p><h3 id="BookInOnePage-SupportofCustomKeyAccessors">Support of Custom Key Accessors</h3><p>Since <strong>Camel 2.13.0.<br clear="none"></strong>You can implement custom key accessors for encryption/signing. The above PGPDataFormat class selects in a certain predefined way the keys which should be used for signing/encryption or verifying/decryption. If you have special requirements how your keys should be selected you should use the <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPKeyAccessDataFormat.java" rel="nofollow">PGPKeyAccessDataFormat</a> class instead and implement the interfaces <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPPublicKeyAccessor.ja
 va" rel="nofollow">PGPPublicKeyAccessor</a> and <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPSecretKeyAccessor.java" rel="nofollow">PGPSecretKeyAccessor</a> as beans. There are default implementations <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/DefaultPGPPublicKeyAccessor.java" rel="nofollow">DefaultPGPPublicKeyAccessor</a> and <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/DefaultPGPSecretKeyAccessor.java" rel="nofollow">DefaultPGPSecretKeyAccessor</a> which cache the keys, so that not every time the keyring is parsed when the processor is called.</p><p>PGPKeyAccessDataFormat has the same options as PGPDataFormat except password, keyFileName
 , encryptionKeyRing, signaturePassword, signatureKeyFileName, and signatureKeyRing.</p><h3 id="BookInOnePage-Dependencies.34">Dependencies</h3><p>To use the <a shape="rect" href="crypto.html">Crypto</a> dataformat in your camel routes you need to add the following dependency to your pom.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookInOnePage-SupportofSub-KeysandKeyFlagsinPGPDataFormatMarshaler">Support of Sub-Keys and Key Flags in PGP Data Format Marshaler</h3><p>Since&#160;<strong>Camel 2.12.3.<br clear="none"></strong>An <a shape="rect" class="external-link" href="https://tools.ietf.org/html/rfc4880#section-12.1" rel="nofollow">OpenPGP V4 key</a> can have a primary key and sub-keys. The usage of the keys is indicated by the so called <a shape="rect" class="external-link" href="https://tools.ietf.org/html/rfc4880#section-5.2.3.21" rel="nofollow">Key Flags</a>. For example, you can have a primary key with two sub-keys; the primary key shall only be used for certifying other keys (Key Flag 0x01), the first sub-key&#160; shall only be used for signing (Key Flag 0x02), and the second sub-key shall only be used for encryption (Key Flag 0x04 or 0x08). The PGP Data Format marshaler takes into account these Key Flags of the primary key and sub-keys in order to determine the right key for signi
 ng and encryption. This is necessary because the primary key and its sub-keys have the same User IDs.</p><h3 id="BookInOnePage-SupportofCustomKeyAccessors">Support of Custom Key Accessors</h3><p>Since <strong>Camel 2.13.0.<br clear="none"></strong>You can implement custom key accessors for encryption/signing. The above PGPDataFormat class selects in a certain predefined way the keys which should be used for signing/encryption or verifying/decryption. If you have special requirements how your keys should be selected you should use the <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPKeyAccessDataFormat.java" rel="nofollow">PGPKeyAccessDataFormat</a> class instead and implement the interfaces <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPPublicKeyAccessor.ja
 va" rel="nofollow">PGPPublicKeyAccessor</a> and <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPSecretKeyAccessor.java" rel="nofollow">PGPSecretKeyAccessor</a> as beans. There are default implementations <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/DefaultPGPPublicKeyAccessor.java" rel="nofollow">DefaultPGPPublicKeyAccessor</a> and <a shape="rect" class="external-link" href="https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/DefaultPGPSecretKeyAccessor.java" rel="nofollow">DefaultPGPSecretKeyAccessor</a> which cache the keys, so that not every time the keyring is parsed when the processor is called.</p><p>PGPKeyAccessDataFormat has the same options as PGPDataFormat except password, keyFileName
 , encryptionKeyRing, signaturePassword, signatureKeyFileName, and signatureKeyRing.</p><h3 id="BookInOnePage-Dependencies.33">Dependencies</h3><p>To use the <a shape="rect" href="crypto.html">Crypto</a> dataformat in your camel routes you need to add the following dependency to your pom.</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;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-crypto&lt;/artifactId&gt;
@@ -20758,7 +20729,7 @@ registry.bind(&quot;client&quot;, client
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;aws-sqs://MyQueue?amazonSQSClient=#client&amp;delay=5000&amp;maxMessagesPerPoll=5&quot;)
 .to(&quot;mock:result&quot;);
 ]]></script>
-</div></div><h3 id="BookInOnePage-Dependencies.35">Dependencies</h3><p>Maven users will need to add the following dependency to their pom.xml.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml</b></div><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookInOnePage-Dependencies.34">Dependencies</h3><p>Maven users will need to add the following dependency to their pom.xml.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-aws&lt;/artifactId&gt;
@@ -21871,11 +21842,11 @@ template.send(&quot;direct:alias-verify&
                     </div>
     </div>
 <p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1393618720810 {padding: 0px;}
-div.rbtoc1393618720810 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1393618720810 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1393949914200 {padding: 0px;}
+div.rbtoc1393949914200 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1393949914200 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1393618720810">
+/*]]>*/</style></p><div class="toc-macro rbtoc1393949914200">
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI format</a></li><li><a shape="rect" href="#CXF-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-Thedescriptionsofthedataformats">The descriptions of the dataformats</a>
@@ -23943,7 +23914,7 @@ from(&quot;seda:people&quot;).marshal(df
 </div></div>
 <p>In the code above we marshal the data from a Object representation as a <code>List</code> of rows as <code>Maps</code>. The rows as <code>Map</code> contains the column name as the key, and the the corresponding value. This structure can be created in Java code from e.g. a processor. We marshal the data according to the Flatpack format and convert the result as a <code>String</code> object and store it on a JMS queue.</p>
 
-<h3 id="BookInOnePage-Dependencies.36">Dependencies</h3>
+<h3 id="BookInOnePage-Dependencies.35">Dependencies</h3>
 
 <p>To use Flatpack in your camel routes you need to add the a dependency on <strong>camel-flatpack</strong> which implements this data format. </p>
 
@@ -26178,7 +26149,7 @@ Then you don't need to create an instanc
 </div><p>All headers are <code>String</code> types. If a header value is missing, its value is <code>null</code>.</p><h3 id="BookInOnePage-Options.42">Options</h3><p>The HL7 Data Format supports the following options:</p><div class="confluenceTableSmall">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>validate</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether the HAPI Parser should validate using the default validation rules. <strong>Camel 2.11:</strong> better use the <code>parser</code> option and initialize the parser with the desired HAPI <code>ValidationContext</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>parser</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ca.uhn.hl7v2.parser.GenericParser</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> To use a cus
 tom parser. Must be of type <code>ca.uhn.hl7v2.parser.Parser</code>. Note that <code>GenericParser</code> also allows to parse XML-encoded HL7v2 messages. </p></td></tr></tbody></table>
 
-</div><h3 id="BookInOnePage-Dependencies.37">Dependencies</h3><p>To use HL7 in your Camel routes you'll need to add a dependency on <strong>camel-hl7</strong> listed above, which implements this data format.</p><p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p><ul><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v21" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v22" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v23" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href=
 "http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v231" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v24" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v25" rel="nofollow">v2.5 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v251" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v26" rel="nofollow">v2.6 structures library</a></li></ul><p>By default <code>camel-hl7</code> only references the HAPI <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a>. Applications are responsible for including structur
 e libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div><h3 id="BookInOnePage-Dependencies.36">Dependencies</h3><p>To use HL7 in your Camel routes you'll need to add a dependency on <strong>camel-hl7</strong> listed above, which implements this data format.</p><p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p><ul><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v21" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v22" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v23" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href=
 "http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v231" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v24" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v25" rel="nofollow">v2.5 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v251" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v26" rel="nofollow">v2.6 structures library</a></li></ul><p>By default <code>camel-hl7</code> only references the HAPI <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base" rel="nofollow">base library</a>. Applications are responsible for including structur
 e libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</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;dependency&gt;
     &lt;groupId&gt;ca.uhn.hapi&lt;/groupId&gt;
     &lt;artifactId&gt;hapi-structures-v24&lt;/artifactId&gt;
@@ -29242,13 +29213,13 @@ monitor.start();
    &lt;property name=&quot;entityManagerFactory&quot; ref=&quot;myEMFactory&quot;/&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div><p>In <strong>Camel 2.3</strong> the <code>JpaComponent</code> will auto lookup the <code>EntityManagerFactory</code> from the <a shape="rect" href="registry.html">Registry</a> which means you do not need to configure this on the <code>JpaComponent</code> as shown above. You only need to do so if there is ambiguity, in which case Camel will log a WARN.</p><h3 id="BookInOnePage-ConfiguringTransactionManager">Configuring TransactionManager</h3><p>Its strongly advised to configure the <code>TransactionManager</code> instance used by the JPA component. If failed to do so each <code>JpaEndpoint</code> will auto create their own instance of <code>TransactionManager</code> which most often is not what you want.</p><p>For example, you can instantiate a JPA component that references the <code>myTransactionManager</code> transaction manager, as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>In <strong>Camel 2.3</strong> the <code>JpaComponent</code> will auto lookup the <code>EntityManagerFactory</code> from the <a shape="rect" href="registry.html">Registry</a> which means you do not need to configure this on the <code>JpaComponent</code> as shown above. You only need to do so if there is ambiguity, in which case Camel will log a WARN.</p><h3 id="BookInOnePage-ConfiguringTransactionManager">Configuring TransactionManager</h3><p>Since <strong>Camel 2.3</strong> the <code>JpaComponent</code> will auto lookup the <code>TransactionManager</code> from the <a shape="rect" href="registry.html">Registry.</a> If Camel won't find any <code>TransactionManager</code> instance registered, it will also look up for the&#160;<code>TransactionTemplate</code> and try to extract&#160;<code>TransactionManager</code> from it.</p><p>If none <code>TransactionTemplate</code> is available in the registry, <code>JpaEndpoint</code> will auto create their own instance of <code>Tran
 sactionManager</code> which most often is not what you want.</p><p>If more than single instance of the <code>TransactionManager</code> is found, Camel will log a WARN. In such cases you might want to instantiate and explicitly configure a JPA component that references the <code>myTransactionManager</code> transaction manager, as follows:</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;jpa&quot; class=&quot;org.apache.camel.component.jpa.JpaComponent&quot;&gt;
    &lt;property name=&quot;entityManagerFactory&quot; ref=&quot;myEMFactory&quot;/&gt;
    &lt;property name=&quot;transactionManager&quot; ref=&quot;myTransactionManager&quot;/&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div><p>In <strong>Camel 2.3</strong> the <code>JpaComponent</code> will auto lookup the <code>TransactionManager</code> from the <a shape="rect" href="registry.html">Registry</a> which means you do not need to configure this on the <code>JpaComponent</code> as shown above. You only need to do so if there is ambiguity, in which case Camel will log a WARN.</p><h3 id="BookInOnePage-Usingaconsumerwithanamedquery">Using a consumer with a named query</h3><p>For consuming only selected entities, you can use the <code>consumer.namedQuery</code> URI query option. First, you have to define the named query in the JPA Entity class:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookInOnePage-Usingaconsumerwithanamedquery">Using a consumer with a named query</h3><p>For consuming only selected entities, you can use the <code>consumer.namedQuery</code> URI query option. First, you have to define the named query in the JPA Entity class:</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[@Entity
 @NamedQuery(name = &quot;step1&quot;, query = &quot;select x from MultiSteps x where x.step = 1&quot;)
 public class MultiSteps {
@@ -29308,7 +29279,7 @@ public class MultiSteps {
     &lt;route id=&quot;JpaMessageIdRepositoryTest&quot;&gt;
         &lt;from uri=&quot;direct:start&quot; /&gt;
         &lt;idempotentConsumer messageIdRepositoryRef=&quot;jpaStore&quot;&gt;
-            &lt;header&gt;messageId&lt;/camel:header&gt;
+            &lt;header&gt;messageId&lt;/header&gt;
             &lt;to uri=&quot;mock:result&quot; /&gt;
         &lt;/idempotentConsumer&gt;
     &lt;/route&gt;
@@ -35526,147 +35497,61 @@ protected RouteBuilder createRouteBuilde
 
 <h3 id="BookInOnePage-SeeAlso.82">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul>
-<h2 id="BookInOnePage-SQLComponent">SQL Component</h2>
-
-<p>The <strong>sql:</strong> component allows you to work with databases using JDBC queries. The difference between this component and <a shape="rect" href="jdbc.html">JDBC</a> component is that in case of SQL the query is a property of the endpoint and it uses message payload as parameters passed to the query.</p>
-
-<p>This component uses <code><strong>spring-jdbc</strong></code> behind the scenes for the actual SQL handling.</p>
-
-<p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</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;dependency&gt;
+<h2 id="BookInOnePage-SQLComponent">SQL Component</h2><p>The <strong>sql:</strong> component allows you to work with databases using JDBC queries. The difference between this component and <a shape="rect" href="jdbc.html">JDBC</a> component is that in case of SQL the query is a property of the endpoint and it uses message payload as parameters passed to the query.</p><p>This component uses <code><strong>spring-jdbc</strong></code> behind the scenes for the actual SQL handling.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</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;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-sql&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-<p>The SQL component also supports:</p>
-<ul class="alternate"><li>a JDBC based repository for the <a shape="rect" href="idempotent-consumer.html">Idempotent Consumer</a> EIP pattern. See further below.</li><li>a JDBC based repository for the <a shape="rect" href="aggregator2.html">Aggregator</a> EIP pattern. See further below.</li></ul>
-
-
-<h3 id="BookInOnePage-URIformat.70">URI format</h3>
-
-    <div class="aui-message problem shadowed information-macro">
+</div></div><p>The SQL component also supports:</p><ul class="alternate"><li>a JDBC based repository for the <a shape="rect" href="idempotent-consumer.html">Idempotent Consumer</a> EIP pattern. See further below.</li><li>a JDBC based repository for the <a shape="rect" href="aggregator2.html">Aggregator</a> EIP pattern. See further below.</li></ul><h3 id="BookInOnePage-URIformat.70">URI format</h3>    <div class="aui-message problem shadowed information-macro">
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
-                            
-<p>In Camel 2.10 or older the SQL component can only be used as producer.<br clear="none">
-From Camel 2.11 onwards this component can also be a consumer, eg <code>from()</code>.</p>
+                            <p>In Camel 2.10 or older the SQL component can only be used as producer.<br clear="none"> From Camel 2.11 onwards this component can also be a consumer, eg <code>from()</code>.</p>
                     </div>
     </div>
-
-
     <div class="aui-message hint shadowed information-macro">
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
-                            
-<p>This component can be used as a <a shape="rect" class="external-link" href="http://camel.apache.org/transactional-client.html">Transactional Client</a>.</p>
+                            <p>This component can be used as a <a shape="rect" class="external-link" href="http://camel.apache.org/transactional-client.html">Transactional Client</a>.</p>
                     </div>
     </div>
-
-
-<p>The SQL component uses the following endpoint URI notation:</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[
-sql:select * from table where id=# order by name[?options]
+<p>The SQL component uses the following endpoint URI notation:</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[sql:select * from table where id=# order by name[?options]
 ]]></script>
-</div></div>
-
-<p>From Camel 2.11 onwards you can use named parameters by using <code>#:name</code> style as shown:</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[
-sql:select * from table where id=:#myId order by name[?options]
+</div></div><p>From Camel 2.11 onwards you can use named parameters by using <code>#:name</code> style as shown:</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[sql:select * from table where id=:#myId order by name[?options]
 ]]></script>
-</div></div>
-
-<p>When using named parameters, Camel will lookup the names from, in the given precedence:<br clear="none">
-1. from message body if its a <code>java.util.Map</code><br clear="none">
-2. from message headers</p>
-
-<p>If a named parameter cannot be resolved, then an exception is thrown.</p>
-
-<p>Notice that the standard <code>?</code> symbol that denotes the parameters to an SQL query is substituted with the <code>#</code> symbol, because the <code>?</code> symbol is used to specify options for the endpoint. The <code>?</code> symbol replacement can be configured on endpoint basis.</p>
-
-<p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p>
-
-<h3 id="BookInOnePage-Options.75">Options</h3>
-
-<div class="confluenceTableSmall">
+</div></div><p>When using named parameters, Camel will lookup the names from, in the given precedence:<br clear="none"> 1. from message body if its a <code>java.util.Map</code><br clear="none"> 2. from message headers</p><p>If a named parameter cannot be resolved, then an exception is thrown.</p><p>Notice that the standard <code>?</code> symbol that denotes the parameters to an SQL query is substituted with the <code>#</code> symbol, because the <code>?</code> symbol is used to specify options for the endpoint. The <code>?</code> symbol replacement can be configured on endpoint basis.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 id="BookInOnePage-Options.75">Options</h3><div class="confluenceTableSmall">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>batch</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.7.5, 2.8.4 and 2.9:</strong> Execute SQL batch update statements. See notes below on how the treatment of the inbound message body changes if this is set to <code>true</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>dataSourceRef</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</co
 de> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Deprecated and will be removed in Camel 3.0:</strong> Reference to a <code>DataSource</code> to look up in the registry. Use <code>dataSource=#theName</code> instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>dataSource</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Reference to a <code>DataSource</code> to look up in the registry. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>placeholder</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>#</code> </p></
 td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.4:</strong> Specifies a character that will be replaced to <code>?</code> in SQL query. Notice, that it is simple <code>String.replaceAll()</code> operation and no SQL parsing is involved (quoted strings will also change). This replacement is <strong>only</strong> happening if the endpoint is created using the <code>SqlComponent</code>. If you manually create the endpoint, then use the expected <code>?</code> sign instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>template.&lt;xxx&gt;</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sets additional options on the Spring <code>JdbcTemplate</code> that is used behind the scenes to execute the queries. For instance, <code>template.maxRows=10</code>. For detailed docu
 mentation, see the <a shape="rect" class="external-link" href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jdbc/core/JdbcTemplate.html" rel="nofollow">JdbcTemplate javadoc</a> documentation. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>allowNamedParameters</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Whether to allow using named parameters in the queries. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>processingStrategy</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</str
 ong> Allows to plugin to use a custom <code>org.apache.camel.component.sql.SqlProcessingStrategy</code> to execute queries when the consumer has processed the rows/batch. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>prepareStatementStrategy</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Allows to plugin to use a custom <code>org.apache.camel.component.sql.SqlPrepareStatementStrategy</code> to control preparation of the query and prepared statement. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.delay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>long</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>500</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong
 >Camel 2.11:</strong> <strong>SQL consumer only:</strong> Delay in milliseconds between each poll. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.initialDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>long</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>1000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> Milliseconds before polling starts. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.useFixedDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> Set to <code>true</code> to use fixed delay between polls, otherwise fi
 xed rate is used. See <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow">ScheduledExecutorService</a> in JDK for details. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>maxMessagesPerPoll</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>int</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> An integer value to define the maximum number of messages to gather per poll. By default, no maximum is set. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.useIterator</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td
  colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> If <code>true</code> each row returned when polling will be processed individually. If <code>false</code> the entire <code>java.util.List</code> of data is set as the IN body. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.routeEmptyResultSet</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> Whether to route a single empty <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> if there was no data to poll. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.onConsume</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>St
 ring</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> was processed successfully, for example to mark the row as processed. The query can have parameter. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.onConsumeFailed</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> failed, for ex
 ample to  mark the row as failed. The query can have parameter. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.onConsumeBatchComplete</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> After processing the entire batch, this query can be executed to bulk update rows etc. The query cannot have parameters. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.expectedUpdateCount</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>int</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-1</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> If using <
 code>consumer.onConsume</code> then this option can be used to set an expected number of rows being updated. Typically you may set this to <code>1</code> to expect one row to be updated. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.breakBatchOnConsumeFail</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL consumer only:</strong> If using <code>consumer.onConsume</code> and it fails, then this option controls whether to break out of the batch or continue processing the next row from the batch. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>alwaysPopulateStatement</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="
 confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> <strong>SQL producer only:</strong> If enabled then the <code>populateStatement</code> method from <code>org.apache.camel.component.sql.SqlPrepareStatementStrategy</code> is always invoked, also if there is no expected parameters to be prepared. When this is <code>false</code> then the <code>populateStatement</code> is only invoked if there is 1 or more expected parameters to be set; for example this avoids reading the message body/headers for SQL queries with no parameters. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>separator</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>char</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>,</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11.1:</strong> The separator to use when parameter values is
  taken from message body (if the body is a String type), to be inserted at # placeholders. Notice if you use named parameters, then a <code>Map</code> type is used instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>outputType</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>SelectList</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.12.0:</strong> Make the output of consumer or producer to <code>SelectList</code> as List of Map, or <code>SelectOne</code> as single Java object in the following way:<br clear="none">
 a) If the query has only single column, then that JDBC Column object is returned. (such as <code>SELECT COUNT( * ) FROM PROJECT</code> will return a Long object.<br clear="none">
 b) If the query has more than one column, then it will return a Map of that result.<br clear="none">
 c) If the <code>outputClass</code> is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with.<br clear="none">
 d) If the query resulted in more than one rows, it throws an non-unique result exception.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>outputClass</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.12.0:</strong> Specify the full package and class name to use as conversion when <code>outputType=SelectOne</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>parametersCount</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>int</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11.2/2.12.0</strong> If set greater than zero, then Camel will use this count value of parameters to replace instead of qu
 erying via JDBC metadata API. This is useful if the JDBC vendor could not return correct parameters count, then user may override instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>noop</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.12.0</strong> If set, will ignore the results of the SQL query and use the existing IN message as the OUT message for the continuation of processing </p></td></tr></tbody></table>
-</div>
-
-<h3 id="BookInOnePage-Treatmentofthemessagebody">Treatment of the message body</h3>
-
-<p>The SQL component tries to convert the message body to an object of <code>java.util.Iterator</code> type and then uses this iterator to fill the query parameters (where each query parameter is represented by a <code>#</code> symbol (or configured placeholder) in the endpoint URI). If the message body is not an array or collection, the conversion results in an iterator that iterates over only one object, which is the body itself.</p>
-
-<p>For example, if the message body is an instance of <code>java.util.List</code>, the first item in the list is substituted into the first occurrence of <code>#</code> in the SQL query, the second item in the list is substituted into the second occurrence of <code>#</code>, and so on.</p>
-
-<p>If <code>batch</code> is set to <code>true</code>, then the interpretation of the inbound message body changes slightly &#8211; instead of an iterator of parameters, the component expects an iterator that contains the parameter iterators; the size of the outer iterator determines the batch size.</p>
-
-<h3 id="BookInOnePage-Resultofthequery">Result of the query</h3>
-
-<p>For <code>select</code> operations, the result is an instance of <code>List&lt;Map&lt;String, Object&gt;&gt;</code> type, as returned by the <a shape="rect" class="external-link" href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jdbc/core/JdbcTemplate.html#queryForList(java.lang.String,%20java.lang.Object%91%93)" rel="nofollow">JdbcTemplate.queryForList()</a> method. For <code>update</code> operations, the result is the number of updated rows, returned as an <code>Integer</code>.</p>
-
-<h3 id="BookInOnePage-Headervalues">Header values</h3>
-
-<p>When performing <code>update</code> operations, the SQL Component stores the update count in the following message headers:</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelSqlUpdateCount</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of rows updated for <code>update</code> operations, returned as an <code>Integer</code> object. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelSqlRowCount</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of rows returned for <code>select</code> operations, returned as an <code>Integer</code> object. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelSqlQuery</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Query to execute. This query takes precedence over the query spec
 ified in the endpoint URI. Note that query parameters in the header <em>are</em> represented by a <code>?</code> instead of a <code>#</code> symbol </p></td></tr></tbody></table></div>
-
-
-<h3 id="BookInOnePage-Configuration.1">Configuration</h3>
-
-<p>You can now set a reference to a <code>DataSource</code> in the URI directly:</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[
-sql:select * from table where id=# order by name?dataSource=myDS
+</div><h3 id="BookInOnePage-Treatmentofthemessagebody">Treatment of the message body</h3><p>The SQL component tries to convert the message body to an object of <code>java.util.Iterator</code> type and then uses this iterator to fill the query parameters (where each query parameter is represented by a <code>#</code> symbol (or configured placeholder) in the endpoint URI). If the message body is not an array or collection, the conversion results in an iterator that iterates over only one object, which is the body itself.</p><p>For example, if the message body is an instance of <code>java.util.List</code>, the first item in the list is substituted into the first occurrence of <code>#</code> in the SQL query, the second item in the list is substituted into the second occurrence of <code>#</code>, and so on.</p><p>If <code>batch</code> is set to <code>true</code>, then the interpretation of the inbound message body changes slightly &#8211; instead of an iterator of parameters, the compon
 ent expects an iterator that contains the parameter iterators; the size of the outer iterator determines the batch size.</p><h3 id="BookInOnePage-Resultofthequery">Result of the query</h3><p>For <code>select</code> operations, the result is an instance of <code>List&lt;Map&lt;String, Object&gt;&gt;</code> type, as returned by the <a shape="rect" class="external-link" href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jdbc/core/JdbcTemplate.html#queryForList(java.lang.String,%20java.lang.Object%91%93)" rel="nofollow">JdbcTemplate.queryForList()</a> method. For <code>update</code> operations, the result is the number of updated rows, returned as an <code>Integer</code>.</p><h3 id="BookInOnePage-Headervalues">Header values</h3><p>When performing <code>update</code> operations, the SQL Component stores the update count in the following message headers:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="c
 onfluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelSqlUpdateCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of rows updated for <code>update</code> operations, returned as an <code>Integer</code> object.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelSqlRowCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of rows returned for <code>select</code> operations, returned as an <code>Integer</code> object.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelSqlQuery</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Query to execute. This query takes precedence over the query specified in the endpoint URI. Note that query parameters in the header <em>are</em> represented by a <code>?</code> inst
 ead of a <code>#</code> symbol</p></td></tr></tbody></table></div><h3 id="BookInOnePage-Configuration.1">Configuration</h3><p>You can now set a reference to a <code>DataSource</code> in the URI directly:</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[sql:select * from table where id=# order by name?dataSource=myDS
 ]]></script>
-</div></div>
-
-<h3 id="BookInOnePage-Sample.4">Sample</h3>
-
-<p>In the sample below we execute a query and retrieve the result as a <code>List</code> of rows, where each row is a <code>Map&lt;String, Object</code> and the key is the column name.</p>
-
-<p>First, we set up a table to use for our sample. As this is based on an unit test, we do it in java:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookInOnePage-Sample.4">Sample</h3><p>In the sample below we execute a query and retrieve the result as a <code>List</code> of rows, where each row is a <code>Map&lt;String, Object</code> and the key is the column name.</p><p>First, we set up a table to use for our sample. As this is based on an unit test, we do it in java:</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[
 // this is the database we create with some initial data for our unit test
 db = new EmbeddedDatabaseBuilder()
     .setType(EmbeddedDatabaseType.DERBY).addScript(&quot;sql/createAndPopulateDatabase.sql&quot;).build();
 ]]></script>
-</div></div>
-
-<p>The SQL script <code>createAndPopulateDatabase.sql</code> we execute looks like as described below:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The SQL script <code>createAndPopulateDatabase.sql</code> we execute looks like as described below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: sql; gutter: false" type="syntaxhighlighter"><![CDATA[
 create table projects (id integer primary key, project varchar(10), license varchar(5));
 insert into projects values (1, &#39;Camel&#39;, &#39;ASF&#39;);
 insert into projects values (2, &#39;AMQ&#39;, &#39;ASF&#39;);
 insert into projects values (3, &#39;Linux&#39;, &#39;XXX&#39;);
 ]]></script>
-</div></div>
-
-<p>Then we configure our route and our <code>sql</code> component. Notice that we use a <code>direct</code> endpoint in front of the <code>sql</code> endpoint. This allows us to send an exchange to the <code>direct</code> endpoint with the URI, <code>direct:simple</code>, which is much easier for the client to use than the long <code>sql:</code> URI. Note that the <code>DataSource</code> is looked up up in the registry, so we can use standard Spring XML to configure our <code>DataSource</code>.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Then we configure our route and our <code>sql</code> component. Notice that we use a <code>direct</code> endpoint in front of the <code>sql</code> endpoint. This allows us to send an exchange to the <code>direct</code> endpoint with the URI, <code>direct:simple</code>, which is much easier for the client to use than the long <code>sql:</code> URI. Note that the <code>DataSource</code> is looked up up in the registry, so we can use standard Spring XML to configure our <code>DataSource</code>.</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:simple&quot;)
     .to(&quot;sql:select * from projects where license = # order by id?dataSourceRef=jdbc/myDataSource&quot;)
     .to(&quot;mock:result&quot;);
 ]]></script>
-</div></div>
-
-<p>And then we fire the message into the <code>direct</code> endpoint that will route it to our <code>sql</code> component that queries the database.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And then we fire the message into the <code>direct</code> endpoint that will route it to our <code>sql</code> component that queries the database.</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[
 MockEndpoint mock = getMockEndpoint(&quot;mock:result&quot;);
 mock.expectedMessageCount(1);
@@ -35688,85 +35573,44 @@ Map&lt;?, ?&gt; row = assertIsInstanceOf
 // and we should be able the get the project from the map that should be Linux
 assertEquals(&quot;Linux&quot;, row.get(&quot;PROJECT&quot;));
 ]]></script>
-</div></div>
-
-<p>We could configure the <code>DataSource</code> in Spring XML as follows:</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;jee:jndi-lookup id=&quot;myDS&quot; jndi-name=&quot;jdbc/myDataSource&quot;/&gt;
+</div></div><p>We could configure the <code>DataSource</code> in Spring XML as follows:</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;jee:jndi-lookup id=&quot;myDS&quot; jndi-name=&quot;jdbc/myDataSource&quot;/&gt;
 ]]></script>
-</div></div>
-
-<h4 id="BookInOnePage-Usingnamedparameters.1">Using named parameters</h4>
-
-<p><strong>Available as of Camel 2.11</strong></p>
-
-<p>In the given route below, we want to get all the projects from the projects table. Notice the SQL query has 2 named parameters, :#lic and :#min.<br clear="none">
-Camel will then lookup for these parameters from the message body or message headers. Notice in the example above we set two headers with constant value<br clear="none">
-for the named parameters:</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:projects&quot;)
+</div></div><h4 id="BookInOnePage-Usingnamedparameters.1">Using named parameters</h4><p><strong>Available as of Camel 2.11</strong></p><p>In the given route below, we want to get all the projects from the projects table. Notice the SQL query has 2 named parameters, :#lic and :#min.<br clear="none"> Camel will then lookup for these parameters from the message body or message headers. Notice in the example above we set two headers with constant value<br clear="none"> for the named parameters:</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:projects&quot;)
      .setHeader(&quot;lic&quot;, constant(&quot;ASF&quot;))
      .setHeader(&quot;min&quot;, constant(123))
      .to(&quot;sql:select * from projects where license = :#lic and id &gt; :#min order by id&quot;)
 ]]></script>
-</div></div>
-
-<p>Though if the message body is a <code>java.util.Map</code> then the named parameters will be taken from the body.</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:projects&quot;)
+</div></div><p>Though if the message body is a <code>java.util.Map</code> then the named parameters will be taken from the body.</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:projects&quot;)
      .to(&quot;sql:select * from projects where license = :#lic and id &gt; :#min order by id&quot;)
 ]]></script>
-</div></div>
-
-<h3 id="BookInOnePage-UsingtheJDBCbasedidempotentrepository">Using the JDBC based idempotent repository</h3>
-
-<p><strong>Available as of Camel 2.7</strong>: In this section we will use the JDBC based idempotent repository.</p>
-
-    <div class="aui-message success shadowed information-macro">
+</div></div><h3 id="BookInOnePage-UsingtheJDBCbasedidempotentrepository">Using the JDBC based idempotent repository</h3><p><strong>Available as of Camel 2.7</strong>: In this section we will use the JDBC based idempotent repository.</p>    <div class="aui-message success shadowed information-macro">
                     <p class="title">Abstract class</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>From Camel 2.9 onwards there is an abstract class <code>org.apache.camel.processor.idempotent.jdbc.AbstractJdbcMessageIdRepository</code> you can extend to build custom JDBC idempotent repository.</p>
+                            <p>From Camel 2.9 onwards there is an abstract class <code>org.apache.camel.processor.idempotent.jdbc.AbstractJdbcMessageIdRepository</code> you can extend to build custom JDBC idempotent repository.</p>
                     </div>
     </div>
-
-
-<p>First we have to create the database table which will be used by the idempotent repository. For <strong>Camel 2.7</strong>, we use the following schema:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: sql; gutter: false" type="syntaxhighlighter"><![CDATA[
-CREATE TABLE CAMEL_MESSAGEPROCESSED (
+<p>First we have to create the database table which will be used by the idempotent repository. For <strong>Camel 2.7</strong>, we use the following schema:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: sql; gutter: false" type="syntaxhighlighter"><![CDATA[CREATE TABLE CAMEL_MESSAGEPROCESSED (
   processorName VARCHAR(255),
   messageId VARCHAR(100)
 )
 ]]></script>
-</div></div>
-
-<p>In <strong>Camel 2.8</strong>, we added the createdAt column:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: sql; gutter: false" type="syntaxhighlighter"><![CDATA[
-CREATE TABLE CAMEL_MESSAGEPROCESSED (
+</div></div><p>In <strong>Camel 2.8</strong>, we added the createdAt column:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: sql; gutter: false" type="syntaxhighlighter"><![CDATA[CREATE TABLE CAMEL_MESSAGEPROCESSED (
   processorName VARCHAR(255),
   messageId VARCHAR(100),
   createdAt TIMESTAMP
 )
 ]]></script>
-</div></div>
-
-<p>We recommend to have a unique constraint on the columns processorName and messageId. Because the syntax for this constraint differs for database to database, we do not show it here.</p>
-
-<p>Second we need to setup a <code>javax.sql.DataSource</code> in the spring XML file:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>We recommend to have a unique constraint on the columns processorName and messageId. Because the syntax for this constraint differs for database to database, we do not show it here.</p><p>Second we need to setup a <code>javax.sql.DataSource</code> 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;jdbc:embedded-database id=&quot;dataSource&quot; type=&quot;DERBY&quot; /&gt;
 ]]></script>
-</div></div>
-
-<p>And finally we can create our JDBC idempotent repository in the spring XML file as well:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And finally we can create our JDBC idempotent repository in the spring XML file as well:</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;messageIdRepository&quot; class=&quot;org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository&quot;&gt;
 	&lt;constructor-arg ref=&quot;dataSource&quot; /&gt;
@@ -35787,16 +35631,7 @@ CREATE TABLE CAMEL_MESSAGEPROCESSED (
 	&lt;/camel:route&gt;
 &lt;/camel:camelContext&gt;
 ]]></script>
-</div></div>
-
-<h4 id="BookInOnePage-CustomizetheJdbcMessageIdRepository">Customize the JdbcMessageIdRepository</h4>
-
-<p>Starting with <strong>Camel 2.9.1</strong> you have a few options to tune the <code>org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository</code> for your needs:</p>

[... 182 lines stripped ...]
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.