camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r870979 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2120-release.html camel-jmx.html hawtdb.html sql-component.html
Date Wed, 24 Jul 2013 12:21:41 GMT
Author: buildbot
Date: Wed Jul 24 12:21:41 2013
New Revision: 870979

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-2120-release.html
    websites/production/camel/content/camel-jmx.html
    websites/production/camel/content/hawtdb.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 Wed Jul 24 12:21:41 2013
@@ -17395,7 +17395,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" rowspan="1" cl
 ass="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" row
 span="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>
+<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" rowspan="1" cl
 ass="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" row
 span="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><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>optimisticLocking</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> To turn on optimistic locking, which often would be needed in clustered environments where multiple Camel applications shared the same JDBC based aggregation repository. </td></tr><tr><td col
 span="1" rowspan="1" class="confluenceTd"> <tt>jdbcOptimisticLockingExceptionMapper</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> Allows to plugin a custom <tt>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</tt> to map vendor specific error codes to an optimistick locking error, for Camel to perform a retry. This requires <tt>optimisticLocking</tt> to be enabled. </td></tr></tbody></table>
 </div>
 
 
@@ -17521,6 +17521,39 @@ CREATE TABLE aggregationRepo3_completed 
 ]]></script>
 </div></div>
 
+<h3><a shape="rect" name="BookComponentAppendix-Optimisticklocking"></a>Optimistick locking</h3>
+
+<p>From <b>Camel 2.12</b> onwards you can turn on <tt>optimisticLocking</tt> and use this JDBC based aggregation repository in a clustered environment where multiple Camel applications shared the same database for the aggregation repository. If there is a race condition there JDBC driver will throw a vendor specific exception which the <tt>JdbcAggregationRepository</tt> can react upon. To know which caused exceptions from the JDBC driver is regarded as an optimistick locking error we need a mapper to do this. Therefore there is a <tt>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</tt> allows you to implement your custom logic if needed. There is a default implementation <tt>org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper</tt> which works as follows:</p>
+
+<p>The following check is done:</p>
+<ul class="alternate" type="square"><li>If the caused exception is an <tt>SQLException</tt> then the SQLState is checked if starts with 23.</li><li>If the caused exception is a <tt>DataIntegrityViolationException</tt></li><li>If the caused exception class name has "ConstraintViolation" in its name.</li><li>optional checking for FQN class name matches if any class names has been configured</li></ul>
+
+
+<p>You can in addition add FQN classnames, and if any of the caused exception (or any nested) equals any of the FQN class names, then its an optimistick locking error.</p>
+
+<p>Here is an example, where we define 2 extra FQN class names from the JDBC vendor.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;bean id="repo" class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"&gt;
+        &lt;property name="transactionManager" ref="transactionManager"/&gt;
+        &lt;property name="repositoryName" value="aggregation"/&gt;
+        &lt;property name="dataSource" ref="dataSource"/&gt;
+        &lt;property name"jdbcOptimisticLockingExceptionMapper" ref="myExceptionMapper"/&gt;
+    &lt;/bean&gt;
+
+    &lt;!-- use the default mapper with extra FQN class names from our JDBC driver --&gt;
+    &lt;bean id="myExceptionMapper" class="org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper"&gt;
+      &lt;property name="classNames"&gt;
+        &lt;util:set&gt;
+          &lt;value&gt;com.foo.sql.MyViolationExceptoion&lt;/value&gt;
+          &lt;value&gt;com.foo.sql.MyOtherViolationExceptoion&lt;/value&gt;
+        &lt;/util:set&gt;
+      &lt;/property&gt;
+    &lt;/bean&gt; 
+]]></script>
+</div></div>
+
+
 <h3><a shape="rect" name="BookComponentAppendix-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
 

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 Wed Jul 24 12:21:41 2013
@@ -38782,7 +38782,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" rowspan="1" cl
 ass="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" row
 span="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>
+<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" rowspan="1" cl
 ass="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" row
 span="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><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>optimisticLocking</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> To turn on optimistic locking, which often would be needed in clustered environments where multiple Camel applications shared the same JDBC based aggregation repository. </td></tr><tr><td col
 span="1" rowspan="1" class="confluenceTd"> <tt>jdbcOptimisticLockingExceptionMapper</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> Allows to plugin a custom <tt>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</tt> to map vendor specific error codes to an optimistick locking error, for Camel to perform a retry. This requires <tt>optimisticLocking</tt> to be enabled. </td></tr></tbody></table>
 </div>
 
 
@@ -38908,6 +38908,39 @@ CREATE TABLE aggregationRepo3_completed 
 ]]></script>
 </div></div>
 
+<h3><a shape="rect" name="BookInOnePage-Optimisticklocking"></a>Optimistick locking</h3>
+
+<p>From <b>Camel 2.12</b> onwards you can turn on <tt>optimisticLocking</tt> and use this JDBC based aggregation repository in a clustered environment where multiple Camel applications shared the same database for the aggregation repository. If there is a race condition there JDBC driver will throw a vendor specific exception which the <tt>JdbcAggregationRepository</tt> can react upon. To know which caused exceptions from the JDBC driver is regarded as an optimistick locking error we need a mapper to do this. Therefore there is a <tt>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</tt> allows you to implement your custom logic if needed. There is a default implementation <tt>org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper</tt> which works as follows:</p>
+
+<p>The following check is done:</p>
+<ul class="alternate" type="square"><li>If the caused exception is an <tt>SQLException</tt> then the SQLState is checked if starts with 23.</li><li>If the caused exception is a <tt>DataIntegrityViolationException</tt></li><li>If the caused exception class name has "ConstraintViolation" in its name.</li><li>optional checking for FQN class name matches if any class names has been configured</li></ul>
+
+
+<p>You can in addition add FQN classnames, and if any of the caused exception (or any nested) equals any of the FQN class names, then its an optimistick locking error.</p>
+
+<p>Here is an example, where we define 2 extra FQN class names from the JDBC vendor.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;bean id="repo" class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"&gt;
+        &lt;property name="transactionManager" ref="transactionManager"/&gt;
+        &lt;property name="repositoryName" value="aggregation"/&gt;
+        &lt;property name="dataSource" ref="dataSource"/&gt;
+        &lt;property name"jdbcOptimisticLockingExceptionMapper" ref="myExceptionMapper"/&gt;
+    &lt;/bean&gt;
+
+    &lt;!-- use the default mapper with extra FQN class names from our JDBC driver --&gt;
+    &lt;bean id="myExceptionMapper" class="org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper"&gt;
+      &lt;property name="classNames"&gt;
+        &lt;util:set&gt;
+          &lt;value&gt;com.foo.sql.MyViolationExceptoion&lt;/value&gt;
+          &lt;value&gt;com.foo.sql.MyOtherViolationExceptoion&lt;/value&gt;
+        &lt;/util:set&gt;
+      &lt;/property&gt;
+    &lt;/bean&gt; 
+]]></script>
+</div></div>
+
+
 <h3><a shape="rect" name="BookInOnePage-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
 

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

Modified: websites/production/camel/content/camel-2120-release.html
==============================================================================
--- websites/production/camel/content/camel-2120-release.html (original)
+++ websites/production/camel/content/camel-2120-release.html Wed Jul 24 12:21:41 2013
@@ -94,7 +94,7 @@
 
 <p>Welcome to the 2.12.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)</p>
 
-<ul><li><a shape="rect" href="endpoint-annotations.html" title="Endpoint Annotations">Endpoint Annotations</a> along with automatically created HTML documentation for the endpoint parameters; this makes it easier for component developers to add a few refactoring-safe annotations to their Endpoint or Consumer implementations and, (along with javadoc comments on the field or setter method), get nice user documentation on how to use the endpoint for free.</li><li><a shape="rect" href="componentconfiguration.html" title="ComponentConfiguration">ComponentConfiguration</a> API provides a handy API for tools developers to introspect on a Component to find all the possible parameters, their types and any extra annotations (like Bean Validation Annotations) to be able to create/edit endpoints or URI strings so that tools can generate nicer UIs for configuring endpoints than just letting folks edit Strings.</li><li><a shape="rect" href="endpointcompleter.html" title="EndpointCompleter">Endpoi
 ntCompleter</a> API provides a hook so that command line tools (like <a shape="rect" class="external-link" href="http://karaf.apache.org/manual/latest-2.3.x/users-guide/using-console.html">Karaf's shell</a>), IDEs and web tools can get (bash tab like) auto-completion on endpoint paths (such as file or directory names, message queue names, database table names) when creating or using new endpoints</li><li>Reduced stack-frames in use during routing, that also makes Camel's stack traces being logged much less verbose. This also allows people to easier debug the internals of Camel as less <tt>AsyncCallback</tt> callbacks are in use during routing.</li><li>Easy to use <a shape="rect" href="message-history.html" title="Message History">Message History</a> out of the box. And included message history as "route stack-trace" when exceptions logged by <a shape="rect" href="error-handler.html" title="Error Handler">Error Handler</a> to make it easier for end users to spot where the exception o
 ccurred.</li><li><a shape="rect" href="spring-web-services.html" title="Spring Web Services">Spring Web Services</a> now supports setting/receiving SOAP headers more easily using a header on the Camel <a shape="rect" href="message.html" title="Message">Message</a>.</li><li>Evaluating <a shape="rect" href="groovy.html" title="Groovy">Groovy</a> expressions is faster as we cache the compiled scripts.</li><li>Added <tt>base64</tt> option to <a shape="rect" href="shiro-security.html" title="Shiro Security">Shiro Security</a> to allow transferring security token over <a shape="rect" href="jms.html" title="JMS">JMS</a> and other transports as base64 encoded representation.</li><li>Made it easier to use <a shape="rect" href="shiro-security.html" title="Shiro Security">Shiro Security</a> as the credentials can be provided in headers, when sending a message to a secured route.</li><li><a shape="rect" href="bindy.html" title="Bindy">Bindy</a> now supports enums.</li><li>Added new <a shape="re
 ct" href="backlogdebugger.html" title="BacklogDebugger">BacklogDebugger</a> to perform live debugging of messages during routing. The <a shape="rect" href="backlogdebugger.html" title="BacklogDebugger">BacklogDebugger</a> has JMX API allows tooling to control the debugger.</li><li>While using the <a shape="rect" class="external-link" href="http://xircles.codehaus.org/projects/jackson" rel="nofollow">Jackson library</a> through the <a shape="rect" href="json.html" title="JSON">JSON</a> Dataformat there's now a <tt>jsonView</tt> attribute you could make use of directly inside the <a shape="rect" href="dsl.html" title="DSL">DSL</a> itself.</li><li><a shape="rect" href="smpp.html" title="SMPP">SMPP</a> now supports optional parameters in all commands where they are possible.</li><li><a shape="rect" href="jdbc.html" title="JDBC">JDBC</a> now supports named parameters.</li><li>Added timeout support for <a shape="rect" href="direct.html" title="Direct">Direct</a> producers to wait for cons
 umer to become active.</li><li>Added <tt>stats</tt> action to <a shape="rect" href="controlbus.html" title="ControlBus">ControlBus</a> to easily get performance statics in a single XML message.</li><li>Added support for request timeout on <a shape="rect" href="netty.html" title="Netty">Netty</a> producer, and to configure logging level on <a shape="rect" href="netty.html" title="Netty">Netty</a> consumer to be less noisy for ChannelClosedException which can flood the logs when client disconnects abruptly.</li><li><a shape="rect" href="springbatch.html" title="SpringBatch">Spring Batch</a> component producer now returns the <tt>JobExecution</tt> instance as the output message. Users can use the <tt>JobExecution</tt> instance to perform some operations using the Spring Batch API directly.</li><li>Added support for NULL values in <a shape="rect" href="sql-component.html" title="SQL Component">SQL</a> with named parameters.</li><li>Optimized <a shape="rect" href="jetty.html" title="Jett
 y">Jetty</a> streaming responses in non-chunked mode; and as well using buffer sizes based on <tt>HttpServletResponse.getBufferSize()</tt> instead of fixed size of 4kb.</li><li>Added <tt>greedy</tt> option to <a shape="rect" href="polling-consumer.html" title="Polling Consumer">scheduled polling consumer</a>.</li><li>Added support for accessing the length field on Java arrays in <a shape="rect" href="simple.html" title="Simple">Simple</a> language.</li><li>Added support for using JAXB annotations with Camel's Jackson <a shape="rect" href="json.html" title="JSON">JSON</a> component.</li><li>Added the ability for <a shape="rect" href="bindy.html" title="Bindy">Bindy</a> to skip content when parsing fixed-length records.</li><li><a shape="rect" href="mongodb.html" title="MongoDB">MongoDB</a> now supports aggregation queries.</li><li><a shape="rect" href="netty.html" title="Netty">Netty</a> allows to use shared Netty boss and worker thread pools.</li><li>The <a shape="rect" href="camel-
 maven-archetypes.html" title="Camel Maven Archetypes">Camel Maven Archetypes</a> for component and data format now packages as OSGi bundles out of the box.</li><li>Easier <a shape="rect" href="stream-caching.html" title="Stream caching">Stream caching</a> configuration using <tt>StreamCachingStrategy</tt>. Also allows spool directory per <a shape="rect" href="camelcontext.html" title="CamelContext">CamelContext</a> instead of shared per JVM. And insight at runtime using JMX management. As well allowing to plugin 3rd party implementations.</li><li>Improved <a shape="rect" href="netty.html" title="Netty">Netty</a> to be able to join an UDP multicast group.</li><li>Using Camel <a shape="rect" href="spring.html" title="Spring">Spring</a> is now setting up Camel routes later in the process allow Spring to complete all of its dependency injection, before Camel <tt>RouteBuilder</tt> instances is configured. This allows to safely use Spring dependency injection in these <tt>RouteBuilder</tt
 > classes.</li><li>Services in a <a shape="rect" href="camelcontext.html" title="CamelContext">CamelContext</a> which can only be enlisted once (eg it similar to a static in a JVM) has simpler and fixed MBean names in JMX.</li></ul>
+<ul><li><a shape="rect" href="endpoint-annotations.html" title="Endpoint Annotations">Endpoint Annotations</a> along with automatically created HTML documentation for the endpoint parameters; this makes it easier for component developers to add a few refactoring-safe annotations to their Endpoint or Consumer implementations and, (along with javadoc comments on the field or setter method), get nice user documentation on how to use the endpoint for free.</li><li><a shape="rect" href="componentconfiguration.html" title="ComponentConfiguration">ComponentConfiguration</a> API provides a handy API for tools developers to introspect on a Component to find all the possible parameters, their types and any extra annotations (like Bean Validation Annotations) to be able to create/edit endpoints or URI strings so that tools can generate nicer UIs for configuring endpoints than just letting folks edit Strings.</li><li><a shape="rect" href="endpointcompleter.html" title="EndpointCompleter">Endpoi
 ntCompleter</a> API provides a hook so that command line tools (like <a shape="rect" class="external-link" href="http://karaf.apache.org/manual/latest-2.3.x/users-guide/using-console.html">Karaf's shell</a>), IDEs and web tools can get (bash tab like) auto-completion on endpoint paths (such as file or directory names, message queue names, database table names) when creating or using new endpoints</li><li>Reduced stack-frames in use during routing, that also makes Camel's stack traces being logged much less verbose. This also allows people to easier debug the internals of Camel as less <tt>AsyncCallback</tt> callbacks are in use during routing.</li><li>Easy to use <a shape="rect" href="message-history.html" title="Message History">Message History</a> out of the box. And included message history as "route stack-trace" when exceptions logged by <a shape="rect" href="error-handler.html" title="Error Handler">Error Handler</a> to make it easier for end users to spot where the exception o
 ccurred.</li><li><a shape="rect" href="spring-web-services.html" title="Spring Web Services">Spring Web Services</a> now supports setting/receiving SOAP headers more easily using a header on the Camel <a shape="rect" href="message.html" title="Message">Message</a>.</li><li>Evaluating <a shape="rect" href="groovy.html" title="Groovy">Groovy</a> expressions is faster as we cache the compiled scripts.</li><li>Added <tt>base64</tt> option to <a shape="rect" href="shiro-security.html" title="Shiro Security">Shiro Security</a> to allow transferring security token over <a shape="rect" href="jms.html" title="JMS">JMS</a> and other transports as base64 encoded representation.</li><li>Made it easier to use <a shape="rect" href="shiro-security.html" title="Shiro Security">Shiro Security</a> as the credentials can be provided in headers, when sending a message to a secured route.</li><li><a shape="rect" href="bindy.html" title="Bindy">Bindy</a> now supports enums.</li><li>Added new <a shape="re
 ct" href="backlogdebugger.html" title="BacklogDebugger">BacklogDebugger</a> to perform live debugging of messages during routing. The <a shape="rect" href="backlogdebugger.html" title="BacklogDebugger">BacklogDebugger</a> has JMX API allows tooling to control the debugger.</li><li>While using the <a shape="rect" class="external-link" href="http://xircles.codehaus.org/projects/jackson" rel="nofollow">Jackson library</a> through the <a shape="rect" href="json.html" title="JSON">JSON</a> Dataformat there's now a <tt>jsonView</tt> attribute you could make use of directly inside the <a shape="rect" href="dsl.html" title="DSL">DSL</a> itself.</li><li><a shape="rect" href="smpp.html" title="SMPP">SMPP</a> now supports optional parameters in all commands where they are possible.</li><li><a shape="rect" href="jdbc.html" title="JDBC">JDBC</a> now supports named parameters.</li><li>Added timeout support for <a shape="rect" href="direct.html" title="Direct">Direct</a> producers to wait for cons
 umer to become active.</li><li>Added <tt>stats</tt> action to <a shape="rect" href="controlbus.html" title="ControlBus">ControlBus</a> to easily get performance statics in a single XML message.</li><li>Added support for request timeout on <a shape="rect" href="netty.html" title="Netty">Netty</a> producer, and to configure logging level on <a shape="rect" href="netty.html" title="Netty">Netty</a> consumer to be less noisy for ChannelClosedException which can flood the logs when client disconnects abruptly.</li><li><a shape="rect" href="springbatch.html" title="SpringBatch">Spring Batch</a> component producer now returns the <tt>JobExecution</tt> instance as the output message. Users can use the <tt>JobExecution</tt> instance to perform some operations using the Spring Batch API directly.</li><li>Added support for NULL values in <a shape="rect" href="sql-component.html" title="SQL Component">SQL</a> with named parameters.</li><li>Optimized <a shape="rect" href="jetty.html" title="Jett
 y">Jetty</a> streaming responses in non-chunked mode; and as well using buffer sizes based on <tt>HttpServletResponse.getBufferSize()</tt> instead of fixed size of 4kb.</li><li>Added <tt>greedy</tt> option to <a shape="rect" href="polling-consumer.html" title="Polling Consumer">scheduled polling consumer</a>.</li><li>Added support for accessing the length field on Java arrays in <a shape="rect" href="simple.html" title="Simple">Simple</a> language.</li><li>Added support for using JAXB annotations with Camel's Jackson <a shape="rect" href="json.html" title="JSON">JSON</a> component.</li><li>Added the ability for <a shape="rect" href="bindy.html" title="Bindy">Bindy</a> to skip content when parsing fixed-length records.</li><li><a shape="rect" href="mongodb.html" title="MongoDB">MongoDB</a> now supports aggregation queries.</li><li><a shape="rect" href="netty.html" title="Netty">Netty</a> allows to use shared Netty boss and worker thread pools.</li><li>The <a shape="rect" href="camel-
 maven-archetypes.html" title="Camel Maven Archetypes">Camel Maven Archetypes</a> for component and data format now packages as OSGi bundles out of the box.</li><li>Easier <a shape="rect" href="stream-caching.html" title="Stream caching">Stream caching</a> configuration using <tt>StreamCachingStrategy</tt>. Also allows spool directory per <a shape="rect" href="camelcontext.html" title="CamelContext">CamelContext</a> instead of shared per JVM. And insight at runtime using JMX management. As well allowing to plugin 3rd party implementations.</li><li>Improved <a shape="rect" href="netty.html" title="Netty">Netty</a> to be able to join an UDP multicast group.</li><li>Using Camel <a shape="rect" href="spring.html" title="Spring">Spring</a> is now setting up Camel routes later in the process allow Spring to complete all of its dependency injection, before Camel <tt>RouteBuilder</tt> instances is configured. This allows to safely use Spring dependency injection in these <tt>RouteBuilder</tt
 > classes.</li><li>Services in a <a shape="rect" href="camelcontext.html" title="CamelContext">CamelContext</a> which can only be enlisted once (eg it similar to a static in a JVM) has simpler and fixed MBean names in JMX.</li><li><a shape="rect" href="sql-component.html" title="SQL Component">JDBC based aggregation repository</a> for the <a shape="rect" href="aggregator2.html" title="Aggregator2">Aggregate</a> EIP now supports optimistick locking, allows clustered Camel applications to use a shared database for the aggregation repository.</li></ul>
 
 
 <h3><a shape="rect" name="Camel2.12.0Release-FixedIssues"></a>Fixed Issues</h3>

Modified: websites/production/camel/content/camel-jmx.html
==============================================================================
--- websites/production/camel/content/camel-jmx.html (original)
+++ websites/production/camel/content/camel-jmx.html Wed Jul 24 12:21:41 2013
@@ -95,13 +95,13 @@ Camel also provides a <a shape="rect" hr
 <div>
 <ul><li><a shape="rect" href="#CamelJMX-CamelJMX">Camel JMX</a></li><ul><li><a shape="rect" href="#CamelJMX-ActivatingJMXinCamel">Activating JMX in Camel</a></li><ul><li><a shape="rect" href="#CamelJMX-UsingJMXtomanageApacheCamel">Using JMX to manage Apache Camel</a></li><li><a shape="rect" href="#CamelJMX-DisablingJMXinstrumentationagentinCamel">Disabling JMX instrumentation agent in Camel</a></li><li><a shape="rect" href="#CamelJMX-LocatingaMBeanServerintheJavaVM">Locating a MBeanServer in the Java VM</a></li><li><a shape="rect" href="#CamelJMX-CreatingJMXRMIConnectorServer">Creating JMX RMI Connector Server</a></li><li><a shape="rect" href="#CamelJMX-JMXServiceURL">JMX Service URL</a></li><li><a shape="rect" href="#CamelJMX-TheSystemPropertiesforCamelJMXsupport">The SystemProperties for Camel JMX support</a></li><li><a shape="rect" href="#CamelJMX-HowtouseauthenticationwithJMX">How to use authentication with JMX</a></li><li><a shape="rect" href="#CamelJMX-JMXinsideanApplicationSe
 rver">JMX inside an Application Server</a></li><ul><li><a shape="rect" href="#CamelJMX-Tomcat6">Tomcat 6</a></li><li><a shape="rect" href="#CamelJMX-JBossAS4">JBoss AS 4</a></li><li><a shape="rect" href="#CamelJMX-WebSphere">WebSphere</a></li><li><a shape="rect" href="#CamelJMX-OracleOC4j">Oracle OC4j</a></li></ul><li><a shape="rect" href="#CamelJMX-AdvancedJMXConfiguration">Advanced JMX Configuration</a></li><li><a shape="rect" href="#CamelJMX-Example%3A">Example:</a></li><li><a shape="rect" href="#CamelJMX-jmxAgentPropertiesReference">jmxAgent Properties Reference</a></li><li><a shape="rect" href="#CamelJMX-Configuringwhethertoregistermbeansalways%2Cfornewroutesorjustbydefault">Configuring whether to register mbeans always, for new routes or just by default</a></li></ul><li><a shape="rect" href="#CamelJMX-MonitoringCamelusingJMX">Monitoring Camel using JMX</a></li><ul><li><a shape="rect" href="#CamelJMX-UsingJConsoletomonitorCamel">Using JConsole to monitor Camel</a></li><li><a sh
 ape="rect" href="#CamelJMX-Whichendpointsareregistered">Which endpoints are registered</a></li><li><a shape="rect" href="#CamelJMX-Whichprocessorsareregistered">Which processors are registered</a></li><li><a shape="rect" href="#CamelJMX-HowtousetheJMXNotificationListenertolistenthecamelevents%3F">How to use the JMX NotificationListener to listen the camel events?</a></li><li><a shape="rect" href="#CamelJMX-UsingtheTracermbeantogetfinegrainedtracing">Using the Tracer mbean to get fine grained tracing</a></li></ul><li><a shape="rect" href="#CamelJMX-UsingJMXforyourownCamelCode">Using JMX for your own Camel Code</a></li><ul><li><a shape="rect" href="#CamelJMX-RegisteringyourownManagedEndpoints">Registering your own Managed Endpoints</a></li><li><a shape="rect" href="#CamelJMX-ProgrammingyourownManagedServices">Programming your own Managed Services</a></li><li><a shape="rect" href="#CamelJMX-ManagementNamingStrategy">ManagementNamingStrategy</a></li><li><a shape="rect" href="#CamelJMX-M
 anagementnamingpattern">Management naming pattern</a></li><li><a shape="rect" href="#CamelJMX-ManagementStrategy">ManagementStrategy</a></li><li><a shape="rect" href="#CamelJMX-Configuringlevelofgranularityforperformancestatistics">Configuring level of granularity for performance statistics</a></li></ul><li><a shape="rect" href="#CamelJMX-SeeAlso">See Also</a></li></ul></ul></div>
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Spring JAR dependency, required for Camel 2.8 or older</b><br clear="none"><tt>spring-context.jar</tt>, <tt>spring-aop.jar</tt>, <tt>spring-beans.jar</tt>, and <tt>spring-core.jar</tt> is needed on the classpath by Camel to be able to use JMX instrumentation. If these .jars is not on the classpath Camel will fallback to non JMX mode. This situation is logged at <tt>WARN</tt> level using logger name <tt>org.apache.camel.impl.DefaultCamelContext</tt>.
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Spring JAR dependency, required for Camel 2.8 or older</b><br clear="none"><tt>spring-context.jar</tt>, <tt>spring-aop.jar</tt>, <tt>spring-beans.jar</tt>, and <tt>spring-core.jar</tt> are needed on the classpath by Camel to be able to use JMX instrumentation. If these .jars are not on the classpath, Camel will fallback to non JMX mode. This situation is logged at <tt>WARN</tt> level using logger name <tt>org.apache.camel.impl.DefaultCamelContext</tt>.
 
-<p>From <b>Camel 2.9</b> onwards, the Spring JARs is <b>no</b> longer required, to run Camel in JMX mode.</p></td></tr></table></div>
+<p>From <b>Camel 2.9</b> onwards, the Spring JARs are <b>no</b> longer required to run Camel in JMX mode.</p></td></tr></table></div>
 
 <h4><a shape="rect" name="CamelJMX-UsingJMXtomanageApacheCamel"></a>Using JMX to manage Apache Camel</h4>
 
-<p>By default, JMX instrumentation agent is enabled in Camel which means that Camel runtime creates and registers MBean management objects with a MBeanServer instance in the VM. This allows Camel users instantly obtain insights into how Camel routes perform down to the individual processor's level.</p>
+<p>By default, JMX instrumentation agent is enabled in Camel, which means that Camel runtime creates and registers MBean management objects with a MBeanServer instance in the VM. This allows Camel users to instantly obtain insights into how Camel routes perform down to the individual processor level.</p>
 
 <p>The supported types of management objects are <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/ManagedEndpoint.html">endpoint</a>, <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/ManagedRoute.html">route</a>, <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/ManagedService.html">service</a>, and <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/PerformanceCounter.html">processor</a>. Some of these management objects also expose lifecycle operations in addition to performance counter attributes.</p>
 
@@ -120,17 +120,17 @@ Camel also provides a <a shape="rect" hr
 &lt;/camelContext&gt;
 ]]></script>
 </div></div>
-<p>Spring configuration always takes precedence over system properties when they both present. It is true for all of JMX related configurations.</p>
+<p>Spring configuration always takes precedence over system properties when they both present. It is true for all JMX related configurations.</p>
 
 <h4><a shape="rect" name="CamelJMX-DisablingJMXinstrumentationagentinCamel"></a>Disabling JMX instrumentation agent in Camel</h4>
 
-<p>You can disable JMX instrumentation agent by setting Java VM system property as follow. The property value is treated as boolean.</p>
+<p>You can disable JMX instrumentation agent by setting the Java VM system property as follow. The property value is treated as <tt>boolean</tt>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 -Dorg.apache.camel.jmx.disabled=true
 ]]></script>
 </div></div>
-<p>Or, by adding a <b>jmxAgent</b> element inside the camelContext element in Spring configuration:</p>
+<p>Or, by adding a <b>jmxAgent</b> element inside the <tt>camelContext</tt> element in Spring configuration:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
@@ -150,7 +150,7 @@ camel.disableJMX();
 
 <h4><a shape="rect" name="CamelJMX-LocatingaMBeanServerintheJavaVM"></a>Locating a MBeanServer in the Java VM</h4>
 
-<p>Each CamelContext can have an instance of <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InstrumentationAgent.html">InstrumentationAgent</a> wrapped inside the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/InstrumentationLifecycleStrategy.html">InstrumentationLifecycleStrategy</a>. The InstrumentationAgent is the object that interfaces with a <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServer.html" rel="nofollow">MBeanServer</a> to register/unregister Camel MBeans. Multiple CamelContexts/InstrumentationAgents can/should share a MBeanServer. By default, Camel runtime picks the first MBeanServer returned by <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServerFactory.html#findMBeanServer(java.lang.String)" r
 el="nofollow">MBeanServerFactory.findMBeanServer method</a> that matches the default domain name of <b>org.apache.camel</b>.&#160; You may want to change the default domain name to match the MBeanServer instance that you are already using in your application.&#160; Especially, if your MBeanServer is attached to a JMX connector server, you will not need to create a connector server in Camel.</p>
+<p>Each CamelContext can have an instance of <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InstrumentationAgent.html">InstrumentationAgent</a> wrapped inside the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/InstrumentationLifecycleStrategy.html">InstrumentationLifecycleStrategy</a>. The InstrumentationAgent is the object that interfaces with a <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServer.html" rel="nofollow">MBeanServer</a> to register/unregister Camel MBeans. Multiple CamelContexts/InstrumentationAgents can/should share a MBeanServer. By default, Camel runtime picks the first MBeanServer returned by <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServerFactory.html#findMBeanServer(java.lang.String)" r
 el="nofollow">MBeanServerFactory.findMBeanServer method</a> that matches the default domain name of <b>org.apache.camel</b>. You may want to change the default domain name to match the MBeanServer instance that you are already using in your application. Especially, if your MBeanServer is attached to a JMX connector server, you will not need to create a connector server in Camel.</p>
 
 <p>You can configure the matching default domain name via system property.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -169,13 +169,13 @@ camel.disableJMX();
 </div></div>
 <p>If no matching MBeanServer can be found, a new one is created and the new MBeanServer's default domain name is set according to the default and configuration as mentioned above.</p>
 
-<p>It is also possible to use the <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/ManagementFactory.html#getPlatformMBeanServer()" rel="nofollow">PlatformMBeanServer</a> when it is desirable to manage JVM MBeans by setting the system property. The MBeanServer default domain name configuration is ignored as it is not applicable. <b>Starting in next release (1.5), the default value of usePlatformMBeanServer will be changed to "True".&#160; You can set the property to "False" to disable using platform MBean server.</b></p>
+<p>It is also possible to use the <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/ManagementFactory.html#getPlatformMBeanServer()" rel="nofollow">PlatformMBeanServer</a> when it is desirable to manage JVM MBeans by setting the system property. The MBeanServer default domain name configuration is ignored as it is not applicable. <b>Starting in next release (1.5), the default value of <tt>usePlatformMBeanServer</tt> will be changed to "True". You can set the property to "False" to disable using platform MBean server.</b></p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 -Dorg.apache.camel.jmx.usePlatformMBeanServer=True
 ]]></script>
 </div></div>
-<p>Or, by adding a <b>jmxAgent</b> element inside the camelContext element in Spring configuration:</p>
+<p>Or, by adding a <b>jmxAgent</b> element inside the <tt>camelContext</tt> element in Spring configuration:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
@@ -193,7 +193,7 @@ camel.disableJMX();
 -Dorg.apache.camel.jmx.createRmiConnector=True
 ]]></script>
 </div></div>
-<p>Or, by adding a <b>jmxAgent</b> element inside the camelContext element in Spring configuration:</p>
+<p>Or, by adding a <b>jmxAgent</b> element inside the <tt>camelContext</tt> element in Spring configuration:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
@@ -255,13 +255,13 @@ context.getManagementStrategy().getManag
 &lt;/camelContext&gt;
 ]]></script>
 </div></div>
-<p>By default, RMI server object listens on a dynamically generated port which can be a problem for connection established through a firewall. In such situation, RMI connection port can be explicitly set by the system property.</p>
+<p>By default, RMI server object listens on a dynamically generated port, which can be a problem for connections established through a firewall. In such situations, RMI connection port can be explicitly set by the system property.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 -Dorg.apache.camel.jmx.rmiConnector.connectorPort=&lt;port number&gt;
 ]]></script>
 </div></div>
-<p>Or, by adding a <b>jmxAgent</b> element inside the camelContext element in Spring configuration:</p>
+<p>Or, by adding a <b>jmxAgent</b> element inside the <tt>camelContext</tt> element in Spring configuration:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring"&gt;

Modified: websites/production/camel/content/hawtdb.html
==============================================================================
--- websites/production/camel/content/hawtdb.html (original)
+++ websites/production/camel/content/hawtdb.html Wed Jul 24 12:21:41 2013
@@ -106,7 +106,7 @@
 
 <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>repositoryName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> A mandatory repository name. Allows you to use a shared <tt>HawtDBFile</tt> for multiple repositories. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>persistentFileName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> Filename for the persistent storage. If no file exists on startup a new file is created. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>bufferSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" r
 owspan="1" class="confluenceTd"> The size of the memory segment buffer which is mapped to the file store. By default its 8mb. The value is in bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sync</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not the <tt>HawtDBFile</tt> should sync on write or not. Default is <tt>true</tt>. By sync on write ensures that its always waiting for all writes to be spooled to disk and thus will not loose updates. If you disable this option, then HawtDB will auto sync when it has batched up a number of writes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>pageSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> short </td><td colspan="1" rowspan="1" class="confluenceTd"> The size of memory pages. By default its 512 bytes. The value is in bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>
 hawtDBFile</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> HawtDBFile </td><td colspan="1" rowspan="1" class="confluenceTd"> Use an existing configured <tt>org.apache.camel.component.hawtdb.HawtDBFile</tt> instance. </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">Aggregato
 r</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>repositoryName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> A mandatory repository name. Allows you to use a shared <tt>HawtDBFile</tt> for multiple repositories. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>persistentFileName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> Filename for the persistent storage. If no file exists on startup a new file is created. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>bufferSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" r
 owspan="1" class="confluenceTd"> The size of the memory segment buffer which is mapped to the file store. By default its 8mb. The value is in bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sync</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not the <tt>HawtDBFile</tt> should sync on write or not. Default is <tt>true</tt>. By sync on write ensures that its always waiting for all writes to be spooled to disk and thus will not loose updates. If you disable this option, then HawtDB will auto sync when it has batched up a number of writes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>pageSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> short </td><td colspan="1" rowspan="1" class="confluenceTd"> The size of memory pages. By default its 512 bytes. The value is in bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>
 hawtDBFile</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> HawtDBFile </td><td colspan="1" rowspan="1" class="confluenceTd"> Use an existing configured <tt>org.apache.camel.component.hawtdb.HawtDBFile</tt> instance. </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">Aggregato
 r</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>optimisticLocking</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> To turn on optimistic locking, which often would be needed in clustered environments where multiple Camel applications shared the same HawtDB based aggregation repository. </td></tr></tbody></table>
 </div>
 
 

Modified: websites/production/camel/content/sql-component.html
==============================================================================
--- websites/production/camel/content/sql-component.html (original)
+++ websites/production/camel/content/sql-component.html Wed Jul 24 12:21:41 2013
@@ -352,7 +352,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" rowspan="1" cl
 ass="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" row
 span="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>
+<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" rowspan="1" cl
 ass="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" row
 span="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><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>optimisticLocking</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> To turn on optimistic locking, which often would be needed in clustered environments where multiple Camel applications shared the same JDBC based aggregation repository. </td></tr><tr><td col
 span="1" rowspan="1" class="confluenceTd"> <tt>jdbcOptimisticLockingExceptionMapper</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> Allows to plugin a custom <tt>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</tt> to map vendor specific error codes to an optimistick locking error, for Camel to perform a retry. This requires <tt>optimisticLocking</tt> to be enabled. </td></tr></tbody></table>
 </div>
 
 
@@ -478,6 +478,39 @@ CREATE TABLE aggregationRepo3_completed 
 ]]></script>
 </div></div>
 
+<h3><a shape="rect" name="SQLComponent-Optimisticklocking"></a>Optimistick locking</h3>
+
+<p>From <b>Camel 2.12</b> onwards you can turn on <tt>optimisticLocking</tt> and use this JDBC based aggregation repository in a clustered environment where multiple Camel applications shared the same database for the aggregation repository. If there is a race condition there JDBC driver will throw a vendor specific exception which the <tt>JdbcAggregationRepository</tt> can react upon. To know which caused exceptions from the JDBC driver is regarded as an optimistick locking error we need a mapper to do this. Therefore there is a <tt>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</tt> allows you to implement your custom logic if needed. There is a default implementation <tt>org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper</tt> which works as follows:</p>
+
+<p>The following check is done:</p>
+<ul class="alternate" type="square"><li>If the caused exception is an <tt>SQLException</tt> then the SQLState is checked if starts with 23.</li><li>If the caused exception is a <tt>DataIntegrityViolationException</tt></li><li>If the caused exception class name has "ConstraintViolation" in its name.</li><li>optional checking for FQN class name matches if any class names has been configured</li></ul>
+
+
+<p>You can in addition add FQN classnames, and if any of the caused exception (or any nested) equals any of the FQN class names, then its an optimistick locking error.</p>
+
+<p>Here is an example, where we define 2 extra FQN class names from the JDBC vendor.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;bean id="repo" class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"&gt;
+        &lt;property name="transactionManager" ref="transactionManager"/&gt;
+        &lt;property name="repositoryName" value="aggregation"/&gt;
+        &lt;property name="dataSource" ref="dataSource"/&gt;
+        &lt;property name"jdbcOptimisticLockingExceptionMapper" ref="myExceptionMapper"/&gt;
+    &lt;/bean&gt;
+
+    &lt;!-- use the default mapper with extra FQN class names from our JDBC driver --&gt;
+    &lt;bean id="myExceptionMapper" class="org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper"&gt;
+      &lt;property name="classNames"&gt;
+        &lt;util:set&gt;
+          &lt;value&gt;com.foo.sql.MyViolationExceptoion&lt;/value&gt;
+          &lt;value&gt;com.foo.sql.MyOtherViolationExceptoion&lt;/value&gt;
+        &lt;/util:set&gt;
+      &lt;/property&gt;
+    &lt;/bean&gt; 
+]]></script>
+</div></div>
+
+
 <h3><a shape="rect" name="SQLComponent-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
 



Mime
View raw message