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/08/26 11:19:04 UTC

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

Modified: websites/production/camel/content/ibatis.html
==============================================================================
--- websites/production/camel/content/ibatis.html (original)
+++ websites/production/camel/content/ibatis.html Tue Aug 26 09:19:04 2014
@@ -86,84 +86,30 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="iBATIS-iBATIS">iBATIS</h2>
-
-<p>The <strong>ibatis:</strong> component allows you to query, poll, insert, update and delete data in a relational database using <a shape="rect" class="external-link" href="http://ibatis.apache.org/">Apache iBATIS</a>.</p>
-
-    <div class="aui-message problem shadowed information-macro">
+<div class="wiki-content maincontent"><h2 id="iBATIS-iBATIS">iBATIS</h2><p>The <strong>ibatis:</strong> component allows you to query, poll, insert, update and delete data in a relational database using <a shape="rect" class="external-link" href="http://ibatis.apache.org/">Apache iBATIS</a>.</p>    <div class="aui-message problem shadowed information-macro">
                     <p class="title">Prefer MyBatis</p>
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
-                            
-<p>The Apache iBatis project is no longer active. The project is moved outside Apache and is now know as the MyBatis project.<br clear="none">
-Therefore we encourage users to use <a shape="rect" href="mybatis.html">MyBatis</a> instead. This camel-ibatis component will be removed in Camel 3.0.</p>
+                            <p>The Apache iBatis project is no longer active. The project is moved outside Apache and is now know as the MyBatis project.<br clear="none">Therefore we encourage users to use <a shape="rect" href="mybatis.html">MyBatis</a> instead. This camel-ibatis component will be removed in Camel 3.0.</p><p>iBatis do not support Spring 4.x. So you can only use Spring 3.x or older with iBatis.</p>
                     </div>
     </div>
-
-
-<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;
+<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-ibatis&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="iBATIS-URIformat">URI format</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[
-ibatis:statementName[?options]
+</div></div><h3 id="iBATIS-URIformat">URI format</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[ibatis:statementName[?options]
 ]]></script>
-</div></div>
-
-<p>Where <strong>statementName</strong> is the name in the iBATIS XML configuration file which maps to the query, insert, update or delete operation you wish to evaluate.</p>
-
-<p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p>
-
-<p>This component will by default load the iBatis SqlMapConfig file from the root of the classpath and expected named as <code>SqlMapConfig.xml</code>.<br clear="none">
-It uses Spring resource loading so you can define it using <code>classpath</code>, <code>file</code> or <code>http</code> as prefix to load resources with those schemes.<br clear="none">
-In Camel 2.2 you can configure this on the iBatisComponent with the <code>setSqlMapConfig(String)</code> method.</p>
-
-<h3 id="iBATIS-Options">Options</h3>
-<div class="confluenceTableSmall">
-<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> <code>consumer.onConsume</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> Statements to run after consuming. Can be used, for example, to update rows after they have been consumed and processed in Camel. See sample later. Multiple statements can be separated with comma. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.useIterator</code> </p></td><td colspan="1" rowspa
 n="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> If <code>true</code> each row returned when polling will be processed individually. If <code>false</code> the entire <code>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> Sets whether empty result set should be routed or not. By default, empty result sets are not routed. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>statementType</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>StatementType</code> </p></td><
 td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Mandatory to specify for IbatisProducer to control which iBatis <code>SqlMapClient</code> method to invoke. The enum values are: <code>QueryForObject</code>, <code>QueryForList</code>, <code>Insert</code>, <code>Update</code>, <code>Delete</code>. </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> An integer to define a maximum messages to gather per poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. Set a value of 0 or negative to disabled it. </p></td></tr><tr><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p> <code>isolation</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>TRANSACTION_REPEATABLE_READ</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.9:</strong> A String the defines the transaction isolation level of the will be used. Allowed values are TRANSACTION_NONE, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE </p></td></tr></tbody></table></div>
-
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>isolation</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>TRANSACTION_REPEATABLE_READ</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.9:</strong> A String the defines the transaction isolation level of the will be used. Allowed values are TRANSACTION_NONE, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE </p></td></tr></tbody></table></div>
-
-</div>
-
-<h3 id="iBATIS-MessageHeaders">Message Headers</h3>
-<p>Camel will populate the result message, either IN or OUT with a header with the operationName used:</p>
-<div class="confluenceTableSmall">
-<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> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelIBatisStatementName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The <strong>statementName</strong> used (for example: insertAccount). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelIBatisResult</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Object</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The <strong>response</strong> returned from iBatis in any of the operations. For instance an <code>INSERT</code> could return the auto-generated key, or number o
 f rows etc. </p></td></tr></tbody></table></div>
-</div>
-
-<h3 id="iBATIS-MessageBody">Message Body</h3>
-<p>The response from iBatis will only be set as body if it's a <code>SELECT</code> statement. That means, for example, for <code>INSERT</code> statements Camel will not replace the body. This allows you to continue routing and keep the original body. The response from iBatis is always stored in the header with the key <code>CamelIBatisResult</code>.</p>
-
-<h3 id="iBATIS-Samples">Samples</h3>
-
-<p>For example if you wish to consume beans from a JMS queue and insert them into a database you could do the following:</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:queue:newAccount&quot;).
+</div></div><p>Where <strong>statementName</strong> is the name in the iBATIS XML configuration file which maps to the query, insert, update or delete operation you wish to evaluate.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><p>This component will by default load the iBatis SqlMapConfig file from the root of the classpath and expected named as <code>SqlMapConfig.xml</code>.<br clear="none"> It uses Spring resource loading so you can define it using <code>classpath</code>, <code>file</code> or <code>http</code> as prefix to load resources with those schemes.<br clear="none"> In Camel 2.2 you can configure this on the iBatisComponent with the <code>setSqlMapConfig(String)</code> method.</p><h3 id="iBATIS-Options">Options</h3><div class="confluenceTableSmall"><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><code>consumer.onConsume</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>Statements to run after consuming. Can be used, for example, to update rows after they have been consumed and processed in Camel. See sample later. Multiple statements can be separated with comma.</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>If <code>true</code> each row returned when polling will be processed individually. If <code>false</code> the entire <code>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>Sets whether empty result set should be routed or not. By default, empty result sets are not routed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>statementType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>StatementType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Mandatory to specify for IbatisProducer to control wh
 ich iBatis <code>SqlMapClient</code> method to invoke. The enum values are: <code>QueryForObject</code>, <code>QueryForList</code>, <code>Insert</code>, <code>Update</code>, <code>Delete</code>.</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>An integer to define a maximum messages to gather per poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. Set a value of 0 or negative to disabled it.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>isolation</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>TRA
 NSACTION_REPEATABLE_READ</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> A String the defines the transaction isolation level of the will be used. Allowed values are TRANSACTION_NONE, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE</p></td></tr></tbody></table></div><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>isolation</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>TRANSACTION_REPEATABLE_READ</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> A String the defines the transaction isolation level of the will be used. Allowed values are TRANSACTION_NONE, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION
 _SERIALIZABLE</p></td></tr></tbody></table></div></div><h3 id="iBATIS-MessageHeaders">Message Headers</h3><p>Camel will populate the result message, either IN or OUT with a header with the operationName used:</p><div class="confluenceTableSmall"><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>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelIBatisStatementName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The <strong>statementName</strong> used (for example: insertAccount).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelIBatisResult</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object
 </code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The <strong>response</strong> returned from iBatis in any of the operations. For instance an <code>INSERT</code> could return the auto-generated key, or number of rows etc.</p></td></tr></tbody></table></div></div><h3 id="iBATIS-MessageBody">Message Body</h3><p>The response from iBatis will only be set as body if it's a <code>SELECT</code> statement. That means, for example, for <code>INSERT</code> statements Camel will not replace the body. This allows you to continue routing and keep the original body. The response from iBatis is always stored in the header with the key <code>CamelIBatisResult</code>.</p><h3 id="iBATIS-Samples">Samples</h3><p>For example if you wish to consume beans from a JMS queue and insert them into a database you could do the following:</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:queue:newAccount&quot;).
   to(&quot;ibatis:insertAccount?statementType=Insert&quot;);
 ]]></script>
-</div></div>
-
-<p>Notice we have to specify the <code>statementType</code>, as we need to instruct Camel which <code>SqlMapClient</code> operation to invoke.</p>
-
-<p>Where <strong>insertAccount</strong> is the iBatis ID in the SQL map 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;!-- Insert example, using the Account parameter class --&gt;
+</div></div><p>Notice we have to specify the <code>statementType</code>, as we need to instruct Camel which <code>SqlMapClient</code> operation to invoke.</p><p>Where <strong>insertAccount</strong> is the iBatis ID in the SQL map 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;!-- Insert example, using the Account parameter class --&gt;
   &lt;insert id=&quot;insertAccount&quot; parameterClass=&quot;Account&quot;&gt;
     insert into ACCOUNT (
       ACC_ID,
@@ -176,88 +122,51 @@ from(&quot;activemq:queue:newAccount&quo
     )
   &lt;/insert&gt;
 ]]></script>
-</div></div>
-
-<h3 id="iBATIS-UsingStatementTypeforbettercontrolofIBatis">Using StatementType for better control of IBatis</h3>
-<p>When routing to an iBatis endpoint you want more fine grained control so you can control whether the SQL statement to be executed is a <code>SELEECT</code>, <code>UPDATE</code>, <code>DELETE</code> or <code>INSERT</code> etc. So for instance if we want to route to an iBatis endpoint in which the IN body contains parameters to a <code>SELECT</code> statement we can do:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="iBATIS-UsingStatementTypeforbettercontrolofIBatis">Using StatementType for better control of IBatis</h3><p>When routing to an iBatis endpoint you want more fine grained control so you can control whether the SQL statement to be executed is a <code>SELEECT</code>, <code>UPDATE</code>, <code>DELETE</code> or <code>INSERT</code> etc. So for instance if we want to route to an iBatis endpoint in which the IN body contains parameters to a <code>SELECT</code> statement we can do:</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:start&quot;)
     .to(&quot;ibatis:selectAccountById?statementType=QueryForObject&quot;)
     .to(&quot;mock:result&quot;);
 ]]></script>
-</div></div>
-
-<p>In the code above we can invoke the iBatis statement <code>selectAccountById</code> and the IN body should contain the account id we want to retrieve, such as an <code>Integer</code> type.</p>
-
-<p>We can do the same for some of the other operations, such as <code>QueryForList</code>:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>In the code above we can invoke the iBatis statement <code>selectAccountById</code> and the IN body should contain the account id we want to retrieve, such as an <code>Integer</code> type.</p><p>We can do the same for some of the other operations, such as <code>QueryForList</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:start&quot;)
     .to(&quot;ibatis:selectAllAccounts?statementType=QueryForList&quot;)
     .to(&quot;mock:result&quot;);
 ]]></script>
-</div></div>
-
-<p>And the same for <code>UPDATE</code>, where we can send an <code>Account</code> object as IN body to iBatis:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And the same for <code>UPDATE</code>, where we can send an <code>Account</code> object as IN body to iBatis:</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:start&quot;)
     .to(&quot;ibatis:updateAccount?statementType=Update&quot;)
     .to(&quot;mock:result&quot;);
 ]]></script>
-</div></div>
-
-
-<h4 id="iBATIS-Scheduledpollingexample">Scheduled polling example</h4>
-<p>Since this component does not support scheduled polling, you need to use another mechanism for triggering the scheduled polls, such as the <a shape="rect" href="timer.html">Timer</a> or <a shape="rect" href="quartz.html">Quartz</a> components.</p>
-
-<p>In the sample below we poll the database, every 30 seconds using the <a shape="rect" href="timer.html">Timer</a> component and send the data to the JMS queue:</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;timer://pollTheDatabase?delay=30000&quot;).to(&quot;ibatis:selectAllAccounts?statementType=QueryForList&quot;).to(&quot;activemq:queue:allAccounts&quot;);
+</div></div><h4 id="iBATIS-Scheduledpollingexample">Scheduled polling example</h4><p>Since this component does not support scheduled polling, you need to use another mechanism for triggering the scheduled polls, such as the <a shape="rect" href="timer.html">Timer</a> or <a shape="rect" href="quartz.html">Quartz</a> components.</p><p>In the sample below we poll the database, every 30 seconds using the <a shape="rect" href="timer.html">Timer</a> component and send the data to the JMS queue:</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;timer://pollTheDatabase?delay=30000&quot;).to(&quot;ibatis:selectAllAccounts?statementType=QueryForList&quot;).to(&quot;activemq:queue:allAccounts&quot;);
 ]]></script>
-</div></div>
-
-<p>And the iBatis SQL map file used:</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;!-- Select with no parameters using the result map for Account class. --&gt;
+</div></div><p>And the iBatis SQL map file used:</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;!-- Select with no parameters using the result map for Account class. --&gt;
   &lt;select id=&quot;selectAllAccounts&quot; resultMap=&quot;AccountResult&quot;&gt;
     select * from ACCOUNT
   &lt;/select&gt;
 ]]></script>
-</div></div>
-
-<h4 id="iBATIS-UsingonConsume">Using onConsume</h4>
-<p>This component supports executing statements <strong>after</strong> data have been consumed and processed by Camel. This allows you to do post updates in the database. Notice all statements must be <code>UPDATE</code> statements. Camel supports executing multiple statements whose name should be separated by comma.</p>
-
-<p>The route below illustrates we execute the <strong>consumeAccount</strong> statement data is processed. This allows us to change the status of the row in the database to processed, so we avoid consuming it twice or more.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="iBATIS-UsingonConsume">Using onConsume</h4><p>This component supports executing statements <strong>after</strong> data have been consumed and processed by Camel. This allows you to do post updates in the database. Notice all statements must be <code>UPDATE</code> statements. Camel supports executing multiple statements whose name should be separated by comma.</p><p>The route below illustrates we execute the <strong>consumeAccount</strong> statement data is processed. This allows us to change the status of the row in the database to processed, so we avoid consuming it twice or more.</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;ibatis:selectUnprocessedAccounts?consumer.onConsume=consumeAccount&quot;).to(&quot;mock:results&quot;);
 ]]></script>
-</div></div>
-
-<p>And the statements in the sqlmap file:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And the statements in the sqlmap 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;select id=&quot;selectUnprocessedAccounts&quot; resultMap=&quot;AccountResult&quot;&gt;
      select * from ACCOUNT where PROCESSED = false
 &lt;/select&gt;
 ]]></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;update id=&quot;consumeAccount&quot; parameterClass=&quot;Account&quot;&gt;
      update ACCOUNT set PROCESSED = true where ACC_ID = #id#
 &lt;/update&gt;
 ]]></script>
-</div></div>
-
-<h3 id="iBATIS-SeeAlso">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>
-<ul class="alternate"><li><a shape="rect" href="mybatis.html">MyBatis</a></li></ul></div>
+</div></div><p></p><h3 id="iBATIS-SeeAlso">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><ul class="alternate"><li><a shape="rect" href="mybatis.html">MyBatis</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">