camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r987146 [4/5] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2180-release.html elsql.html sql-component.html
Date Sat, 30 Apr 2016 09:23:15 GMT
Modified: websites/production/camel/content/camel-2180-release.html
==============================================================================
--- websites/production/camel/content/camel-2180-release.html (original)
+++ websites/production/camel/content/camel-2180-release.html Sat Apr 30 09:23:15 2016
@@ -85,7 +85,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h1 id="Camel2.18.0Release-Camel2.18.0release(currentlyinprogress)">Camel 2.18.0 release (currently in progress)</h1><div style="padding-right:20px;float:left;margin-left:-20px;"><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png" data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"></span></p></div><div style="min-height:200px">&#160;</div><h2 id="Camel2.18.0Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to the 2.18.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)</p><ul><li>Added <a shape="rect" href="hystrix-eip.html">Hystrix EIP</a> as EIP pattern that uses native Hystrix as the Circuit Breaker implementation.&#160;This requires having&#160;<code>camel-hsytrix</code>&#160;on the classpath.</li><li>Improved the&#160;<a 
 shape="rect" href="bean.html">Bean</a> component to better match method parameter types when using&#160;<a shape="rect" href="simple.html">Simple</a> language as parameter values.</li><li>Added&#160;<code>BindyConverter</code> that allows to implement custom data converters for&#160;<a shape="rect" href="bindy.html">Bindy</a></li><li>The access in the&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> has been deprecated and no longer in use - its not part of swagger specification anymore.</li><li><a shape="rect" href="nats.html">Camel-NATS</a>&#160;now uses JNATS client instead of the deprecated Java_nats one.</li><li>During startup of&#160;<a shape="rect" href="camelcontext.html">CamelContext</a> the services that are used as part of routes are now deferred being started to the end of the startup process. Some IoC frameworks like Spring can otherwise causes a circular dependency issue if services are started too early. A side effect is that if service startup failures happen w
 hen being started later, they are now wrapped in the <code>FailedToStartupRouteException</code> to better pin point which route thas the problem.</li><li>Improved the startup sequence of&#160;<a shape="rect" href="spring-java-config.html">Spring Java Config</a> to be similar to&#160;<a shape="rect" href="spring-boot.html">Spring Boot</a> that helps prevent Spring initialization errors about circular dependencies issues.</li><li>Added PATCH to&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a></li><li>Added "starts with" and "ends with" operator to the <a shape="rect" href="simple.html">Simple</a>&#160;language.</li><li>Added&#160;<code>BeanIOSplitter</code> to&#160;<a shape="rect" href="beanio.html">BeanIO</a> that can be used with the&#160;<a shape="rect" href="splitter.html">Splitter</a> EIP to split big payloads in streaming mode without reading the entire content into memory.</li><li>Some of the <a shape="rect" href="aws.html">AWS</a>&#160;components allows to specify ARN in
  the endpoint configuration.&#160;</li><li>The create operation in&#160;<a shape="rect" href="zookeeper.html">Zookeeper</a> now creates sub paths if missing.</li><li>Added support for async mode for&#160;<a shape="rect" href="servlet.html">SERVLET</a> component to leverage Asynchronous Servlet from the Servlet 3.0 spec.</li><li><a shape="rect" href="bean.html">Bean</a>&#160;component and <a shape="rect" href="bean-language.html">Bean Language</a>&#160;validates method name must be a valid according to java identifier rules, and also if parameter syntax has an ending parenthesis.</li><li>You can now use&#160;<code>@RunWith(CamelSpringBootJUnit4ClassRunner.class)</code> to test Camel&#160;<a shape="rect" href="spring-boot.html">Spring Boot</a>&#160;applications and use the Camel test annotations from&#160;<a shape="rect" href="spring-testing.html">Spring Testing</a> such as&#160;<code>@MockEndpoints</code>.</li><li>To turn on logging exhausted message body with the message history you
  can configure this easily on the CamelContext level with&#160;<code>setLogExhaustedMessageBody</code></li><li><a shape="rect" href="infinispan.html">Camel-Infinispan</a> now supports Aggregation Repository: InfinispanLocalAggregationRepository and InfinispanRemoteAggregationRepository</li><li><a shape="rect" href="cdi.html">Camel CDI</a> now supports importing Camel XML configuration files</li><li><a shape="rect" href="cdi.html">Camel CDI</a>&#160;does not deploy an empty Camel context bean anymore if not route builder beans nor Camel beans are deployed</li><li><a shape="rect" href="cdi.html">Camel CDI</a>&#160;adds the&#160;<code>@Named</code> qualifier to Camel route management events so that it's possible to observe these events for a specific route with an explicit <code>id</code></li></ul><p>Fixed these issues:</p><ul><li>Fixed&#160;<a shape="rect" href="bean.html">Bean</a> component to avoid ambiguous error for classes that extends generic interface and calling which could le
 ad to falsely duplicate methods (due Java type erasure inserts bridge methods)&#160;</li><li>Fixed splitting using&#160;tarfile could cause OOME if splitting big files which was mistakenly loaded into memory. Now we work on the tar stream directly.</li><li>Fixed&#160;<a shape="rect" href="netty-http.html">Netty HTTP</a> and&#160;<a shape="rect" href="netty4-http.html">Netty4 HTTP</a> issue when not specifying a port number then port 80 would not be used but an error about port -1 is not allowed.</li><li>Fixed&#160;<a shape="rect" href="swagger-java.html">Swagger Java</a> when using property placeholders in&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> could cause invalid parameters to be included that was from the placeholder.</li><li>The&#160;<code>threads</code>&#160;EIP now lets&#160;<a shape="rect" href="error-handling-in-camel.html">Error handling in Camel</a>&#160;perform redeliveries if the thread pool would otherwise reject accepting the task. This allows the error 
 handler to perform redeliveries to attempt to put the task on the thread pool queue, or eventually move the message to a dead letter queue etc.</li><li>Fixed&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> adding empty header if specifying a non required query parameter that has no default value assigned.</li><li>Fixed <a shape="rect" href="loop.html">doWhile</a> loop which could potentially loop forever.</li><li>Fixed a NPE in&#160;<a shape="rect" href="zookeeper.html">Zookeeper</a> consumer if no zookeeper node path was set</li><li>Spring-DM for OSGi moved out of camel-spring into a separate camel-spring-dm module.</li><li>When using continued with <a shape="rect" href="exception-clause.html">onException</a> then dead letter channel endpooint should not be invoked.</li><li>Fixed&#160;<a shape="rect" href="error-handler.html">Error Handler</a> to not log exceptions when using&#160;<code>continued(true)</code> by default.</li><li>Fixed so using shareUnitOfWork would now also 
 call specialized&#160;<code>AggregationStrategy</code>&#160;for onTimeout, onCompletion etc.</li><li>Fixed&#160;<a shape="rect" href="jetty.html">Jetty</a> consumer incorrectly handle multipart/form data not being mapped as attachments on the Camel Message.</li></ul><h3 id="Camel2.18.0Release-New">New <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></h3><h3 id="Camel2.18.0Release-New.1">New <a shape="rect" href="components.html">Components</a></h3><ul><li>camel-cm-sms - For sending SMS messages using SM SMS Gateway</li><li><a shape="rect" href="flink.html">camel-flink</a> - Bridges Camel connectors with Apache Flink tasks.</li><li><a shape="rect" href="hystrix.html">camel-hystrix</a>&#160;- For implementing circuit breaker, timeouts, bulkheads, caching, etc.</li><li>camel-servicenow - For cloud management with ServiceNow</li><li><a shape="rect" href="camel-zipkin.html">camel-zipkin</a> - For tracking Camel message flows/timings using <a
  shape="rect" class="external-link" href="http://zipkin.io/" style="line-height: 1.42857;" rel="nofollow">zipkin</a></li></ul><h3 id="Camel2.18.0Release-NewDSL">New DSL</h3><ul><li><a shape="rect" href="hystrix-eip.html">hystrix</a> - Using Hystrix as circuit breaker. This requires having&#160;<code>camel-hsytrix</code> on the classpath.</li></ul><h3 id="Camel2.18.0Release-NewAnnotations">New Annotations</h3><h3 id="Camel2.18.0Release-NewDataFormats">New <a shape="rect" href="data-format.html">Data Formats</a></h3><h3 id="Camel2.18.0Release-New.2">New <a shape="rect" href="languages.html">Languages</a></h3><h3 id="Camel2.18.0Release-New.3">New <a shape="rect" href="examples.html">Examples</a></h3><ul><li><code>camel-example-cdi-xml</code>: i<span style="color: rgb(0,0,0);">llustrates the use of Camel XML configuration files into a Camel CDI application</span></li></ul><h3 id="Camel2.18.0Release-New.4">New <a shape="rect" href="tutorials.html">Tutorials</a></h3><h2 id="Camel2.18.0Rel
 ease-APIbreaking">API breaking</h2><h2 id="Camel2.18.0Release-KnownIssues">Known Issues</h2><h2 id="Camel2.18.0Release-Importantchangestoconsiderwhenupgrading">Important changes to consider when upgrading</h2><ul><li><strong>Java 1.8 is now required.</strong></li><li>karaf 2.4.x is no longer supported</li><li>spring 4.0 is no longer supported</li><li>Jetty 8.x is not longer supported and camel-jetty8 has been removed</li><li>removed camel-test-spring40 module</li><li>spring 3.x is no longer supported<br clear="none">(only spring-dm using spring 3.2.x as part of camel-spring in osgi/karaf is still in use - but spring-dm is deprecated and we recommend using blueprint)</li><li>Spring-DM for OSGi moved out of camel-spring into a separate camel-spring-dm module. If using Spring XML with Spring-DM then you need to install camel-spring-dm feature in Karaf/ServiceMix.</li><li>The deprecated <code>@LazyLoadTypeConverter</code> has been removed from all&#160;<a shape="rect" href="camel-test.h
 tml">Camel Test</a> modules</li><li>camel-gae has been removed (was not working anyway)</li><li>The access in the&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> has been deprecated and no longer in use - its not part of swagger specification anymore.</li><li>Removed the deprecated maven archetypes for SOAP WS using CXF with OSGi Blueprint<br clear="none"><br clear="none"><br clear="none"></li></ul><h2 id="Camel2.18.0Release-GettingtheDistributions">Getting the Distributions</h2><h3 id="Camel2.18.0Release-BinaryDistributions">Binary Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Windows Distribution</p></td><td colspan="1" rowspan="1" class="confl
 uenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip">apache-camel-x.y.x.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip.asc">apache-camel-x.y.x.zip.asc</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Unix/Linux/Cygwin Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz">apache-camel-x.y.x.tar.gz</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz.asc">apache-camel-x.y.x.tar.gz.asc</a></p></td></tr></tbody></table></div><div class="confluence-information
 -macro confluence-information-macro-information"><p class="title">The above URLs use redirection</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using <a shape="rect" class="external-link" href="http://www.mozilla.com/en-US/firefox/" rel="nofollow">FireFox</a></p></div></div><h3 id="Camel2.18.0Release-SourceDistributions">Source Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature 
 file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Source for Windows</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip">apache-camel-x.y.x-src.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip.asc">apache-camel-x.y.x-src.zip.asc</a></p></td></tr></tbody></table></div><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Source for Unix/Linux/Cygwin</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz">apache-camel-x.y.x-src.tar.gz</a></p></td><td colspan="1" rowspan
 ="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz.asc">apache-camel-x.y.x-src.tar.gz.asc</a></p></td></tr></tbody></table></div><h3 id="Camel2.18.0Release-GettingtheBinariesusingMaven2">Getting the Binaries using Maven 2</h3><p>To use this release in your maven project, the proper dependency configuration that you should use in your <a shape="rect" class="external-link" href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html">Maven POM</a> is:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h1 id="Camel2.18.0Release-Camel2.18.0release(currentlyinprogress)">Camel 2.18.0 release (currently in progress)</h1><div style="padding-right:20px;float:left;margin-left:-20px;"><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png" data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"></span></p></div><div style="min-height:200px">&#160;</div><h2 id="Camel2.18.0Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to the 2.18.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)</p><ul><li>Added <a shape="rect" href="hystrix-eip.html">Hystrix EIP</a> as EIP pattern that uses native Hystrix as the Circuit Breaker implementation.&#160;This requires having&#160;<code>camel-hsytrix</code>&#160;on the classpath.</li><li>Improved the&#160;<a 
 shape="rect" href="bean.html">Bean</a> component to better match method parameter types when using&#160;<a shape="rect" href="simple.html">Simple</a> language as parameter values.</li><li>Added&#160;<code>BindyConverter</code> that allows to implement custom data converters for&#160;<a shape="rect" href="bindy.html">Bindy</a></li><li>The access in the&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> has been deprecated and no longer in use - its not part of swagger specification anymore.</li><li><a shape="rect" href="nats.html">Camel-NATS</a>&#160;now uses JNATS client instead of the deprecated Java_nats one.</li><li>During startup of&#160;<a shape="rect" href="camelcontext.html">CamelContext</a> the services that are used as part of routes are now deferred being started to the end of the startup process. Some IoC frameworks like Spring can otherwise causes a circular dependency issue if services are started too early. A side effect is that if service startup failures happen w
 hen being started later, they are now wrapped in the <code>FailedToStartupRouteException</code> to better pin point which route thas the problem.</li><li>Improved the startup sequence of&#160;<a shape="rect" href="spring-java-config.html">Spring Java Config</a> to be similar to&#160;<a shape="rect" href="spring-boot.html">Spring Boot</a> that helps prevent Spring initialization errors about circular dependencies issues.</li><li>Added PATCH to&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a></li><li>Added "starts with" and "ends with" operator to the <a shape="rect" href="simple.html">Simple</a>&#160;language.</li><li>Added&#160;<code>BeanIOSplitter</code> to&#160;<a shape="rect" href="beanio.html">BeanIO</a> that can be used with the&#160;<a shape="rect" href="splitter.html">Splitter</a> EIP to split big payloads in streaming mode without reading the entire content into memory.</li><li>Some of the <a shape="rect" href="aws.html">AWS</a>&#160;components allows to specify ARN in
  the endpoint configuration.&#160;</li><li>The create operation in&#160;<a shape="rect" href="zookeeper.html">Zookeeper</a> now creates sub paths if missing.</li><li>Added support for async mode for&#160;<a shape="rect" href="servlet.html">SERVLET</a> component to leverage Asynchronous Servlet from the Servlet 3.0 spec.</li><li><a shape="rect" href="bean.html">Bean</a>&#160;component and <a shape="rect" href="bean-language.html">Bean Language</a>&#160;validates method name must be a valid according to java identifier rules, and also if parameter syntax has an ending parenthesis.</li><li>You can now use&#160;<code>@RunWith(CamelSpringBootJUnit4ClassRunner.class)</code> to test Camel&#160;<a shape="rect" href="spring-boot.html">Spring Boot</a>&#160;applications and use the Camel test annotations from&#160;<a shape="rect" href="spring-testing.html">Spring Testing</a> such as&#160;<code>@MockEndpoints</code>.</li><li>To turn on logging exhausted message body with the message history you
  can configure this easily on the CamelContext level with&#160;<code>setLogExhaustedMessageBody</code></li><li><a shape="rect" href="infinispan.html">Camel-Infinispan</a> now supports Aggregation Repository: InfinispanLocalAggregationRepository and InfinispanRemoteAggregationRepository</li><li>The&#160;<a shape="rect" href="sql-component.html">SQL Component</a> now supports <code>outputType=StreamList</code>&#160;in the producer to use an iterator for the output of the SQL query that allows to process the data in a streaming fashion such as with the&#160;<a shape="rect" href="splitter.html">Splitter</a> EIP to process the data row by row, and load data from the database as needed.</li><li><a shape="rect" href="cdi.html">Camel CDI</a> now supports importing Camel XML configuration files</li><li><a shape="rect" href="cdi.html">Camel CDI</a>&#160;does not deploy an empty Camel context bean anymore if not route builder beans nor Camel beans are deployed</li><li><a shape="rect" href="cdi
 .html">Camel CDI</a>&#160;adds the&#160;<code>@Named</code> qualifier to Camel route management events so that it's possible to observe these events for a specific route with an explicit <code>id</code></li></ul><p>Fixed these issues:</p><ul><li>Fixed&#160;<a shape="rect" href="bean.html">Bean</a> component to avoid ambiguous error for classes that extends generic interface and calling which could lead to falsely duplicate methods (due Java type erasure inserts bridge methods)&#160;</li><li>Fixed splitting using&#160;tarfile could cause OOME if splitting big files which was mistakenly loaded into memory. Now we work on the tar stream directly.</li><li>Fixed&#160;<a shape="rect" href="netty-http.html">Netty HTTP</a> and&#160;<a shape="rect" href="netty4-http.html">Netty4 HTTP</a> issue when not specifying a port number then port 80 would not be used but an error about port -1 is not allowed.</li><li>Fixed&#160;<a shape="rect" href="swagger-java.html">Swagger Java</a> when using prope
 rty placeholders in&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> could cause invalid parameters to be included that was from the placeholder.</li><li>The&#160;<code>threads</code>&#160;EIP now lets&#160;<a shape="rect" href="error-handling-in-camel.html">Error handling in Camel</a>&#160;perform redeliveries if the thread pool would otherwise reject accepting the task. This allows the error handler to perform redeliveries to attempt to put the task on the thread pool queue, or eventually move the message to a dead letter queue etc.</li><li>Fixed&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> adding empty header if specifying a non required query parameter that has no default value assigned.</li><li>Fixed <a shape="rect" href="loop.html">doWhile</a> loop which could potentially loop forever.</li><li>Fixed a NPE in&#160;<a shape="rect" href="zookeeper.html">Zookeeper</a> consumer if no zookeeper node path was set</li><li>Spring-DM for OSGi moved out of camel-spring in
 to a separate camel-spring-dm module.</li><li>When using continued with <a shape="rect" href="exception-clause.html">onException</a> then dead letter channel endpooint should not be invoked.</li><li>Fixed&#160;<a shape="rect" href="error-handler.html">Error Handler</a> to not log exceptions when using&#160;<code>continued(true)</code> by default.</li><li>Fixed so using shareUnitOfWork would now also call specialized&#160;<code>AggregationStrategy</code>&#160;for onTimeout, onCompletion etc.</li><li>Fixed&#160;<a shape="rect" href="jetty.html">Jetty</a> consumer incorrectly handle multipart/form data not being mapped as attachments on the Camel Message.</li></ul><h3 id="Camel2.18.0Release-New">New <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></h3><h3 id="Camel2.18.0Release-New.1">New <a shape="rect" href="components.html">Components</a></h3><ul><li>camel-cm-sms - For sending SMS messages using SM SMS Gateway</li><li><a shape="rect" hr
 ef="flink.html">camel-flink</a> - Bridges Camel connectors with Apache Flink tasks.</li><li><a shape="rect" href="hystrix.html">camel-hystrix</a>&#160;- For implementing circuit breaker, timeouts, bulkheads, caching, etc.</li><li>camel-servicenow - For cloud management with ServiceNow</li><li><a shape="rect" href="camel-zipkin.html">camel-zipkin</a> - For tracking Camel message flows/timings using <a shape="rect" class="external-link" href="http://zipkin.io/" style="line-height: 1.42857;" rel="nofollow">zipkin</a></li></ul><h3 id="Camel2.18.0Release-NewDSL">New DSL</h3><ul><li><a shape="rect" href="hystrix-eip.html">hystrix</a> - Using Hystrix as circuit breaker. This requires having&#160;<code>camel-hsytrix</code> on the classpath.</li></ul><h3 id="Camel2.18.0Release-NewAnnotations">New Annotations</h3><h3 id="Camel2.18.0Release-NewDataFormats">New <a shape="rect" href="data-format.html">Data Formats</a></h3><h3 id="Camel2.18.0Release-New.2">New <a shape="rect" href="languages.html
 ">Languages</a></h3><h3 id="Camel2.18.0Release-New.3">New <a shape="rect" href="examples.html">Examples</a></h3><ul><li><code>camel-example-cdi-xml</code>: i<span style="color: rgb(0,0,0);">llustrates the use of Camel XML configuration files into a Camel CDI application</span></li></ul><h3 id="Camel2.18.0Release-New.4">New <a shape="rect" href="tutorials.html">Tutorials</a></h3><h2 id="Camel2.18.0Release-APIbreaking">API breaking</h2><h2 id="Camel2.18.0Release-KnownIssues">Known Issues</h2><h2 id="Camel2.18.0Release-Importantchangestoconsiderwhenupgrading">Important changes to consider when upgrading</h2><ul><li><strong>Java 1.8 is now required.</strong></li><li>karaf 2.4.x is no longer supported</li><li>spring 4.0 is no longer supported</li><li>Jetty 8.x is not longer supported and camel-jetty8 has been removed</li><li>removed camel-test-spring40 module</li><li>spring 3.x is no longer supported<br clear="none">(only spring-dm using spring 3.2.x as part of camel-spring in osgi/karaf
  is still in use - but spring-dm is deprecated and we recommend using blueprint)</li><li>Spring-DM for OSGi moved out of camel-spring into a separate camel-spring-dm module. If using Spring XML with Spring-DM then you need to install camel-spring-dm feature in Karaf/ServiceMix.</li><li>The deprecated <code>@LazyLoadTypeConverter</code> has been removed from all&#160;<a shape="rect" href="camel-test.html">Camel Test</a> modules</li><li>camel-gae has been removed (was not working anyway)</li><li>The access in the&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> has been deprecated and no longer in use - its not part of swagger specification anymore.</li><li>Removed the deprecated maven archetypes for SOAP WS using CXF with OSGi Blueprint<br clear="none"><br clear="none"><br clear="none"></li></ul><h2 id="Camel2.18.0Release-GettingtheDistributions">Getting the Distributions</h2><h3 id="Camel2.18.0Release-BinaryDistributions">Binary Distributions</h3><div class="table-wrap"><table
  class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Windows Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip">apache-camel-x.y.x.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip.asc">apache-camel-x.y.x.zip.asc</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Unix/Linux/Cygwin Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http:/
 /www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz">apache-camel-x.y.x.tar.gz</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz.asc">apache-camel-x.y.x.tar.gz.asc</a></p></td></tr></tbody></table></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">The above URLs use redirection</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using <a shape="rect" class="external-link" href="http://www.mozilla.com/en-US/
 firefox/" rel="nofollow">FireFox</a></p></div></div><h3 id="Camel2.18.0Release-SourceDistributions">Source Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Source for Windows</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip">apache-camel-x.y.x-src.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip.asc">apache-camel-x.y.x-src.zip.asc</a></p></td></tr></tbody></table></div><div c
 lass="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Source for Unix/Linux/Cygwin</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz">apache-camel-x.y.x-src.tar.gz</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.tar.gz.asc">apache-camel-x.y.x-src.tar.gz.asc</a></p></td></tr></tbody></table></div><h3 id="Camel2.18.0Release-GettingtheBinariesusingMaven2">Getting the Binaries using Maven 2</h3><p>To use this release in your maven project, the proper dependency configuration that you should use in your <a shape="rect" class="external-link" href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html">Maven POM</a> is:</p><div class="cod
 e panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-core&lt;/artifactId&gt;

Modified: websites/production/camel/content/elsql.html
==============================================================================
--- websites/production/camel/content/elsql.html (original)
+++ websites/production/camel/content/elsql.html Sat Apr 30 09:23:15 2016
@@ -96,11 +96,11 @@
 </div></div><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This component can be used as a <a shape="rect" class="external-link" href="http://camel.apache.org/transactional-client.html">Transactional Client</a>.</p></div></div><p>The SQL component uses the following endpoint URI notation:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[sql:elSqlName:resourceUri[?options]
 ]]></script>
-</div></div><p>You can append query options to the URI in the following format,&#160;<code style="line-height: 1.42857;">?option=value&amp;option=value&amp;...</code></p><p>The parameters to the SQL queries are named parameters in the elsql mapping files, and maps to corresponding keys from the Camel message,&#160;in the given precedence:</p><p>1. <strong>Camel 2.16.1:</strong>&#160;from message body if&#160;<a shape="rect" href="simple.html">Simple</a> expression.</p><div>2. from message body if its a <code style="line-height: 1.42857;">java.util.Map<br clear="none"></code>3. from message headers</div><p>If a named parameter cannot be resolved, then an exception is thrown.</p><h3 id="ElSql-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenc
 eTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>resourceUri</code></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required</strong> The resource file which contains the elsql SQL statements to use. You can specify multiple resources separated by comma. The resources are loaded on the classpath by default, you can prefix with file: to load from file system. Notice you can set this option on the component and then you do not have to configure this on the endpoint.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>elSqlConfig</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">To use a specific configured
  ElSqlConfig. It may be better to use the databaseVendor option instead.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>databaseVendor</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">Default</td><td colspan="1" rowspan="1" class="confluenceTd">To use a vendor specific ElSqlConfig. The possible values are: Default, Postgres, HSql, MySql, Oracle, SqlServer2008, Veritca</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>batch</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Execute SQL batch update statements. See notes below on how the treatment of the inbound message body changes if this is set to <code>true</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>dataSour
 ce</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Reference to a <code>DataSource</code> to look up in the registry.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>template.&lt;xxx&gt;</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets additional options on the Spring NamedParameterJdbcTemplate that is used behind the scenes to execute the queries. For instance, <code>template.maxRows=10</code>. For detailed documentation, see the NamedParameterJdbcTemplate javadoc documentation.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1" rowspan="1" class="
 confluenceTd"><p><code>long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>500</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Delay in milliseconds between each poll.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds before polling starts.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.useFixedDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> 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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxMessagesPerPoll</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>An integer value to define the maximum number of messages to gather per poll. By default, no maximum is set.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.useIterator</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code> each row returned when polling will be pro
 cessed individually. If <code>false</code> the entire <code>java.util.List</code> of data is set as the IN body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.routeEmptyResultSet</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to route a single empty <a shape="rect" href="exchange.html">Exchange</a> if there was no data to poll.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.onConsume</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html">Exchange</a> was pr
 ocessed successfully, for example to mark the row as processed. The query can have parameter.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.onConsumeFailed</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html">Exchange</a> failed, for example to mark the row as failed. The query can have parameter.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.onConsumeBatchComplete</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>After processing the entire batch, this query can be 
 executed to bulk update rows etc. The query cannot have parameters.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.breakBatchOnConsumeFail</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If using <code>consumer.onConsume</code> and it fails, then this option controls whether to break out of the batch or continue processing the next row from the batch.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>outputType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SelectList</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Make the output of consumer or producer to <code>SelectList</code> as List of Map, or <code>SelectOne</code> a
 s single Java object in the following way:<br clear="none"> a) If the query has only single column, then that JDBC Column object is returned. (such as <code>SELECT COUNT( * ) FROM PROJECT</code> will return a Long object.<br clear="none"> b) If the query has more than one column, then it will return a Map of that result.<br clear="none"> c) If the <code>outputClass</code> is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with.<br clear="none"> d) If the query resulted in more than one rows, it throws an non-unique result exception.</p><p>Tthe SelectList also supports mapping each row to a Java object as the SelectOne does <span>(only step c)</span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>outputClass</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colsp
 an="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specify the full package and class name to use as conversion when <code>outputType=SelectOne</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>outputHeader</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>String</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To store the result as a header instead of the message body. This allows to preserve the existing message body as-is.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>noop</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If set, will ignore the results of the SQL query an
 d use the existing IN message as the OUT message for the continuation of processing</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>transacted</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16.2:</strong> <strong>SQL consumer only:</strong>Enables or disables transaction. If enabled then if processing an exchange failed then the consumer break out processing any further exchanges to cause a rollback eager</td></tr></tbody></table></div></div><h3 id="ElSql-Resultofthequery">Result of the query</h3><p>For <code>select</code> operations, the result is an instance of <code>List&lt;Map&lt;String, Object&gt;&gt;</code> type, as returned by the JdbcTemplate.queryForList() method. For <code>update</code> operations, the result is the number of updated rows, returned as an <code>Integer</code>.</
 p><p>By default, the result is placed in the message body.&#160; If the outputHeader parameter is set, the result is placed in the header.&#160; This is an alternative to using a full message enrichment pattern to add headers, it provides a concise syntax for querying a sequence or some other small value into a header.&#160; It is convenient to use outputHeader and outputType together:</p><h3 id="ElSql-Headervalues">Header values</h3><p>When performing <code>update</code> operations, the SQL Component stores the update count in the following message headers:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelSqlUpdateCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of rows updated for <code>update</code> operations, returne
 d as an <code>Integer</code> object.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelSqlRowCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of rows returned for <code>select</code> operations, returned as an <code>Integer</code> object.</p></td></tr></tbody></table></div><h4 id="ElSql-Sample">Sample</h4><p><span style="line-height: 1.42857;">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.</span></p><p>Camel will then lookup for these parameters from the message body or message headers. Notice in the example above we set two headers with constant value<br clear="none"> for the named parameters:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>You can append query options to the URI in the following format,&#160;<code style="line-height: 1.42857;">?option=value&amp;option=value&amp;...</code></p><p>The parameters to the SQL queries are named parameters in the elsql mapping files, and maps to corresponding keys from the Camel message,&#160;in the given precedence:</p><p>1. <strong>Camel 2.16.1:</strong>&#160;from message body if&#160;<a shape="rect" href="simple.html">Simple</a> expression.</p><div>2. from message body if its a <code style="line-height: 1.42857;">java.util.Map<br clear="none"></code>3. from message headers</div><p>If a named parameter cannot be resolved, then an exception is thrown.</p><h3 id="ElSql-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenc
 eTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>resourceUri</code></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Required</strong> The resource file which contains the elsql SQL statements to use. You can specify multiple resources separated by comma. The resources are loaded on the classpath by default, you can prefix with file: to load from file system. Notice you can set this option on the component and then you do not have to configure this on the endpoint.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>elSqlConfig</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">To use a specific configured
  ElSqlConfig. It may be better to use the databaseVendor option instead.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>databaseVendor</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">Default</td><td colspan="1" rowspan="1" class="confluenceTd">To use a vendor specific ElSqlConfig. The possible values are: Default, Postgres, HSql, MySql, Oracle, SqlServer2008, Veritca</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>batch</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Execute SQL batch update statements. See notes below on how the treatment of the inbound message body changes if this is set to <code>true</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>dataSour
 ce</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Reference to a <code>DataSource</code> to look up in the registry.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>template.&lt;xxx&gt;</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets additional options on the Spring NamedParameterJdbcTemplate that is used behind the scenes to execute the queries. For instance, <code>template.maxRows=10</code>. For detailed documentation, see the NamedParameterJdbcTemplate javadoc documentation.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1" rowspan="1" class="
 confluenceTd"><p><code>long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>500</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Delay in milliseconds between each poll.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds before polling starts.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.useFixedDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> 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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxMessagesPerPoll</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>An integer value to define the maximum number of messages to gather per poll. By default, no maximum is set.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.useIterator</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code> each row returned when polling will be pro
 cessed individually. If <code>false</code> the entire <code>java.util.List</code> of data is set as the IN body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.routeEmptyResultSet</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to route a single empty <a shape="rect" href="exchange.html">Exchange</a> if there was no data to poll.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.onConsume</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html">Exchange</a> was pr
 ocessed successfully, for example to mark the row as processed. The query can have parameter.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.onConsumeFailed</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>After processing each row then this query can be executed, if the <a shape="rect" href="exchange.html">Exchange</a> failed, for example to mark the row as failed. The query can have parameter.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.onConsumeBatchComplete</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>After processing the entire batch, this query can be 
 executed to bulk update rows etc. The query cannot have parameters.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.breakBatchOnConsumeFail</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If using <code>consumer.onConsume</code> and it fails, then this option controls whether to break out of the batch or continue processing the next row from the batch.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>outputType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SelectList</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Make the output of consumer or producer to <code>SelectList</code> as List of Map, or <code>SelectOne</code> a
 s single Java object in the following way:<br clear="none"> a) If the query has only single column, then that JDBC Column object is returned. (such as <code>SELECT COUNT( * ) FROM PROJECT</code> will return a Long object.<br clear="none"> b) If the query has more than one column, then it will return a Map of that result.<br clear="none"> c) If the <code>outputClass</code> is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with.<br clear="none"> d) If the query resulted in more than one rows, it throws an non-unique result exception.</p><p>Tthe SelectList also supports mapping each row to a Java object as the SelectOne does <span>(only step c)</span>.</p><p><span>From </span><strong>Camel 2.18</strong><span> onwards there is a new StreamList outputType that streams the result of the query using an Iterator. It can be used with the </span><
 a shape="rect" href="splitter.html">Splitter</a><span> EIP in streaming mode to process the ResultSet in streaming fashion. This StreamList do not support batch mode, but you can use outputClass to map each row to a class.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>outputClass</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specify the full package and class name to use as conversion when <code>outputType=SelectOne</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>outputHeader</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>String</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To store the result as a header instead of the message 
 body. This allows to preserve the existing message body as-is.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>noop</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If set, will ignore the results of the SQL query and use the existing IN message as the OUT message for the continuation of processing</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>transacted</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16.2:</strong> <strong>SQL consumer only:</strong>Enables or disables transaction. If enabled then if processing an exchange failed then the consumer break out processing any further exch
 anges to cause a rollback eager</td></tr></tbody></table></div></div><h3 id="ElSql-Resultofthequery">Result of the query</h3><p>For <code>select</code> operations, the result is an instance of <code>List&lt;Map&lt;String, Object&gt;&gt;</code> type, as returned by the JdbcTemplate.queryForList() method. For <code>update</code> operations, the result is the number of updated rows, returned as an <code>Integer</code>.</p><p>By default, the result is placed in the message body.&#160; If the outputHeader parameter is set, the result is placed in the header.&#160; This is an alternative to using a full message enrichment pattern to add headers, it provides a concise syntax for querying a sequence or some other small value into a header.&#160; It is convenient to use outputHeader and outputType together:</p><h3 id="ElSql-Headervalues">Header values</h3><p>When performing <code>update</code> operations, the SQL Component stores the update count in the following message headers:</p><div cla
 ss="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelSqlUpdateCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of rows updated for <code>update</code> operations, returned as an <code>Integer</code> object. This header&#160;is not provided when using outputType=StreamList.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelSqlRowCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of rows returned for <code>select</code> operations, returned as an <code>Integer</code> object. This header&#160;is not provided when using outputType=StreamList.</p></td></tr></tbody></table></div><h4 id="ElSql-Sample">Sample</h4><p><span style="line-height: 1.42857;">In the given route below, we wa
 nt to get all the projects from the projects table. Notice the SQL query has 2 named parameters, :#lic and :#min.</span></p><p>Camel will then lookup for these parameters from the message body or message headers. Notice in the example above we set two headers with constant value<br clear="none"> for the named parameters:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[   from(&quot;direct:projects&quot;)
      .setHeader(&quot;lic&quot;, constant(&quot;ASF&quot;))
      .setHeader(&quot;min&quot;, constant(123))
-     .to(&quot;elsql:projects:com/foo/orders.elsql&quot;)
+     .to(&quot;elsql:projects:com/foo/projects.elsql&quot;)
 ]]></script>
 </div></div><p>And the <a shape="rect" class="external-link" href="https://github.com/OpenGamma/ElSql" style="line-height: 1.42857;" rel="nofollow">elsql</a> mapping file</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@NAME(projects)
@@ -110,7 +110,7 @@
   ORDER BY id]]></script>
 </div></div><p>&#160;</p><p>Though if the message body is a <code>java.util.Map</code> then the named parameters will be taken from the body.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[   from(&quot;direct:projects&quot;)
-     .to(&quot;elsql:projects:com/foo/orders.elsql&quot;)
+     .to(&quot;elsql:projects:com/foo/projects.elsql&quot;)
 ]]></script>
 </div></div><p>&#160;</p><p>In from Camel 2.16.1 onwards you can use Simple expressions as well, which allows to use an OGNL like notation on the message body, where it assumes to have&#160;<code>getLicense</code> and&#160;<code>getMinimum</code> methods:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@NAME(projects)
@@ -118,7 +118,20 @@
   FROM projects
   WHERE license = :${body.license} AND id &gt; :${body.minimum}
   ORDER BY id]]></script>
-</div></div><p></p><h3 id="ElSql-SeeAlso">See Also</h3>
+</div></div><h3 id="ElSql-UsingStreamList">Using StreamList</h3><p>From<strong>&#160;Camel 2.18</strong>&#160;onwards the producer supports outputType=StreamList that uses an iterator to stream the output of the query. This allows to process the data in a streaming fashion which for example can be used by the&#160;<a shape="rect" href="https://cwiki.apache.org/confluence/display/CAMEL/Splitter">Splitter</a>&#160;EIP to process each row one at a time, and load data from the database as needed.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;direct:withSplitModel&quot;)
+    .to(&quot;elsql:allProjects:com/foo/projects.elsql?outputType=StreamList&amp;outputClass=org.apache.camel.component.elsql.Project&quot;)
+    .to(&quot;log:stream&quot;)
+    .split(body()).streaming()
+        .to(&quot;log:row&quot;)
+        .to(&quot;mock:result&quot;)
+    .end();]]></script>
+</div></div><p>And the elsql mapping for allProjects</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@NAME(allProjects)
+  SELECT *
+  FROM projects
+  ORDER BY id]]></script>
+</div></div><p>&#160;</p><p></p><h3 id="ElSql-SeeAlso">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul><ul class="alternate"><li><a shape="rect" href="sql-component.html">SQL Component</a></li><li><a shape="rect" href="mybatis.html">MyBatis</a></li><li><a shape="rect" href="jdbc.html">JDBC</a></li></ul></div>
         </td>
         <td valign="top">



Mime
View raw message