camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r847017 [1/2] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2110-release.html sql-component.html
Date Thu, 17 Jan 2013 15:25:13 GMT
Author: buildbot
Date: Thu Jan 17 15:25:12 2013
New Revision: 847017

Log:
Production update by buildbot for camel

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/camel-2110-release.html
    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 Thu Jan 17 15:25:12 2013
@@ -16312,7 +16312,7 @@ 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
 " rowspan="1" class="confluenceTd"> 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>allowNamedParameters</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>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="confluenceTd"> <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 fixe
 d 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 maximum 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 e
 ach row then this query can be executed to for example delete or mark the row as processed. 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 us
 ed 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></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
 " rowspan="1" class="confluenceTd"> 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>allowNamedParameters</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" rowspan="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="confluenceTd"> <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 maximum 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 proce
 ssed 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 to for example delete 
 or mark the row as processed. 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></tbody></table>
 </div>
 </div>
 
@@ -16514,7 +16514,7 @@ The <tt>JdbcAggregationRepository</tt> a
 
 <p>It has the following options:</p>
 <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"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>DataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>javax.sql.DataSource</tt> to use for accessing the database. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>repositoryName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The name of the repository. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>TransactionManager</tt> </td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>org.springframework.transaction.PlatformTransactionManager</tt> to mange transactions for the database. The TransactionManager must be able to support databases. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>lobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>LobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> A <tt>org.springframework.jdbc.support.lob.LobHandler</tt> to handle Lob types in the database. Use this option to use a vendor specific LobHandler, for example when using Oracle. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>returnOldExchange</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the get operation should return the old existing Exchange if any existed. By default this option is <tt>false</tt> to optimize as we do not need the old exchange 
 when aggregating. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>useRecovery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not recovery is enabled. This option is by default <tt>true</tt>. When enabled the Camel <a shape="rect" href="aggregator2.html" title="Aggregator2">Aggregator</a> automatic recover failed aggregated exchange and have them resubmitted. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>recoveryInterval</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> long </td><td colspan="1" rowspan="1" class="confluenceTd"> If recovery is enabled then a background task is run every x'th time to scan for failed exchanges to recover and resubmit. By default this interval is 5000 millis. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maximumRedeliveries</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> int 
 </td><td colspan="1" rowspan="1" class="confluenceTd"> Allows you to limit the maximum number of redelivery attempts for a recovered exchange. If enabled then the Exchange will be moved to the dead letter channel if all redelivery attempts failed. By default this option is disabled. If this option is used then the <tt>deadLetterUri</tt> option must also be provided. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>deadLetterUri</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> An endpoint uri for a <a shape="rect" href="dead-letter-channel.html" title="Dead Letter Channel">Dead Letter Channel</a> where exhausted recovered Exchanges will be moved. If this option is used then the <tt>maximumRedeliveries</tt> option must also be provided. </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"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>DataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>javax.sql.DataSource</tt> to use for accessing the database. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>repositoryName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The name of the repository. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>TransactionManager</tt> </td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>org.springframework.transaction.PlatformTransactionManager</tt> to mange transactions for the database. The TransactionManager must be able to support databases. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>lobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>LobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> A <tt>org.springframework.jdbc.support.lob.LobHandler</tt> to handle Lob types in the database. Use this option to use a vendor specific LobHandler, for example when using Oracle. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>returnOldExchange</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the get operation should return the old existing Exchange if any existed. By default this option is <tt>false</tt> to optimize as we do not need the old exchange 
 when aggregating. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>useRecovery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not recovery is enabled. This option is by default <tt>true</tt>. When enabled the Camel <a shape="rect" href="aggregator2.html" title="Aggregator2">Aggregator</a> automatic recover failed aggregated exchange and have them resubmitted. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>recoveryInterval</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> long </td><td colspan="1" rowspan="1" class="confluenceTd"> If recovery is enabled then a background task is run every x'th time to scan for failed exchanges to recover and resubmit. By default this interval is 5000 millis. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maximumRedeliveries</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> int 
 </td><td colspan="1" rowspan="1" class="confluenceTd"> Allows you to limit the maximum number of redelivery attempts for a recovered exchange. If enabled then the Exchange will be moved to the dead letter channel if all redelivery attempts failed. By default this option is disabled. If this option is used then the <tt>deadLetterUri</tt> option must also be provided. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>deadLetterUri</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> An endpoint uri for a <a shape="rect" href="dead-letter-channel.html" title="Dead Letter Channel">Dead Letter Channel</a> where exhausted recovered Exchanges will be moved. If this option is used then the <tt>maximumRedeliveries</tt> option must also be provided. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>storeBodyAsText</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean 
 </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Whether to store the message body as String which is human readable. By default this option is <tt>false</tt> storing the body in binary format. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>headersToStoreAsText</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>List&lt;String&gt;</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Allows to store headers as String which is human readable. By default this option is disabled, storing the headers in binary format. </td></tr></tbody></table>
 </div>
 
 
@@ -16522,6 +16522,8 @@ 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>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>
 
@@ -16561,6 +16563,50 @@ CREATE TABLE aggregation_completed (
 </pre>
 </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>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+CREATE TABLE aggregationRepo3 (
+    id varchar(255) NOT NULL,
+    exchange blob NOT NULL,
+    body varchar(1000),
+    companyName varchar(1000),
+    accountName varchar(1000),
+    constraint aggregationRepo3_pk PRIMARY KEY (id)
+);
+CREATE TABLE aggregationRepo3_completed (
+    id varchar(255) NOT NULL,
+    exchange blob NOT NULL,
+    body varchar(1000),
+    companyName varchar(1000),
+    accountName varchar(1000),
+    constraint aggregationRepo3_completed_pk PRIMARY KEY (id)
+);
+</pre>
+</div></div>
+
+<p>And then configure the repository to enable this behavior as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+    <span class="code-tag">&lt;bean id=<span class="code-quote">"repo3"</span> class=<span class="code-quote">"org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"</span>&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"repositoryName"</span> value=<span class="code-quote">"aggregationRepo3"</span>/&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"transactionManager"</span> ref=<span class="code-quote">"txManager3"</span>/&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"dataSource"</span> ref=<span class="code-quote">"dataSource3"</span>/&gt;</span>
+        <span class="code-tag"><span class="code-comment">&lt;!-- configure to store the message body and following headers as text in the repo --&gt;</span></span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"storeBodyAsText"</span> value=<span class="code-quote">"true"</span>/&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"headersToStoreAsText"</span>&gt;</span>
+          <span class="code-tag">&lt;list&gt;</span>
+      	    <span class="code-tag">&lt;value&gt;</span>companyName<span class="code-tag">&lt;/value&gt;</span>
+    	    <span class="code-tag">&lt;value&gt;</span>accountName<span class="code-tag">&lt;/value&gt;</span>
+          <span class="code-tag">&lt;/list&gt;</span>
+        <span class="code-tag">&lt;/property&gt;</span>
+    <span class="code-tag">&lt;/bean&gt;</span>
+</pre>
+</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>
 

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 Thu Jan 17 15:25:12 2013
@@ -36526,6 +36526,19 @@ sql:select * from table where id=# order
 </pre>
 </div></div>
 
+<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">
+<pre class="code-java">
+sql:select * from table where id=#:myId order by name[?options]
+</pre>
+</div></div>
+
+<p>When using named parameters, Camel will lookup the names from, in the given precedence:<br clear="none">
+1. from message body if its a <tt>java.util.Map</tt><br clear="none">
+2. from message headers</p>
+
+<p>If a named parameter cannot be resolved, then an exception is thrown.</p>
+
 <p>Notice that the standard <tt>?</tt> symbol that denotes the parameters to an SQL query is substituted with the <tt>#</tt> symbol, because the <tt>?</tt> symbol is used to specify options for the endpoint. The <tt>?</tt> symbol replacement can be configured on endpoint basis.</p>
 
 <p>You can append query options to the URI in the following format, <tt>?option=value&amp;option=value&amp;...</tt></p>
@@ -36533,7 +36546,7 @@ sql:select * from table where id=# order
 <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
 " rowspan="1" class="confluenceTd"> 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) </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>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> Millis
 econds before polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <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 int
 eger value to define the maximum number of messages to gather per poll. By default, no maximum 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="r
 ect" 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.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.onCons
 ume</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></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
 " rowspan="1" class="confluenceTd"> 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>allowNamedParameters</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" rowspan="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="confluenceTd"> <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 maximum 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 proce
 ssed 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 to for example delete 
 or mark the row as processed. 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></tbody></table>
 </div>
 </div>
 
@@ -36626,6 +36639,29 @@ mock.assertIsSatisfied();
 </pre>
 </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">
+Camel will then lookup for these parameters from the message body or message headers. Notice in the example above we set two headers with constant value<br clear="none">
+for the named parameters:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+   from(<span class="code-quote">"direct:projects"</span>)
+     .setHeader(<span class="code-quote">"lic"</span>, constant(<span class="code-quote">"ASF"</span>))
+     .setHeader(<span class="code-quote">"min"</span>, constant(123))
+     .to(<span class="code-quote">"sql:select * from projects where license = :#lic and id &gt; :#min order by id"</span>)
+</pre>
+</div></div>
+
+<p>Though if the message body is a <tt>java.util.Map</tt> then the named parameters will be taken from the body.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+   from(<span class="code-quote">"direct:projects"</span>)
+     .to(<span class="code-quote">"sql:select * from projects where license = :#lic and id &gt; :#min order by id"</span>)
+</pre>
+</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>
 
@@ -36712,7 +36748,7 @@ The <tt>JdbcAggregationRepository</tt> a
 
 <p>It has the following options:</p>
 <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"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>DataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>javax.sql.DataSource</tt> to use for accessing the database. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>repositoryName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The name of the repository. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>TransactionManager</tt> </td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>org.springframework.transaction.PlatformTransactionManager</tt> to mange transactions for the database. The TransactionManager must be able to support databases. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>lobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>LobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> A <tt>org.springframework.jdbc.support.lob.LobHandler</tt> to handle Lob types in the database. Use this option to use a vendor specific LobHandler, for example when using Oracle. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>returnOldExchange</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the get operation should return the old existing Exchange if any existed. By default this option is <tt>false</tt> to optimize as we do not need the old exchange 
 when aggregating. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>useRecovery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not recovery is enabled. This option is by default <tt>true</tt>. When enabled the Camel <a shape="rect" href="aggregator2.html" title="Aggregator2">Aggregator</a> automatic recover failed aggregated exchange and have them resubmitted. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>recoveryInterval</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> long </td><td colspan="1" rowspan="1" class="confluenceTd"> If recovery is enabled then a background task is run every x'th time to scan for failed exchanges to recover and resubmit. By default this interval is 5000 millis. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maximumRedeliveries</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> int 
 </td><td colspan="1" rowspan="1" class="confluenceTd"> Allows you to limit the maximum number of redelivery attempts for a recovered exchange. If enabled then the Exchange will be moved to the dead letter channel if all redelivery attempts failed. By default this option is disabled. If this option is used then the <tt>deadLetterUri</tt> option must also be provided. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>deadLetterUri</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> An endpoint uri for a <a shape="rect" href="dead-letter-channel.html" title="Dead Letter Channel">Dead Letter Channel</a> where exhausted recovered Exchanges will be moved. If this option is used then the <tt>maximumRedeliveries</tt> option must also be provided. </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"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>dataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>DataSource</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>javax.sql.DataSource</tt> to use for accessing the database. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>repositoryName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Mandatory:</b> The name of the repository. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>TransactionManager</tt> </td><td colspan="1" rowspa
 n="1" class="confluenceTd"> <b>Mandatory:</b> The <tt>org.springframework.transaction.PlatformTransactionManager</tt> to mange transactions for the database. The TransactionManager must be able to support databases. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>lobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>LobHandler</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> A <tt>org.springframework.jdbc.support.lob.LobHandler</tt> to handle Lob types in the database. Use this option to use a vendor specific LobHandler, for example when using Oracle. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>returnOldExchange</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the get operation should return the old existing Exchange if any existed. By default this option is <tt>false</tt> to optimize as we do not need the old exchange 
 when aggregating. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>useRecovery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not recovery is enabled. This option is by default <tt>true</tt>. When enabled the Camel <a shape="rect" href="aggregator2.html" title="Aggregator2">Aggregator</a> automatic recover failed aggregated exchange and have them resubmitted. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>recoveryInterval</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> long </td><td colspan="1" rowspan="1" class="confluenceTd"> If recovery is enabled then a background task is run every x'th time to scan for failed exchanges to recover and resubmit. By default this interval is 5000 millis. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maximumRedeliveries</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> int 
 </td><td colspan="1" rowspan="1" class="confluenceTd"> Allows you to limit the maximum number of redelivery attempts for a recovered exchange. If enabled then the Exchange will be moved to the dead letter channel if all redelivery attempts failed. By default this option is disabled. If this option is used then the <tt>deadLetterUri</tt> option must also be provided. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>deadLetterUri</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> An endpoint uri for a <a shape="rect" href="dead-letter-channel.html" title="Dead Letter Channel">Dead Letter Channel</a> where exhausted recovered Exchanges will be moved. If this option is used then the <tt>maximumRedeliveries</tt> option must also be provided. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>storeBodyAsText</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean 
 </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Whether to store the message body as String which is human readable. By default this option is <tt>false</tt> storing the body in binary format. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>headersToStoreAsText</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>List&lt;String&gt;</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Allows to store headers as String which is human readable. By default this option is disabled, storing the headers in binary format. </td></tr></tbody></table>
 </div>
 
 
@@ -36720,6 +36756,8 @@ 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>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>
 
@@ -36759,6 +36797,50 @@ CREATE TABLE aggregation_completed (
 </pre>
 </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>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+CREATE TABLE aggregationRepo3 (
+    id varchar(255) NOT NULL,
+    exchange blob NOT NULL,
+    body varchar(1000),
+    companyName varchar(1000),
+    accountName varchar(1000),
+    constraint aggregationRepo3_pk PRIMARY KEY (id)
+);
+CREATE TABLE aggregationRepo3_completed (
+    id varchar(255) NOT NULL,
+    exchange blob NOT NULL,
+    body varchar(1000),
+    companyName varchar(1000),
+    accountName varchar(1000),
+    constraint aggregationRepo3_completed_pk PRIMARY KEY (id)
+);
+</pre>
+</div></div>
+
+<p>And then configure the repository to enable this behavior as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+    <span class="code-tag">&lt;bean id=<span class="code-quote">"repo3"</span> class=<span class="code-quote">"org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"</span>&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"repositoryName"</span> value=<span class="code-quote">"aggregationRepo3"</span>/&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"transactionManager"</span> ref=<span class="code-quote">"txManager3"</span>/&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"dataSource"</span> ref=<span class="code-quote">"dataSource3"</span>/&gt;</span>
+        <span class="code-tag"><span class="code-comment">&lt;!-- configure to store the message body and following headers as text in the repo --&gt;</span></span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"storeBodyAsText"</span> value=<span class="code-quote">"true"</span>/&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"headersToStoreAsText"</span>&gt;</span>
+          <span class="code-tag">&lt;list&gt;</span>
+      	    <span class="code-tag">&lt;value&gt;</span>companyName<span class="code-tag">&lt;/value&gt;</span>
+    	    <span class="code-tag">&lt;value&gt;</span>accountName<span class="code-tag">&lt;/value&gt;</span>
+          <span class="code-tag">&lt;/list&gt;</span>
+        <span class="code-tag">&lt;/property&gt;</span>
+    <span class="code-tag">&lt;/bean&gt;</span>
+</pre>
+</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>
 

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



Mime
View raw message