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 2013/08/11 02:18:54 UTC

svn commit: r874067 [2/2] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache quartz2.html sql-component.html

Added: websites/production/camel/content/quartz2.html
==============================================================================
--- websites/production/camel/content/quartz2.html (added)
+++ websites/production/camel/content/quartz2.html Sun Aug 11 00:18:53 2013
@@ -0,0 +1,335 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+    <link href="http://camel.apache.org/styles/site.css" rel="stylesheet" type="text/css">
+    <link href="http://camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css">
+    <script src="http://camel.apache.org/styles/prototype.js" type="text/javascript"></script>
+    <script src="http://camel.apache.org/styles/rico.js" type="text/javascript"></script>    
+    <script src="http://camel.apache.org/styles/site.js" type="text/javascript"></script>
+
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
+
+  <link href='http://camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
+  <link href='http://camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
+    <title>
+    Apache Camel: Quartz2
+    </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
+          <!-- Banner -->
+<div id="banner-content"><div id="asf_logo">
+	<div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
+            <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a>
+            <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a>
+	</div>
+        </div></div>
+          <!-- Banner -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
+                <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="components.html">Components</a>&nbsp;&gt;&nbsp;<a href="quartz.html">Quartz</a>&nbsp;&gt;&nbsp;<a href="quartz2.html">Quartz2</a>
+          </div>
+          <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html" title="Download">Download</a> | <a shape="rect" href="javadoc.html" title="JavaDoc">JavaDoc</a> | <a shape="rect" href="source.html" title="Source">Source</a> | <a shape="rect" href="discussion-forums.html" title="Discussion Forums">Forums</a> | <a shape="rect" href="support.html" title="Support">Support</a></p></div>
+          <!-- Quicklinks -->
+        </div>
+
+	<table border="0">
+	<tbody>
+        <tr>
+        <td valign="top" width="100%">
+<div class="wiki-content maincontent"><h2><a shape="rect" name="Quartz2-Quartz2Component"></a>Quartz2 Component</h2>
+
+<p>The <b>quartz2:</b> component provides a scheduled delivery of messages using the <a shape="rect" class="external-link" href="http://www.quartz-scheduler.org/" rel="nofollow">Quartz Scheduler 2.x </a>. <br clear="none">
+Each endpoint represents a different timer (in Quartz terms, a Trigger and JobDetail).</p>
+
+<p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<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-quartz2&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><a shape="rect" name="Quartz2-URIformat"></a>URI format</h3>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+quartz2://timerName?options
+quartz2://groupName/timerName?options
+quartz2://groupName/timerName?cron=expression
+quartz2://timerName?cron=expression
+]]></script>
+</div></div>
+
+<p>The component uses either a <tt>CronTrigger</tt> or a <tt>SimpleTrigger</tt>. If no cron expression is provided, the component uses a simple trigger. If no <tt>groupName</tt> is provided, the quartz component uses the <tt>Camel</tt> group name.</p>
+
+<p>You can append query options to the URI in the following format, <tt>?option=value&amp;option=value&amp;...</tt></p>
+
+<h3><a shape="rect" name="Quartz2-Options"></a>Options</h3>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>cron</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <em>None</em> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies a <tt>cron</tt> expression (not compatible with the <tt>trigger.*</tt> or <tt>job.*</tt> options). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>trigger.repeatCount</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> SimpleTrigger: How many times should the timer repeat? </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>trigger.repeatInterval</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" ro
 wspan="1" class="confluenceTd"> SimpleTrigger: The amount of time in milliseconds between repeated triggers. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>job.name</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sets the job name. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>job.<em>XXX</em></tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sets the job option with the <tt><em>XXX</em></tt> setter name. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>trigger.<em>XXX</em></tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sets the trigger option with the <tt><em>XXX</em></tt> setter name. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>stateful</tt> </td><td colspan=
 "1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Uses a Quartz <tt>StatefulJob</tt> instead of the default job. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>fireNow</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> New to Camel 2.2.0, if it is true will fire the trigger when the route is start when using SimpleTrigger.</td></tr></tbody></table>
+</div>
+</div>
+
+<p>For example, the following routing rule will fire two timer events to the <tt>mock:results</tt> endpoint:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("quartz://myGroup/myTimerName?trigger.repeatInterval=2&amp;trigger.repeatCount=1").routeId("myRoute").to("mock:result");
+]]></script>
+</div></div>
+
+<p>When using a <a shape="rect" class="external-link" href="http://quartz-scheduler.org/api/2.0.0/org/quartz/StatefulJob.html" rel="nofollow">StatefulJob</a>, the <a shape="rect" class="external-link" href="http://quartz-scheduler.org/api/2.0.0/org/quartz/JobDataMap.html" rel="nofollow">JobDataMap</a> is re-persisted after every execution of the job, thus preserving state for the next execution.</p>
+
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Running in OSGi and having multiple bundles with quartz routes</b><br clear="none">If you run in OSGi such as Apache ServiceMix, or Apache Karaf, and have multiple bundles with Camel routes that start from <a shape="rect" href="quartz.html" title="Quartz">Quartz</a> endpoints, then make sure if you assign<br clear="none">
+an <tt>id</tt> to the &lt;camelContext&gt; that this id is unique, as this is required by the <tt>QuartzScheduler</tt> in the OSGi container. If you do not set any <tt>id</tt> on &lt;camelContext&gt; then<br clear="none">
+a unique id is auto assigned, and there is no problem.</td></tr></table></div>
+
+<h3><a shape="rect" name="Quartz2-Configuringquartz.propertiesfile"></a>Configuring quartz.properties file</h3>
+
+<p>By default Quartz will look for a <tt>quartz.properties</tt> file in the <tt>org/quartz</tt> directory of the classpath. If you are using WAR deployments this means just drop the quartz.properties in <tt>WEB-INF/classes/org/quartz</tt>.</p>
+
+<p>However the Camel <a shape="rect" href="quartz.html" title="Quartz">Quartz</a> component also allows you to configure properties:</p>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>properties</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>Properties</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4</b>: You can configure a <tt>java.util.Properties</tt> instance. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>propertiesFile</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4</b>: File name of the properties to load from th
 e classpath </td></tr></tbody></table>
+</div>
+</div>
+
+<p>To do this you can configure this in Spring XML as follows</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;bean id="quartz" class="org.apache.camel.component.quartz.QuartzComponent"&gt;
+    &lt;property name="propertiesFile" value="com/mycompany/myquartz.properties"/&gt;
+&lt;/bean&gt;
+]]></script>
+</div></div>
+
+
+<h3><a shape="rect" name="Quartz2-StartingtheQuartzscheduler"></a>Starting the Quartz scheduler</h3>
+<p><b>Available as of Camel 2.4</b></p>
+
+<p>The <a shape="rect" href="quartz.html" title="Quartz">Quartz</a> component offers an option to let the Quartz scheduler be started delayed, or not auto started at all.</p>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startDelayedSeconds</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4</b>: Seconds to wait before starting the quartz scheduler. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>autoStartScheduler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Whether or not the scheduler should be auto s
 tarted. </td></tr></tbody></table>
+</div>
+</div>
+
+<p>To do this you can configure this in Spring XML as follows</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;bean id="quartz" class="org.apache.camel.component.quartz.QuartzComponent"&gt;
+    &lt;property name="startDelayedSeconds" value="5"/&gt;
+&lt;/bean&gt;
+]]></script>
+</div></div>
+
+
+<h3><a shape="rect" name="Quartz2-Clustering"></a>Clustering</h3>
+<p><b>Available as of Camel 2.4</b></p>
+
+<p>If you use Quartz in clustered mode, e.g. the <tt>JobStore</tt> is clustered. Then from Camel 2.4 onwards the <a shape="rect" href="quartz.html" title="Quartz">Quartz</a> component will <b>not</b> pause/remove triggers when a node is being stopped/shutdown. This allows the trigger to keep running on the other nodes in the cluster.</p>
+
+<p><b>Note</b>: When running in clustered node no checking is done to ensure unique job name/group for endpoints. </p>
+
+
+<h3><a shape="rect" name="Quartz2-MessageHeaders"></a>Message Headers</h3>
+<p>Camel adds the getters from the Quartz Execution Context as header values. The following headers are added:<br clear="none">
+<tt>calendar</tt>, <tt>fireTime</tt>, <tt>jobDetail</tt>, <tt>jobInstance</tt>, <tt>jobRuntTime</tt>, <tt>mergedJobDataMap</tt>, <tt>nextFireTime</tt>, <tt>previousFireTime</tt>, <tt>refireCount</tt>, <tt>result</tt>, <tt>scheduledFireTime</tt>, <tt>scheduler</tt>, <tt>trigger</tt>, <tt>triggerName</tt>, <tt>triggerGroup</tt>.</p>
+
+<p>The <tt>fireTime</tt> header contains the <tt>java.util.Date</tt> of when the exchange was fired.</p>
+
+<h3><a shape="rect" name="Quartz2-UsingCronTriggers"></a>Using Cron Triggers</h3>
+<p>Quartz supports <a shape="rect" class="external-link" href="http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger" rel="nofollow">Cron-like expressions</a> for specifying timers in a handy format. You can use these expressions in the <tt>cron</tt> URI parameter; though to preserve valid URI encoding we allow + to be used instead of spaces. Quartz provides a <a shape="rect" class="external-link" href="http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html" rel="nofollow">little tutorial</a> on how to use cron expressions.</p>
+
+<p>For example, the following will fire a message every five minutes starting at 12pm (noon) to 6pm on weekdays:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("quartz2://myGroup/myTimerName?cron=0+0/5+12-18+?+*+MON-FRI").to("activemq:Totally.Rocks");
+]]></script>
+</div></div>
+
+<p>which is equivalent to using the cron expression</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+0 0/5 12-18 ? * MON-FRI
+]]></script>
+</div></div>
+
+<p>The following table shows the URI character encodings we use to preserve valid URI syntax:</p>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">URI Character</th><th colspan="1" rowspan="1" class="confluenceTh">Cron character</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>+</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <em>Space</em> </td></tr></tbody></table>
+</div>
+</div>
+
+<h3><a shape="rect" name="Quartz2-Specifyingtimezone"></a>Specifying time zone</h3>
+<p><b>Available as of Camel 2.8.1</b><br clear="none">
+The Quartz Scheduler allows you to configure time zone per trigger. For example to use a timezone of your country, then you can do as follows:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+quartz2://groupName/timerName?cron=0+0/5+12-18+?+*+MON-FRI&amp;trigger.timeZone=Europe/Stockholm
+]]></script>
+</div></div>
+
+<p>The timeZone value is the values accepted by <tt>java.util.TimeZone</tt>.</p>
+
+<p>In Camel 2.8.0 or older versions you would have to provide your custom <tt>String</tt> to <tt>java.util.TimeZone</tt> <a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> to be able configure this from the endpoint uri.<br clear="none">
+From Camel 2.8.1 onwards we have included such a <a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> in the camel-core.</p>
+
+<h3><a shape="rect" name="Quartz2-SeeAlso"></a>See Also</h3>
+<ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
+
+<ul><li><a shape="rect" href="timer.html" title="Timer">Timer</a></li></ul>
+
+</div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+                <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3><a shape="rect" name="Navigation-Overview"></a><a shape="rect" href="overview.html" title="Overview">Overview</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="index.html" title="Index">Home</a></li><li><a shape="rect" href="download.html" title="Download">Download</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li><li><a shape="rect" href="faq.html" title="FAQ">FAQ</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Documentation"></a><a shape="rect" href="documentation.html" title="Documentation">Documentation</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="user-guide.html" title="User Guide">User Guide</a></li><li><a shape="rect" href="manual.html" title="Manual">Manual</a></li><li><a shape="rect" href="books.html" title="Books">Books</a></li><li><a shape="rect" href="tutorials.html" title="Tutorials">Tutorials</a></li><li><a shape="rect" href="examples.html" title="Examples">Examples</a></li><li><a shape="rect" href="cookbook.html" title="Cookbook">Cookbook</a></li><li><a shape="rect" href="architecture.html" title="Architecture">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a></li><li><a shape="rect" href="dsl.html" title="DSL">DSL</a></li><li><a shape="rect" href="components.html" title="Components">Components</a></li><li><a shape="rect" href="data-format.html" title="Data Format">Data Format</a></li><li><a shape="rect" href="languages.html" title="Languages">L
 anguages</a></li><li><a shape="rect" href="security.html" title="Security">Security</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Search"></a>Search</h3>
+
+<p>
+</p><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
+  <div>
+    <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
+
+
+<h3><a shape="rect" name="Navigation-Community"></a><a shape="rect" href="community.html" title="Community">Community</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="support.html" title="Support">Support</a></li><li><a shape="rect" href="contributing.html" title="Contributing">Contributing</a></li><li><a shape="rect" href="discussion-forums.html" title="Discussion Forums">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html" title="User Stories">User Stories</a></li><li><a shape="rect" href="news.html" title="News">News</a></li><li><a shape="rect" href="articles.html" title="Articles">Articles</a></li><li><a shape="rect" href="site.html" title="Site">Site</a></li><li><a shape="rect" href="team.html" title="Team">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Developers"></a><a shape="rect" href="developers.html" title="Developers">Developers</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="developers.html" title="Developers">Developer Guide</a></li><li><a shape="rect" href="source.html" title="Source">Source</a></li><li><a shape="rect" href="building.html" title="Building">Building</a></li><li><a shape="rect" href="javadoc.html" title="JavaDoc">JavaDoc</a></li><li><a shape="rect" href="irc-room.html" title="IRC Room">IRC Room</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-ApacheSoftwareFoundation"></a>Apache Software Foundation</h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" class="external-link" href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/security/">Security</a></li></ul>
+</div>
+                <!-- NavigationBar -->
+            </div>
+          </div>
+        </td>
+        </tr>
+	</tbody>
+        </table>
+
+
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="$base/privacy-policy.html">Privacy Policy</a> -
+        (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=34014213">edit page</a>)
+   	 (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34014213&amp;showComments=true&amp;showCommentArea=true#addcomment">add comment</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2011 The Apache Software Foundation.
+<br>          
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation.  All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to private@camel.apache.org -->
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-25976253-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+</body>
+</html>
+
+

Modified: websites/production/camel/content/sql-component.html
==============================================================================
--- websites/production/camel/content/sql-component.html (original)
+++ websites/production/camel/content/sql-component.html Sun Aug 11 00:18:53 2013
@@ -90,7 +90,7 @@
 
 <p>The <b>sql:</b> component allows you to work with databases using JDBC queries. The difference between this component and <a shape="rect" href="jdbc.html" title="JDBC">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 <b><tt>spring-jdbc</tt></b> behind the scenes for the actual SQL handling.</p>
+<p>This component uses <tt><b>spring-jdbc</b></tt> behind the scenes for the actual SQL handling.</p>
 
 <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -123,7 +123,7 @@ sql:select * from table where id=# order
 ]]></script>
 </div></div>
 
-<p>From Camel 2.11 onwards you can use named parameters by using <tt>#:name</tt> style as shown:  </p>
+<p>From Camel 2.11 onwards you can use named parameters by using <tt>#:name</tt> style as shown:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 sql:select * from table where id=:#myId order by name[?options]
@@ -143,7 +143,11 @@ sql:select * from table where id=:#myId 
 <h3><a shape="rect" name="SQLComponent-Options"></a>Options</h3>
 
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>batch</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7.5, 2.8.4 and 2.9:</b> Execute SQL batch update statements. See notes below on how the treatment of the inbound message body changes if this is set to <tt>true</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSourceRef</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Deprecated and will be removed in Camel 3.0:</b> Reference to a <tt>DataSource</tt> to look up in the registry. Use <tt>dataSource=#theName</tt> instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Reference to a <tt>DataSource</tt> to look up in the registry. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>placeholder</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>#</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Specifies a character that will be replaced to <tt>?</tt> in SQL query. Notice, that it is simple <tt>String.replaceAll()</tt> operation and no SQL parsing 
 is involved (quoted strings will also change). This replacement is <b>only</b> happening if the endpoint is created using the <tt>SqlComponent</tt>. If you manually create the endpoint, then use the expected <tt>?</tt> sign instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>template.&lt;xxx&gt;</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sets additional options on the Spring <tt>JdbcTemplate</tt> that is used behind the scenes to execute the queries. For instance, <tt>template.maxRows=10</tt>. For detailed documentation, 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>allowNamedParameter
 s</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Whether to allow using named parameters in the queries. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>processingStrategy</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Allows to plugin to use a custom <tt>org.apache.camel.component.sql.SqlProcessingStrategy</tt> to execute queries when the consumer has processed the rows/batch. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>prepareStatementStrategy</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Camel 2.11:</b> Allows to plugin to use a custom <tt>org.apache.camel.component.sql.SqlPrepareStatementStrategy</tt> to control preparation of the query and prepared statement. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.delay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>long</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>500</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Delay in milliseconds between each poll. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>long</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Milliseconds before polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confl
 uenceTd"> <tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Set to <tt>true</tt> to use fixed delay between polls, otherwise fixed 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> An integer value to define the maximum number of messages to gather per poll. By default, no maxim
 um is set. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> If <tt>true</tt> each row returned when polling will be processed individually. If <tt>false</tt> the entire <tt>java.util.List</tt> of data is set as the IN body. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Whether to route a single empty <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> if there was no data to poll. </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">  <b>Camel 2.11:</b> <b>SQL consumer only:</b> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.onConsumeFailed</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">  <b>Camel 2.11:</b> <b>SQL consumer only:</b> After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html" tit
 le="Exchange">Exchange</a> failed, for example to  mark the row as failed. The query can have parameter. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.onConsumeBatchComplete</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">  <b>Camel 2.11:</b> <b>SQL consumer only:</b> After processing the entire batch, this query can be executed to bulk update rows etc. The query cannot have parameters. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.expectedUpdateCount</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> If using <tt>consumer.onConsume</tt> then this option can be used to set an expected num
 ber of rows being updated. Typically you may set this to <tt>1</tt> to expect one row to be updated. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.breakBatchOnConsumeFail</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">  <b>Camel 2.11:</b> <b>SQL consumer only:</b> If using <tt>consumer.onConsume</tt> and it fails, then this option controls whether to break out of the batch or continue processing the next row from the batch. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>alwaysPopulateStatement</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL producer only:</b> If enabled then the <tt>populateStatement</tt
 > method from <tt>org.apache.camel.component.sql.SqlPrepareStatementStrategy</tt> is always invoked, also if there is no expected parameters to be prepared. When this is <tt>false</tt> then the <tt>populateStatement</tt> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>separator</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>char</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>,</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> 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 <tt>Map</tt> type is used instead. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>batch</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7.5, 2.8.4 and 2.9:</b> Execute SQL batch update statements. See notes below on how the treatment of the inbound message body changes if this is set to <tt>true</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSourceRef</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Deprecated and will be removed in Camel 3.0:</b> Reference to a <tt>DataSource</tt> to look up in the registry. Use <tt>dataSource=#theName</tt> instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Reference to a <tt>DataSource</tt> to look up in the registry. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>placeholder</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>#</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Specifies a character that will be replaced to <tt>?</tt> in SQL query. Notice, that it is simple <tt>String.replaceAll()</tt> operation and no SQL parsing 
 is involved (quoted strings will also change). This replacement is <b>only</b> happening if the endpoint is created using the <tt>SqlComponent</tt>. If you manually create the endpoint, then use the expected <tt>?</tt> sign instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>template.&lt;xxx&gt;</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sets additional options on the Spring <tt>JdbcTemplate</tt> that is used behind the scenes to execute the queries. For instance, <tt>template.maxRows=10</tt>. For detailed documentation, 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>allowNamedParameter
 s</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Whether to allow using named parameters in the queries. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>processingStrategy</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Allows to plugin to use a custom <tt>org.apache.camel.component.sql.SqlProcessingStrategy</tt> to execute queries when the consumer has processed the rows/batch. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>prepareStatementStrategy</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Camel 2.11:</b> Allows to plugin to use a custom <tt>org.apache.camel.component.sql.SqlPrepareStatementStrategy</tt> to control preparation of the query and prepared statement. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.delay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>long</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>500</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Delay in milliseconds between each poll. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>long</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Milliseconds before polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confl
 uenceTd"> <tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Set to <tt>true</tt> to use fixed delay between polls, otherwise fixed 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> An integer value to define the maximum number of messages to gather per poll. By default, no maxim
 um is set. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> If <tt>true</tt> each row returned when polling will be processed individually. If <tt>false</tt> the entire <tt>java.util.List</tt> of data is set as the IN body. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> Whether to route a single empty <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> if there was no data to poll. </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.onConsumeFailed</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html" title
 ="Exchange">Exchange</a> failed, for example to  mark the row as failed. The query can have parameter. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.onConsumeBatchComplete</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> After processing the entire batch, this query can be executed to bulk update rows etc. The query cannot have parameters. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.expectedUpdateCount</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> If using <tt>consumer.onConsume</tt> then this option can be used to set an expected number
  of rows being updated. Typically you may set this to <tt>1</tt> to expect one row to be updated. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.breakBatchOnConsumeFail</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL consumer only:</b> If using <tt>consumer.onConsume</tt> and it fails, then this option controls whether to break out of the batch or continue processing the next row from the batch. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>alwaysPopulateStatement</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> <b>SQL producer only:</b> If enabled then the <tt>populateStatement</tt> me
 thod from <tt>org.apache.camel.component.sql.SqlPrepareStatementStrategy</tt> is always invoked, also if there is no expected parameters to be prepared. When this is <tt>false</tt> then the <tt>populateStatement</tt> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>separator</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>char</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>,</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> 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 <tt>Map</tt> type is used instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>outputType</tt> </td><td colspan="1" rowsp
 an="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>SelectList</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12.0:</b> Make the output of consumer or producer to <tt>SelectList</tt> as List of Map, or <tt>SelectOne</tt> 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 <tt>SELECT COUNT( * ) FROM PROJECT</tt> 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 <tt>outputClass</tt> 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.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>outputClass</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12.0:</b> Specify the full package and class name to use as conversion when <tt>outputType=SelectOne</tt>. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -169,6 +173,7 @@ sql:select * from table where id=:#myId 
 
 
 <h3><a shape="rect" name="SQLComponent-Configuration"></a>Configuration</h3>
+
 <p>You can now set a reference to a <tt>DataSource</tt> in the URI directly:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -178,7 +183,8 @@ sql:select * from table where id=# order
 </div></div>
 
 <h3><a shape="rect" name="SQLComponent-Sample"></a>Sample</h3>
-<p>In the sample below we execute a query and retrieve the result as a <tt>List</tt> of rows, where each row is a <tt>Map&lt;String, Object</tt> and the key is the column name. </p>
+
+<p>In the sample below we execute a query and retrieve the result as a <tt>List</tt> of rows, where each row is a <tt>Map&lt;String, Object</tt> 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" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -236,11 +242,12 @@ assertEquals("Linux", row.get("PROJECT")
 <p>We could configure the <tt>DataSource</tt> in Spring XML as follows:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
- &lt;jee:jndi-lookup id="myDS" jndi-name="jdbc/myDataSource"/&gt; 
+ &lt;jee:jndi-lookup id="myDS" jndi-name="jdbc/myDataSource"/&gt;
 ]]></script>
 </div></div>
 
 <h4><a shape="rect" name="SQLComponent-Usingnamedparameters"></a>Using named parameters</h4>
+
 <p><b>Available as of Camel 2.11</b></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">
@@ -264,6 +271,7 @@ for the named parameters:</p>
 </div></div>
 
 <h3><a shape="rect" name="SQLComponent-UsingtheJDBCbasedidempotentrepository"></a>Using the JDBC based idempotent repository</h3>
+
 <p><b>Available as of Camel 2.7</b>: In this section we will use the JDBC based idempotent repository.</p>
 
 <div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Abstract class</b><br clear="none">From Camel 2.9 onwards there is an abstract class <tt>org.apache.camel.processor.idempotent.jdbc.AbstractJdbcMessageIdRepository</tt> you can extend to build custom JDBC idempotent repository.</td></tr></table></div>
@@ -323,6 +331,7 @@ CREATE TABLE CAMEL_MESSAGEPROCESSED (
 </div></div>
 
 <h4><a shape="rect" name="SQLComponent-CustomizetheJdbcMessageIdRepository"></a>Customize the JdbcMessageIdRepository</h4>
+
 <p>Starting with <b>Camel 2.9.1</b> you have a few options to tune the <tt>org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository</tt> for your needs:</p>
 <div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> createTableIfNotExists </td><td colspan="1" rowspan="1" class="confluenceTd"> true </td><td colspan="1" rowspan="1" class="confluenceTd"> Defines whether or not Camel should try to create the table if it doesn't exist. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> tableExistsString </td><td colspan="1" rowspan="1" class="confluenceTd"> SELECT 1 FROM CAMEL_MESSAGEPROCESSED WHERE 1 = 0 </td><td colspan="1" rowspan="1" class="confluenceTd"> This query is used to figure out whether the table already exists or not. It must throw an exception to indicate the table doesn't exist. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> createString </td><td colspan="1"
  rowspan="1" class="confluenceTd"> CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP) </td><td colspan="1" rowspan="1" class="confluenceTd"> The statement which is used to create the table. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> queryString </td><td colspan="1" rowspan="1" class="confluenceTd"> SELECT COUNT(*) FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? AND messageId = ? </td><td colspan="1" rowspan="1" class="confluenceTd"> The query which is used to figure out whether the message already exists in the repository (the result is not equals to '0'). It takes two parameters. This first one is the processor name (<tt>String</tt>) and the second one is the message id (<tt>String</tt>). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> insertString </td><td colspan="1" rowspan="1" class="confluenceTd"> INSERT INTO CAMEL_MESSAGEPROCESSED (processorName, messageId, createdAt) VALUES (?
 , ?, ?) </td><td colspan="1" rowspan="1" class="confluenceTd"> The statement which is used to add the entry into the table. It takes three parameter. The first one is the processor name (<tt>String</tt>), the second one is the message id (<tt>String</tt>) and the third one is the timestamp (<tt>java.sql.Timestamp</tt>) when this entry was added to the repository. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> deleteString </td><td colspan="1" rowspan="1" class="confluenceTd"> DELETE FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? AND messageId = ? </td><td colspan="1" rowspan="1" class="confluenceTd"> The statement which is used to delete the entry from the database. It takes two parameter. This first one is the processor name (<tt>String</tt>) and the second one is the message id (<tt>String</tt>). </td></tr></tbody></table>
@@ -345,6 +354,7 @@ CREATE TABLE CAMEL_MESSAGEPROCESSED (
 </div></div>
 
 <h3><a shape="rect" name="SQLComponent-UsingtheJDBCbasedaggregationrepository"></a>Using the JDBC based aggregation repository</h3>
+
 <p><b>Available as of Camel 2.6</b></p>
 <div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Using JdbcAggregationRepository in Camel 2.6</b><br clear="none">In Camel 2.6, the JdbcAggregationRepository is provided in the <tt>camel-jdbc-aggregator</tt> component. From Camel 2.7 onwards, the <tt>JdbcAggregationRepository</tt> is provided in the <tt>camel-sql</tt> component.</td></tr></table></div>
 <p><tt>JdbcAggregationRepository</tt> is an <tt>AggregationRepository</tt> which on the fly persists the aggregated messages. This ensures that you will not loose messages, as the default aggregator will use an in memory only <tt>AggregationRepository</tt>.<br clear="none">
@@ -358,12 +368,14 @@ The <tt>JdbcAggregationRepository</tt> a
 
 
 <h4><a shape="rect" name="SQLComponent-Whatispreservedwhenpersisting"></a>What is preserved when persisting</h4>
-<p><tt>JdbcAggregationRepository</tt> will only preserve any <tt>Serializable</tt> compatible data types. If a data type is not such a type its dropped and a <tt>WARN</tt> is logged. And it only persists the <tt>Message</tt> body and the <tt>Message</tt> headers. The <tt>Exchange</tt> properties are <b>not</b> persisted. </p>
+
+<p><tt>JdbcAggregationRepository</tt> will only preserve any <tt>Serializable</tt> compatible data types. If a data type is not such a type its dropped and a <tt>WARN</tt> is logged. And it only persists the <tt>Message</tt> body and the <tt>Message</tt> headers. The <tt>Exchange</tt> properties are <b>not</b> persisted.</p>
 
 <p>From Camel 2.11 onwards you can store the message body and select(ed) headers as String in separate columns.</p>
 
 <h4><a shape="rect" name="SQLComponent-Recovery"></a>Recovery</h4>
-<p>The <tt>JdbcAggregationRepository</tt> will by default recover any failed <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>. It does this by having a background tasks that scans for failed <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>s in the persistent store. You can use the <tt>checkInterval</tt> option to set how often this task runs. The recovery works as transactional which ensures that Camel will try to recover and redeliver the failed <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>. Any <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> which was found to be recovered will be restored from the persistent store and resubmitted and send out again. </p>
+
+<p>The <tt>JdbcAggregationRepository</tt> will by default recover any failed <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>. It does this by having a background tasks that scans for failed <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>s in the persistent store. You can use the <tt>checkInterval</tt> option to set how often this task runs. The recovery works as transactional which ensures that Camel will try to recover and redeliver the failed <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>. Any <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> which was found to be recovered will be restored from the persistent store and resubmitted and send out again.</p>
 
 <p>The following headers is set when an <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> is being recovered/redelivered:</p>
 <div class="table-wrap">
@@ -373,7 +385,7 @@ The <tt>JdbcAggregationRepository</tt> a
 
 <p>Only when an <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> has been successfully processed it will be marked as complete which happens when the <tt>confirm</tt> method is invoked on the <tt>AggregationRepository</tt>. This means if the same <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> fails again it will be kept retried until it success.</p>
 
-<p>You can use option <tt>maximumRedeliveries</tt> to limit the maximum number of redelivery attempts for a given recovered <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>. You must also set the <tt>deadLetterUri</tt> option so Camel knows where to send the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> when the <tt>maximumRedeliveries</tt> was hit. </p>
+<p>You can use option <tt>maximumRedeliveries</tt> to limit the maximum number of redelivery attempts for a given recovered <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>. You must also set the <tt>deadLetterUri</tt> option so Camel knows where to send the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> when the <tt>maximumRedeliveries</tt> was hit.</p>
 
 <p>You can see some examples in the unit tests of camel-sql, for example <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregateRecoverDeadLetterChannelTest.java">this test</a>.</p>
 
@@ -402,6 +414,7 @@ CREATE TABLE aggregation_completed (
 </div></div>
 
 <h4><a shape="rect" name="SQLComponent-Storingbodyandheadersastext"></a>Storing body and headers as text</h4>
+
 <p><b>Available as of Camel 2.11</b></p>
 
 <p>You can configure the <tt>JdbcAggregationRepository</tt> to store message body and select(ed) headers as String in separate columns. For example to store the body, and the following two headers <tt>companyName</tt> and <tt>accountName</tt> use the following SQL:</p>
@@ -446,17 +459,21 @@ CREATE TABLE aggregationRepo3_completed 
 </div></div>
 
 <h4><a shape="rect" name="SQLComponent-Codec%28Serialization%29"></a>Codec (Serialization)</h4>
+
 <p>Since they can contain any type of payload, Exchanges are not serializable by design. It is converted into a byte array to be stored in a database BLOB field. All those conversions are handled by the <tt>JdbcCodec</tt> class. One detail of the code requires your attention: the <tt>ClassLoadingAwareObjectInputStream</tt>.</p>
 
 <p>The <tt>ClassLoadingAwareObjectInputStream</tt> has been reused from the <a shape="rect" class="external-link" href="http://activemq.apache.org/">Apache ActiveMQ</a> project. It wraps an <tt>ObjectInputStream</tt> and use it with the <tt>ContextClassLoader</tt> rather than the <tt>currentThread</tt> one. The benefit is to be able to load classes exposed by other bundles. This allows the exchange body and headers to have custom types object references.</p>
 
 <h4><a shape="rect" name="SQLComponent-Transaction"></a>Transaction</h4>
+
 <p>A Spring <tt>PlatformTransactionManager</tt> is required to orchestrate transaction.</p>
 
 <h4><a shape="rect" name="SQLComponent-Service%28Start%2FStop%29"></a>Service (Start/Stop)</h4>
+
 <p>The <tt>start</tt> method verify the connection of the database and the presence of the required tables. If anything is wrong it will fail during starting.</p>
 
 <h4><a shape="rect" name="SQLComponent-Aggregatorconfiguration"></a>Aggregator configuration</h4>
+
 <p>Depending on the targeted environment, the aggregator might need some configuration. As you already know, each aggregator should have its own repository (with the corresponding pair of table created in the database) and a data source. If the default lobHandler is not adapted to your database system, it can be injected with the <tt>lobHandler</tt> property.</p>
 
 <p>Here is the declaration for Oracle:</p>
@@ -506,7 +523,7 @@ CREATE TABLE aggregationRepo3_completed 
           &lt;value&gt;com.foo.sql.MyOtherViolationExceptoion&lt;/value&gt;
         &lt;/util:set&gt;
       &lt;/property&gt;
-    &lt;/bean&gt; 
+    &lt;/bean&gt;
 ]]></script>
 </div></div>