camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r874067 [1/2] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache quartz2.html sql-component.html
Date Sun, 11 Aug 2013 00:18:54 GMT
Author: buildbot
Date: Sun Aug 11 00:18:53 2013
New Revision: 874067

Log:
Production update by buildbot for camel

Added:
    websites/production/camel/content/quartz2.html
Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/sql-component.html

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Sun Aug 11 00:18:53 2013
@@ -17164,7 +17164,7 @@ protected RouteBuilder createRouteBuilde
 
 <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">
@@ -17197,7 +17197,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]
@@ -17217,7 +17217,11 @@ sql:select * from table where id=:#myId 
 <h3><a shape="rect" name="BookComponentAppendix-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>
 
@@ -17243,6 +17247,7 @@ sql:select * from table where id=:#myId 
 
 
 <h3><a shape="rect" name="BookComponentAppendix-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">
@@ -17252,7 +17257,8 @@ sql:select * from table where id=# order
 </div></div>
 
 <h3><a shape="rect" name="BookComponentAppendix-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">
@@ -17310,11 +17316,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="BookComponentAppendix-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">
@@ -17338,6 +17345,7 @@ for the named parameters:</p>
 </div></div>
 
 <h3><a shape="rect" name="BookComponentAppendix-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>
@@ -17397,6 +17405,7 @@ CREATE TABLE CAMEL_MESSAGEPROCESSED (
 </div></div>
 
 <h4><a shape="rect" name="BookComponentAppendix-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>
@@ -17419,6 +17428,7 @@ CREATE TABLE CAMEL_MESSAGEPROCESSED (
 </div></div>
 
 <h3><a shape="rect" name="BookComponentAppendix-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">
@@ -17432,12 +17442,14 @@ The <tt>JdbcAggregationRepository</tt> a
 
 
 <h4><a shape="rect" name="BookComponentAppendix-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="BookComponentAppendix-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">
@@ -17447,7 +17459,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>
 
@@ -17476,6 +17488,7 @@ CREATE TABLE aggregation_completed (
 </div></div>
 
 <h4><a shape="rect" name="BookComponentAppendix-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>
@@ -17520,17 +17533,21 @@ CREATE TABLE aggregationRepo3_completed 
 </div></div>
 
 <h4><a shape="rect" name="BookComponentAppendix-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="BookComponentAppendix-Transaction"></a>Transaction</h4>
+
 <p>A Spring <tt>PlatformTransactionManager</tt> is required to orchestrate transaction.</p>
 
 <h4><a shape="rect" name="BookComponentAppendix-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="BookComponentAppendix-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>
@@ -17580,7 +17597,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>
 

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Sun Aug 11 00:18:53 2013
@@ -38583,7 +38583,7 @@ protected RouteBuilder createRouteBuilde
 
 <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">
@@ -38616,7 +38616,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]
@@ -38636,7 +38636,11 @@ sql:select * from table where id=:#myId 
 <h3><a shape="rect" name="BookInOnePage-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>
 
@@ -38662,6 +38666,7 @@ sql:select * from table where id=:#myId 
 
 
 <h3><a shape="rect" name="BookInOnePage-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">
@@ -38671,7 +38676,8 @@ sql:select * from table where id=# order
 </div></div>
 
 <h3><a shape="rect" name="BookInOnePage-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">
@@ -38729,11 +38735,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="BookInOnePage-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">
@@ -38757,6 +38764,7 @@ for the named parameters:</p>
 </div></div>
 
 <h3><a shape="rect" name="BookInOnePage-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>
@@ -38816,6 +38824,7 @@ CREATE TABLE CAMEL_MESSAGEPROCESSED (
 </div></div>
 
 <h4><a shape="rect" name="BookInOnePage-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>
@@ -38838,6 +38847,7 @@ CREATE TABLE CAMEL_MESSAGEPROCESSED (
 </div></div>
 
 <h3><a shape="rect" name="BookInOnePage-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">
@@ -38851,12 +38861,14 @@ The <tt>JdbcAggregationRepository</tt> a
 
 
 <h4><a shape="rect" name="BookInOnePage-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="BookInOnePage-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">
@@ -38866,7 +38878,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>
 
@@ -38895,6 +38907,7 @@ CREATE TABLE aggregation_completed (
 </div></div>
 
 <h4><a shape="rect" name="BookInOnePage-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>
@@ -38939,17 +38952,21 @@ CREATE TABLE aggregationRepo3_completed 
 </div></div>
 
 <h4><a shape="rect" name="BookInOnePage-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="BookInOnePage-Transaction"></a>Transaction</h4>
+
 <p>A Spring <tt>PlatformTransactionManager</tt> is required to orchestrate transaction.</p>
 
 <h4><a shape="rect" name="BookInOnePage-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="BookInOnePage-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>
@@ -38999,7 +39016,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>
 

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



Mime
View raw message