You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2016/05/19 20:22:57 UTC

svn commit: r988663 [2/3] - in /websites/production/camel/content: ./ cache/

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Thu May 19 20:22:56 2016
@@ -3617,11 +3617,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the various <a shape="rect" href="examples.html">Examples</a> useful.</li></ul>
 
 <h2 id="BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</h2><p>&#160;</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Thanks</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This tutorial was kindly donated to Apache Camel by Martin Gilday.</p></div></div><h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1463498341221 {padding: 0px;}
-div.rbtoc1463498341221 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1463498341221 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1463689273852 {padding: 0px;}
+div.rbtoc1463689273852 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1463689273852 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1463498341221">
+/*]]>*/</style></p><div class="toc-macro rbtoc1463689273852">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#BookInOnePage-Preface">Preface</a></li><li><a shape="rect" href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" href="#BookInOnePage-About">About</a></li><li><a shape="rect" href="#BookInOnePage-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookInOnePage-WritingtheServer">Writing the Server</a>
@@ -3897,7 +3897,7 @@ public static void main(final String[] a
 DefaultInstrumentationAgent    INFO  JMX connector thread started on service:jmx:rmi:///jndi/rmi://claus-acer:1099/jmxrmi/camel
 ...
 ]]></script>
-</div></div><p>In the screenshot below we can see the route and its performance metrics:<br clear="none"> <span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="book-in-one-page.data/jconsole_jms_tutorial.PNG" data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="59672517" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="82923" data-linked-resource-container-version="36"></span></p><h2 id="BookInOnePage-SeeAlso.5">See Also</h2><ul><li><a shape="rect" class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/" rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect
 " class="external-link" href="http://aminsblog.wordpress.com/" rel="nofollow">Amin Abbaspour's Weblog</a></li></ul>
+</div></div><p>In the screenshot below we can see the route and its performance metrics:<br clear="none"> <span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="book-in-one-page.data/jconsole_jms_tutorial.PNG" data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="59672517" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="82923" data-linked-resource-container-version="37"></span></p><h2 id="BookInOnePage-SeeAlso.5">See Also</h2><ul><li><a shape="rect" class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/" rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect
 " class="external-link" href="http://aminsblog.wordpress.com/" rel="nofollow">Amin Abbaspour's Weblog</a></li></ul>
 
 <h2 id="BookInOnePage-Tutorial-camel-example-reportincident">Tutorial - camel-example-reportincident</h2>
 
@@ -5736,11 +5736,11 @@ So we completed the last piece in the pi
 <p>This example has been removed from <strong>Camel 2.9</strong> onwards. Apache Axis 1.4 is a very old and unsupported framework. We encourage users to use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1463498342432 {padding: 0px;}
-div.rbtoc1463498342432 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1463498342432 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1463689273935 {padding: 0px;}
+div.rbtoc1463689273935 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1463689273935 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1463498342432">
+/*]]>*/</style><div class="toc-macro rbtoc1463689273935">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" href="#BookInOnePage-Introduction">Introduction</a></li><li><a shape="rect" href="#BookInOnePage-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Maven2">Maven 2</a></li><li><a shape="rect" href="#BookInOnePage-wsdl">wsdl</a></li><li><a shape="rect" href="#BookInOnePage-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#BookInOnePage-RunningtheExample">Running the Example</a></li></ul>
@@ -17137,11 +17137,11 @@ template.send(&quot;direct:alias-verify&
 ]]></script>
 </div></div><p></p><h3 id="BookInOnePage-SeeAlso.28">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><li><a shape="rect" href="crypto.html">Crypto</a> Crypto is also available as a <a shape="rect" href="data-format.html">Data Format</a></li></ul> <h2 id="BookInOnePage-CXFComponent">CXF Component</h2><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>When using CXF as a consumer, the <a shape="rect" href="cxf-bean-component.html">CXF Bean Component</a> allows you to factor out how message payloads are received from their processing as a RESTful or SOAP web service. This has the potential of using a multitude of transports to consume web 
 services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF.</p></div></div><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>When using CXF in streaming modes (see DataFormat option), then also read about <a shape="rect" href="stream-caching.html">Stream caching</a>.</p></div></div><p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1463498358013 {padding: 0px;}
-div.rbtoc1463498358013 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1463498358013 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1463689274723 {padding: 0px;}
+div.rbtoc1463689274723 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1463689274723 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1463498358013">
+/*]]>*/</style></p><div class="toc-macro rbtoc1463689274723">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-URIformat">URI format</a></li><li><a shape="rect" href="#BookInOnePage-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Thedescriptionsofthedataformats">The descriptions of the dataformats</a>
@@ -26032,7 +26032,7 @@ template.requestBodyAndHeader(&quot;dire
 <script class="brush: sql; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ ]]></script>
 </div></div><p>CREATE TABLE CAMEL_MESSAGEPROCESSED ( processorName VARCHAR(255), messageId VARCHAR(100) )</p><p>&#160;</p><p>In <strong>Camel 2.8</strong>, we added the createdAt column:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: sql; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ ]]></script>
-</div></div><p>CREATE TABLE CAMEL_MESSAGEPROCESSED ( processorName VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP )</p><p>&#160;</p><p>&#160;</p><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body">&#160;</div></div><p class="wysiwyg-macro-body">The SQL Server&#160;<strong>TIMESTAMP</strong> type is a fixed-length binary-string type. It does not map to any of the JDBC time types: <strong>DATE</strong>, <strong>TIME</strong>, or <strong>TIMESTAMP</strong>.</p><p>&#160;</p><p>&#160;</p><p>We recommend to have a unique constraint on the columns processorName and messageId. Because the syntax for this constraint differs for database to database, we do not show it here.</p><p>Second we need to setup a <code>javax.sql.DataSource</code> in the spring XML file:&#160;{snippet:id=e1|lang=xml|url=camel/trunk/compon
 ents/camel-sql/src/test/resources/org/apache/camel/processor/idempotent/jdbc/spring.xml}</p><p>&#160;</p><p>And finally we can create our JDBC idempotent repository in the spring XML file as well:&#160;{snippet:id=e2|lang=xml|url=camel/trunk/components/camel-sql/src/test/resources/org/apache/camel/processor/idempotent/jdbc/spring.xml}</p><p>&#160;</p><p>Customize the JdbcMessageIdRepository</p><p>Starting with <strong>Camel 2.9.1</strong> you have a few options to tune the <code>org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository</code> for your needs:</p><p class="confluenceTable">&#160;</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Parameter</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Default Value</p><p>&#160;</p><p>Description</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>createTableIfNotExists</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>true</p><p>&#160;</p><p>Defines whether or not Camel should try to create the table
  if it doesn't exist.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>tableExistsString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>SELECT 1 FROM CAMEL_MESSAGEPROCESSED WHERE 1 = 0</p><p>&#160;</p><p>This query is used to figure out whether the table already exists or not. It must throw an exception to indicate the table doesn't exist.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>createString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP)</p><p>&#160;</p><p>The statement which is used to create the table.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>queryString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>SELECT COUNT(*) FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? AND messageId = ?</p><p>&#160;</p><p>The query which is used to figure out whether the message already exists in the reposi
 tory (the result is not equals to '0'). It takes two parameters. This first one is the processor name (<code>String</code>) and the second one is the message id (<code>String</code>).</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>insertString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>INSERT INTO CAMEL_MESSAGEPROCESSED (processorName, messageId, createdAt) VALUES (?, ?, ?)</p><p>&#160;</p><p>The statement which is used to add the entry into the table. It takes three parameter. The first one is the processor name (<code>String</code>), the second one is the message id (<code>String</code>) and the third one is the timestamp (<code>java.sql.Timestamp</code>) when this entry was added to the repository.</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>deleteString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>DELETE FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? AND messageId = ?</p><p>&#160;</p><p>The statement which is used to delete the 
 entry from the database. It takes two parameter. This first one is the processor name (<code>String</code>) and the second one is the message id (<code>String</code>).</p><p>&#160;</p><p>A customized <code>org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository</code> could look like:&#160;{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-sql/src/test/resources/org/apache/camel/processor/idempotent/jdbc/customized-spring.xml}</p><p>&#160;</p><p>Using the JDBC based aggregation repository</p><p><strong>Available as of Camel 2.6</strong></p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Using JdbcAggregationRepository in Camel 2.6</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">&#160;</div></div><p>In Camel 2.6, the JdbcAggregationRepository is provided in the <code>camel-jdbc-aggregator</code> component. From Camel 2
 .7 onwards, the <code>JdbcAggregationRepository</code> is provided in the <code>camel-sql</code> component.</p><p>&#160;</p><p><code>JdbcAggregationRepository</code> is an <code>AggregationRepository</code> which on the fly persists the aggregated messages. This ensures that you will not loose messages, as the default aggregator will use an in memory only <code>AggregationRepository</code>.<br clear="none"> The <code>JdbcAggregationRepository</code> allows together with Camel to provide persistent support for the <a shape="rect" href="aggregator2.html">Aggregator</a>.</p><p>It has the following options:</p><p class="confluenceTable">&#160;</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Option</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Type</p><p>&#160;</p><p>Description</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>dataSource</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>DataSource</code></p><p>&#160;</p><p><strong>Mandat
 ory:</strong> The <code>javax.sql.DataSource</code> to use for accessing the database.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>repositoryName</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>String</code></p><p>&#160;</p><p><strong>Mandatory:</strong> The name of the repository.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>transactionManager</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>TransactionManager</code></p><p>&#160;</p><p><strong>Mandatory:</strong> The <code>org.springframework.transaction.PlatformTransactionManager</code> to mange transactions for the database. The TransactionManager must be able to support databases.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>lobHandler</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>LobHandler</code></p><p>&#160;</p><p>A <code>org.springframework.jdbc.support.lob.LobHandler</code> to handle Lob t
 ypes in the database. Use this option to use a vendor specific LobHandler, for example when using Oracle.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>returnOldExchange</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>boolean</p><p>&#160;</p><p>Whether the get operation should return the old existing Exchange if any existed. By default this option is <code>false</code> to optimize as we do not need the old exchange when aggregating.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>useRecovery</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>boolean</p><p>&#160;</p><p>Whether or not recovery is enabled. This option is by default <code>true</code>. When enabled the Camel <a shape="rect" href="aggregator2.html">Aggregator</a> automatic recover failed aggregated exchange and have them resubmitted.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>recoveryInterval</code></p><p>&#160;</p><p class
 ="confluenceTd">&#160;</p><p>long</p><p>&#160;</p><p>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.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>maximumRedeliveries</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>int</p><p>&#160;</p><p>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 <code>deadLetterUri</code> option must also be provided.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>deadLetterUri</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>String</p><p>&#160;</p><p>An endpoint uri for a <a shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a> where exhausted recov
 ered Exchanges will be moved. If this option is used then the <code>maximumRedeliveries</code> option must also be provided.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>storeBodyAsText</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>boolean</p><p>&#160;</p><p><strong>Camel 2.11:</strong> Whether to store the message body as String which is human readable. By default this option is <code>false</code> storing the body in binary format.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>headersToStoreAsText</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>List&lt;String&gt;</code></p><p>&#160;</p><p><strong>Camel 2.11:</strong> Allows to store headers as String which is human readable. By default this option is disabled, storing the headers in binary format.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>optimisticLocking</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><co
 de>false</code></p><p>&#160;</p><p><strong>Camel 2.12:</strong> To turn on optimistic locking, which often would be needed in clustered environments where multiple Camel applications shared the same JDBC based aggregation repository.</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>jdbcOptimisticLockingExceptionMapper</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>&#160;</p><p>&#160;</p><p><strong>Camel 2.12:</strong> Allows to plugin a custom <code>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</code> to map vendor specific error codes to an optimistick locking error, for Camel to perform a retry. This requires <code>optimisticLocking</code> to be enabled.</p><p>&#160;</p><p>What is preserved when persisting</p><p><code>JdbcAggregationRepository</code> will only preserve any <code>Serializable</code> compatible data types. If a data type is not such a type its dropped and a <code>WARN</code> is logged. And it only persists the 
 <code>Message</code> body and the <code>Message</code> headers. The <code>Exchange</code> properties are <strong>not</strong> persisted.</p><p>From Camel 2.11 onwards you can store the message body and select(ed) headers as String in separate columns.</p><p>Recovery</p><p>The <code>JdbcAggregationRepository</code> will by default recover any failed <a shape="rect" href="exchange.html">Exchange</a>. It does this by having a background tasks that scans for failed <a shape="rect" href="exchange.html">Exchange</a>s in the persistent store. You can use the <code>checkInterval</code> option to set how often this task runs. The recovery works as transactional which ensures that Camel will try to recover and redeliver the failed <a shape="rect" href="exchange.html">Exchange</a>. Any <a shape="rect" href="exchange.html">Exchange</a> which was found to be recovered will be restored from the persistent store and resubmitted and send out again.</p><p>The following headers is set when an <a shap
 e="rect" href="exchange.html">Exchange</a> is being recovered/redelivered:</p><p class="confluenceTable">&#160;</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Header</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Type</p><p>&#160;</p><p>Description</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>Exchange.REDELIVERED</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>Boolean</p><p>&#160;</p><p>Is set to true to indicate the <a shape="rect" href="exchange.html">Exchange</a> is being redelivered.</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>Exchange.REDELIVERY_COUNTER</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>Integer</p><p>&#160;</p><p>The redelivery attempt, starting from 1.</p><p>&#160;</p><p>Only when an <a shape="rect" href="exchange.html">Exchange</a> has been successfully processed it will be marked as complete which happens when the <code>confirm</code> method is invoked on the <code>AggregationReposito
 ry</code>. This means if the same <a shape="rect" href="exchange.html">Exchange</a> fails again it will be kept retried until it success.</p><p>You can use option <code>maximumRedeliveries</code> to limit the maximum number of redelivery attempts for a given recovered <a shape="rect" href="exchange.html">Exchange</a>. You must also set the <code>deadLetterUri</code> option so Camel knows where to send the <a shape="rect" href="exchange.html">Exchange</a> when the <code>maximumRedeliveries</code> was hit.</p><p>You can see some examples in the unit tests of camel-sql, for example <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregateRecoverDeadLetterChannelTest.java">this test</a>.</p><p>Database</p><p>To be operational, each aggregator uses two table: the aggregation and completed one. By convention the completed has the same name as the aggregation one suffix
 ed with <code>"_COMPLETED"</code>. The name must be configured in the Spring bean with the <code>RepositoryName</code> property. In the following example aggregation will be used.</p><p>The table structure definition of both table are identical: in both case a String value is used as key (<strong>id</strong>) whereas a Blob contains the exchange serialized in byte array.<br clear="none"> However one difference should be remembered: the <strong>id</strong> field does not have the same content depending on the table.<br clear="none"> In the aggregation table <strong>id</strong> holds the correlation Id used by the component to aggregate the messages. In the completed table, <strong>id</strong> holds the id of the exchange stored in corresponding the blob field.</p><p>Here is the SQL query used to create the tables, just replace <code>"aggregation"</code> with your aggregator repository name.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
  pdl">
+</div></div><p>CREATE TABLE CAMEL_MESSAGEPROCESSED ( processorName VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP )</p><p>&#160;</p><p>&#160;</p><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body">&#160;</div></div><p class="wysiwyg-macro-body">The SQL Server&#160;<strong>TIMESTAMP</strong> type is a fixed-length binary-string type. It does not map to any of the JDBC time types: <strong>DATE</strong>, <strong>TIME</strong>, or <strong>TIMESTAMP</strong>.</p><p>&#160;</p><p>&#160;</p><p>We recommend to have a unique constraint on the columns processorName and messageId. Because the syntax for this constraint differs for database to database, we do not show it here.</p><p>Second we need to setup a <code>javax.sql.DataSource</code> in the spring XML file:</p><p>&#160;</p>{snippet:id=e1|lang=xml|url=camel/t
 runk/components/camel-sql/src/test/resources/org/apache/camel/processor/idempotent/jdbc/spring.xml}<p></p><p>&#160;</p><p>And finally we can create our JDBC idempotent repository in the spring XML file as well:</p><p>&#160;</p>{snippet:id=e2|lang=xml|url=camel/trunk/components/camel-sql/src/test/resources/org/apache/camel/processor/idempotent/jdbc/spring.xml}<p></p><p>&#160;</p><p>Customize the JdbcMessageIdRepository</p><p>Starting with <strong>Camel 2.9.1</strong> you have a few options to tune the <code>org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository</code> for your needs:</p><p class="confluenceTable">&#160;</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Parameter</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Default Value</p><p>&#160;</p><p>Description</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>createTableIfNotExists</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>true</p><p>&#160;</p><p>Defines whether or not Camel sh
 ould try to create the table if it doesn't exist.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>tableExistsString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>SELECT 1 FROM CAMEL_MESSAGEPROCESSED WHERE 1 = 0</p><p>&#160;</p><p>This query is used to figure out whether the table already exists or not. It must throw an exception to indicate the table doesn't exist.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>createString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP)</p><p>&#160;</p><p>The statement which is used to create the table.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>queryString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>SELECT COUNT(*) FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? AND messageId = ?</p><p>&#160;</p><p>The query which is used to figure out whether the message 
 already exists in the repository (the result is not equals to '0'). It takes two parameters. This first one is the processor name (<code>String</code>) and the second one is the message id (<code>String</code>).</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>insertString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>INSERT INTO CAMEL_MESSAGEPROCESSED (processorName, messageId, createdAt) VALUES (?, ?, ?)</p><p>&#160;</p><p>The statement which is used to add the entry into the table. It takes three parameter. The first one is the processor name (<code>String</code>), the second one is the message id (<code>String</code>) and the third one is the timestamp (<code>java.sql.Timestamp</code>) when this entry was added to the repository.</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>deleteString</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>DELETE FROM CAMEL_MESSAGEPROCESSED WHERE processorName = ? AND messageId = ?</p><p>&#160;</p><p>The statement 
 which is used to delete the entry from the database. It takes two parameter. This first one is the processor name (<code>String</code>) and the second one is the message id (<code>String</code>).</p><p>&#160;</p><p>A customized <code>org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository</code> could look like:</p><p>&#160;</p>{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-sql/src/test/resources/org/apache/camel/processor/idempotent/jdbc/customized-spring.xml}<p></p><p>&#160;</p><p>Using the JDBC based aggregation repository</p><p><strong>Available as of Camel 2.6</strong></p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Using JdbcAggregationRepository in Camel 2.6</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">&#160;</div></div><p>In Camel 2.6, the JdbcAggregationRepository is provided in the <code>camel-jdbc
 -aggregator</code> component. From Camel 2.7 onwards, the <code>JdbcAggregationRepository</code> is provided in the <code>camel-sql</code> component.</p><p>&#160;</p><p><code>JdbcAggregationRepository</code> is an <code>AggregationRepository</code> which on the fly persists the aggregated messages. This ensures that you will not loose messages, as the default aggregator will use an in memory only <code>AggregationRepository</code>.<br clear="none"> The <code>JdbcAggregationRepository</code> allows together with Camel to provide persistent support for the <a shape="rect" href="aggregator2.html">Aggregator</a>.</p><p>It has the following options:</p><p class="confluenceTable">&#160;</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Option</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Type</p><p>&#160;</p><p>Description</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>dataSource</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>DataSourc
 e</code></p><p>&#160;</p><p><strong>Mandatory:</strong> The <code>javax.sql.DataSource</code> to use for accessing the database.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>repositoryName</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>String</code></p><p>&#160;</p><p><strong>Mandatory:</strong> The name of the repository.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>transactionManager</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>TransactionManager</code></p><p>&#160;</p><p><strong>Mandatory:</strong> The <code>org.springframework.transaction.PlatformTransactionManager</code> to mange transactions for the database. The TransactionManager must be able to support databases.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>lobHandler</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>LobHandler</code></p><p>&#160;</p><p>A <code>org.springframework.jdbc.sup
 port.lob.LobHandler</code> to handle Lob types in the database. Use this option to use a vendor specific LobHandler, for example when using Oracle.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>returnOldExchange</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>boolean</p><p>&#160;</p><p>Whether the get operation should return the old existing Exchange if any existed. By default this option is <code>false</code> to optimize as we do not need the old exchange when aggregating.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>useRecovery</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>boolean</p><p>&#160;</p><p>Whether or not recovery is enabled. This option is by default <code>true</code>. When enabled the Camel <a shape="rect" href="aggregator2.html">Aggregator</a> automatic recover failed aggregated exchange and have them resubmitted.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>recove
 ryInterval</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>long</p><p>&#160;</p><p>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.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>maximumRedeliveries</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>int</p><p>&#160;</p><p>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 <code>deadLetterUri</code> option must also be provided.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>deadLetterUri</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>String</p><p>&#160;</p><p>An endpoint uri for a <a shape="rect" href="dead-letter-channel.html">Dea
 d Letter Channel</a> where exhausted recovered Exchanges will be moved. If this option is used then the <code>maximumRedeliveries</code> option must also be provided.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>storeBodyAsText</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>boolean</p><p>&#160;</p><p><strong>Camel 2.11:</strong> Whether to store the message body as String which is human readable. By default this option is <code>false</code> storing the body in binary format.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>headersToStoreAsText</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>List&lt;String&gt;</code></p><p>&#160;</p><p><strong>Camel 2.11:</strong> Allows to store headers as String which is human readable. By default this option is disabled, storing the headers in binary format.</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>optimisticLocking</code></p><p>&#160;</
 p><p class="confluenceTd">&#160;</p><p><code>false</code></p><p>&#160;</p><p><strong>Camel 2.12:</strong> To turn on optimistic locking, which often would be needed in clustered environments where multiple Camel applications shared the same JDBC based aggregation repository.</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>jdbcOptimisticLockingExceptionMapper</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>&#160;</p><p>&#160;</p><p><strong>Camel 2.12:</strong> Allows to plugin a custom <code>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</code> to map vendor specific error codes to an optimistick locking error, for Camel to perform a retry. This requires <code>optimisticLocking</code> to be enabled.</p><p>&#160;</p><p>What is preserved when persisting</p><p><code>JdbcAggregationRepository</code> will only preserve any <code>Serializable</code> compatible data types. If a data type is not such a type its dropped and a <code>WARN</
 code> is logged. And it only persists the <code>Message</code> body and the <code>Message</code> headers. The <code>Exchange</code> properties are <strong>not</strong> persisted.</p><p>From Camel 2.11 onwards you can store the message body and select(ed) headers as String in separate columns.</p><p>Recovery</p><p>The <code>JdbcAggregationRepository</code> will by default recover any failed <a shape="rect" href="exchange.html">Exchange</a>. It does this by having a background tasks that scans for failed <a shape="rect" href="exchange.html">Exchange</a>s in the persistent store. You can use the <code>checkInterval</code> option to set how often this task runs. The recovery works as transactional which ensures that Camel will try to recover and redeliver the failed <a shape="rect" href="exchange.html">Exchange</a>. Any <a shape="rect" href="exchange.html">Exchange</a> which was found to be recovered will be restored from the persistent store and resubmitted and send out again.</p><p>Th
 e following headers is set when an <a shape="rect" href="exchange.html">Exchange</a> is being recovered/redelivered:</p><p class="confluenceTable">&#160;</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Header</p><p>&#160;</p><p class="confluenceTh">&#160;</p><p>Type</p><p>&#160;</p><p>Description</p><p>&#160;</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>Exchange.REDELIVERED</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>Boolean</p><p>&#160;</p><p>Is set to true to indicate the <a shape="rect" href="exchange.html">Exchange</a> is being redelivered.</p><p>&#160;</p><p class="confluenceTd">&#160;</p><p><code>Exchange.REDELIVERY_COUNTER</code></p><p>&#160;</p><p class="confluenceTd">&#160;</p><p>Integer</p><p>&#160;</p><p>The redelivery attempt, starting from 1.</p><p>&#160;</p><p>Only when an <a shape="rect" href="exchange.html">Exchange</a> has been successfully processed it will be marked as complete which happens when the <code>confirm</code> method i
 s invoked on the <code>AggregationRepository</code>. This means if the same <a shape="rect" href="exchange.html">Exchange</a> fails again it will be kept retried until it success.</p><p>You can use option <code>maximumRedeliveries</code> to limit the maximum number of redelivery attempts for a given recovered <a shape="rect" href="exchange.html">Exchange</a>. You must also set the <code>deadLetterUri</code> option so Camel knows where to send the <a shape="rect" href="exchange.html">Exchange</a> when the <code>maximumRedeliveries</code> was hit.</p><p>You can see some examples in the unit tests of camel-sql, for example <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregateRecoverDeadLetterChannelTest.java">this test</a>.</p><p>Database</p><p>To be operational, each aggregator uses two table: the aggregation and completed one. By convention the completed has t
 he same name as the aggregation one suffixed with <code>"_COMPLETED"</code>. The name must be configured in the Spring bean with the <code>RepositoryName</code> property. In the following example aggregation will be used.</p><p>The table structure definition of both table are identical: in both case a String value is used as key (<strong>id</strong>) whereas a Blob contains the exchange serialized in byte array.<br clear="none"> However one difference should be remembered: the <strong>id</strong> field does not have the same content depending on the table.<br clear="none"> In the aggregation table <strong>id</strong> holds the correlation Id used by the component to aggregate the messages. In the completed table, <strong>id</strong> holds the id of the exchange stored in corresponding the blob field.</p><p>Here is the SQL query used to create the tables, just replace <code>"aggregation"</code> with your aggregator repository name.</p><div class="code panel pdl" style="border-width: 
 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: sql; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ ]]></script>
 </div></div><p>CREATE TABLE aggregation ( id varchar(255) NOT NULL, exchange blob NOT NULL, constraint aggregation_pk PRIMARY KEY (id) ); CREATE TABLE aggregation_completed ( id varchar(255) NOT NULL, exchange blob NOT NULL, constraint aggregation_completed_pk PRIMARY KEY (id) );</p><p>&#160;</p><p>Storing body and headers as text</p><p><strong>Available as of Camel 2.11</strong></p><p>You can configure the <code>JdbcAggregationRepository</code> to store message body and select(ed) headers as String in separate columns. For example to store the body, and the following two headers <code>companyName</code> and <code>accountName</code> use the following SQL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: sql; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ ]]></script>

Modified: websites/production/camel/content/book-tutorials.html
==============================================================================
--- websites/production/camel/content/book-tutorials.html (original)
+++ websites/production/camel/content/book-tutorials.html Thu May 19 20:22:56 2016
@@ -143,11 +143,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the various <a shape="rect" href="examples.html">Examples</a> useful.</li></ul>
 
 <h2 id="BookTutorials-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</h2><p>&#160;</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Thanks</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This tutorial was kindly donated to Apache Camel by Martin Gilday.</p></div></div><h2 id="BookTutorials-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1462728111379 {padding: 0px;}
-div.rbtoc1462728111379 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1462728111379 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1463689269720 {padding: 0px;}
+div.rbtoc1463689269720 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1463689269720 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1462728111379">
+/*]]>*/</style></p><div class="toc-macro rbtoc1463689269720">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookTutorials-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#BookTutorials-Preface">Preface</a></li><li><a shape="rect" href="#BookTutorials-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookTutorials-Distribution">Distribution</a></li><li><a shape="rect" href="#BookTutorials-About">About</a></li><li><a shape="rect" href="#BookTutorials-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookTutorials-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookTutorials-WritingtheServer">Writing the Server</a>
@@ -423,7 +423,7 @@ public static void main(final String[] a
 DefaultInstrumentationAgent    INFO  JMX connector thread started on service:jmx:rmi:///jndi/rmi://claus-acer:1099/jmxrmi/camel
 ...
 ]]></script>
-</div></div><p>In the screenshot below we can see the route and its performance metrics:<br clear="none"> <span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="book-tutorials.data/jconsole_jms_tutorial.PNG" data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="59672517" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="82923" data-linked-resource-container-version="36"></span></p><h2 id="BookTutorials-SeeAlso">See Also</h2><ul><li><a shape="rect" class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/" rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect" cl
 ass="external-link" href="http://aminsblog.wordpress.com/" rel="nofollow">Amin Abbaspour's Weblog</a></li></ul>
+</div></div><p>In the screenshot below we can see the route and its performance metrics:<br clear="none"> <span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="book-tutorials.data/jconsole_jms_tutorial.PNG" data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="59672517" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="82923" data-linked-resource-container-version="37"></span></p><h2 id="BookTutorials-SeeAlso">See Also</h2><ul><li><a shape="rect" class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/" rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect" cl
 ass="external-link" href="http://aminsblog.wordpress.com/" rel="nofollow">Amin Abbaspour's Weblog</a></li></ul>
 
 <h2 id="BookTutorials-Tutorial-camel-example-reportincident">Tutorial - camel-example-reportincident</h2>
 
@@ -2262,11 +2262,11 @@ So we completed the last piece in the pi
 <p>This example has been removed from <strong>Camel 2.9</strong> onwards. Apache Axis 1.4 is a very old and unsupported framework. We encourage users to use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1462728111549 {padding: 0px;}
-div.rbtoc1462728111549 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1462728111549 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1463689269942 {padding: 0px;}
+div.rbtoc1463689269942 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1463689269942 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1462728111549">
+/*]]>*/</style><div class="toc-macro rbtoc1463689269942">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookTutorials-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookTutorials-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookTutorials-Distribution">Distribution</a></li><li><a shape="rect" href="#BookTutorials-Introduction">Introduction</a></li><li><a shape="rect" href="#BookTutorials-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookTutorials-Maven2">Maven 2</a></li><li><a shape="rect" href="#BookTutorials-wsdl">wsdl</a></li><li><a shape="rect" href="#BookTutorials-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#BookTutorials-RunningtheExample">Running the Example</a></li></ul>

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

Modified: websites/production/camel/content/camel-jmx.html
==============================================================================
--- websites/production/camel/content/camel-jmx.html (original)
+++ websites/production/camel/content/camel-jmx.html Thu May 19 20:22:56 2016
@@ -207,7 +207,7 @@ java.lang.SecurityException: Unauthorize
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[SUNJMX=-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=1616 \
 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
 ]]></script>
-</div></div><p>(The SUNJMX environment variable is simple used by the startup script for Camel, as additional startup parameters for the JVM. If you start Camel directly, you'll have to pass these parameters yourself.)</p><h4 id="CamelJMX-jmxAgentPropertiesReference">jmxAgent Properties Reference</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Spring property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>System property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JMX agent name, and it is not optional</p></td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"><p><code>usePlatformMBeanServer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.usePlatformMBeanServer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code>, <code>true</code> - Release 1.5 or later</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, it will use the <code>MBeanServer</code> from the JVM</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanServerDefaultDomain</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanServerDefaultDomain</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The default JMX domain of the <code>MBeanServer</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanObjectDomainName</code><
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanObjectDomainName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JMX domain that all object names will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>createConnector</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.createRmiConnect</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 we should create a JMX connector (to allow remote management) for the <code>MBeanServer</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registryPort</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.registryPort</code></p></td><td colspan="1" 
 rowspan="1" class="confluenceTd"><p><code>1099</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI registry will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectorPort</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.connectorPort</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-1 (dynamic)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI server will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceUrlPath</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.serviceUrlPath</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>/jmxrmi/camel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The path that JMX connector will be registered under</p></td></tr><tr><td colspan="1" rowspan=
 "1" class="confluenceTd"><p><code>onlyRegisterProcessorWithCustomId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.onlyRegisterProcessorWithCustomId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.0:</strong> If this option is enabled then only processors with a custom id set will be registered. This allows you to filer out unwanted processors in the JMX console.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>statisticsLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>All / Default</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> Configures the level for whether performance statistics is enabled for the MBean. See section <em>Configuring level of granularity
  for performance statistics</em> for more details. From <strong>Camel 2.16</strong> onwards the All option is renamed to Default, and a new Extended option has been introduced which allows gathered additional runtime JMX metrics.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>includeHostName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.includeHostName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.13:</strong> Whether to include the hostname in the MBean naming. From Camel 2.13 onwards this is default <code>false</code>, where as in older releases its default <code>true</code>. You can use this option to restore old behavior if really needed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>useHostIPAddress</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.
 camel.jmx.useHostIPAddress</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Whether to use hostname or IP Address in the service url when creating the remote connector. By default the hostname will be used.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>loadStatisticsEnabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.jmx.loadStatisticsEnabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong>Whether load statistics is enabled (gathers load statistics using a background thread per CamelContext).</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>endpointRuntimeStatisticsEnabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.jmx.endpointRuntimeStatisticsE
 nabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>true</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints).</td></tr></tbody></table></div><h4 id="CamelJMX-ConfiguringwhethertoregisterMBeansalways,fornewroutesorjustbydefault">Configuring whether to register MBeans always, for new routes or just by default</h4><p><strong>Available as of Camel 2.7</strong></p><p>Camel now offers 2 settings to control whether or not to register mbeans</p><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>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registerAlways</code></p></td><td colspan="1" r
 owspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If enabled then MBeans is always registered.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registerNewRoutes</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 enabled then adding new routes after <a shape="rect" href="camelcontext.html">CamelContext</a> has been started will also register MBeans from that given route.</p></td></tr></tbody></table></div><p>By default Camel registers MBeans for all the routes configured when its starting. The <code>registerNewRoutes</code> option control if MBeans should also be registered if you add new routes thereafter. You can disable this, if you for example add and remove temporary routes where management is not needed.</p><p>Be a bit caution to use the <code>registerAlways</code> option when using dynamic <a
  shape="rect" href="eip.html">EIP</a> patterns such as the <a shape="rect" href="recipient-list.html">Recipient List</a> having unique endpoints. If so then each unique endpoint and its associated services/producers would also be registered. This could potential lead to system degration due the rising number of mbeans in the registry. A MBean is not a light-weight object and thus consumes memory.</p><h3 id="CamelJMX-MonitoringCamelusingJMX">Monitoring Camel using JMX</h3><h4 id="CamelJMX-UsingJConsoletomonitorCamel">Using JConsole to monitor Camel</h4><p>The <code>CamelContext</code> should appear in the list of local connections, if you are running JConsole on the same host as Camel.</p><p>To connect to a remote Camel instance, or if the local process does not show up, use Remote Process option, and enter an URL. Here is an example localhost URL:service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel</p><p>Using the Apache Camel with JConsole</p><p><span class="confluence-embedde
 d-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="camel-jmx.data/camel-jmx.png" data-image-src="/confluence/download/attachments/85697/camel-jmx.png?version=1&amp;modificationDate=1224680681000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="9224" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="camel-jmx.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="85697" data-linked-resource-container-version="79"></span></p><h4 id="CamelJMX-Whichendpointsareregistered">Which endpoints are registered</h4><p>In <strong>Camel 2.1</strong> onwards <strong>only</strong> <code>singleton</code> endpoints are registered as the overhead for non singleton will be substantial in cases where thousands or millions of endpoints are used. This can happens when using a <a shape="rect" href="recipien
 t-list.html">Recipient List</a> EIP or from a <code>ProducerTemplate</code> that sends a lot of messages.</p><h4 id="CamelJMX-Whichprocessorsareregistered">Which processors are registered</h4><p>See <a shape="rect" href="why-is-my-processor-not-showing-up-in-jconsole.html">this FAQ</a>.</p><h4 id="CamelJMX-HowtousetheJMXNotificationListenertolistenthecamelevents?">How to use the JMX NotificationListener to listen the camel events?</h4><p>The Camel notification events give a coarse grained overview what is happening. You can see lifecycle event from context and endpoints and you can see exchanges being received by and sent to endpoints.</p><p>From <strong>Camel 2.4</strong> you can use a custom JMX NotificationListener to listen the camel events.<br clear="none"> First you need to set up a JmxNotificationEventNotifier before you start the CamelContext.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>(The SUNJMX environment variable is simple used by the startup script for Camel, as additional startup parameters for the JVM. If you start Camel directly, you'll have to pass these parameters yourself.)</p><h4 id="CamelJMX-jmxAgentPropertiesReference">jmxAgent Properties Reference</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Spring property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>System property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JMX agent name, and it is not optional</p></td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"><p><code>usePlatformMBeanServer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.usePlatformMBeanServer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code>, <code>true</code> - Release 1.5 or later</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, it will use the <code>MBeanServer</code> from the JVM</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanServerDefaultDomain</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanServerDefaultDomain</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The default JMX domain of the <code>MBeanServer</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanObjectDomainName</code><
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanObjectDomainName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JMX domain that all object names will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>createConnector</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.createRmiConnect</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 we should create a JMX connector (to allow remote management) for the <code>MBeanServer</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registryPort</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.registryPort</code></p></td><td colspan="1" 
 rowspan="1" class="confluenceTd"><p><code>1099</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI registry will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectorPort</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.connectorPort</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-1 (dynamic)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI server will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceUrlPath</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.serviceUrlPath</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>/jmxrmi/camel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The path that JMX connector will be registered under</p></td></tr><tr><td colspan="1" rowspan=
 "1" class="confluenceTd"><p><code>onlyRegisterProcessorWithCustomId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.onlyRegisterProcessorWithCustomId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.0:</strong> If this option is enabled then only processors with a custom id set will be registered. This allows you to filer out unwanted processors in the JMX console.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>statisticsLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>All / Default</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> Configures the level for whether performance statistics is enabled for the MBean. See section <em>Configuring level of granularity
  for performance statistics</em> for more details. From <strong>Camel 2.16</strong> onwards the All option is renamed to Default, and a new Extended option has been introduced which allows gathered additional runtime JMX metrics.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>includeHostName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.includeHostName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.13:</strong> Whether to include the hostname in the MBean naming. From Camel 2.13 onwards this is default <code>false</code>, where as in older releases its default <code>true</code>. You can use this option to restore old behavior if really needed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>useHostIPAddress</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.
 camel.jmx.useHostIPAddress</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Whether to use hostname or IP Address in the service url when creating the remote connector. By default the hostname will be used.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>loadStatisticsEnabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.jmx.loadStatisticsEnabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong>Whether load statistics is enabled (gathers load statistics using a background thread per CamelContext).</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>endpointRuntimeStatisticsEnabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.jmx.endpointRuntimeStatisticsE
 nabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>true</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints).</td></tr></tbody></table></div><h4 id="CamelJMX-ConfiguringwhethertoregisterMBeansalways,fornewroutesorjustbydefault">Configuring whether to register MBeans always, for new routes or just by default</h4><p><strong>Available as of Camel 2.7</strong></p><p>Camel now offers 2 settings to control whether or not to register mbeans</p><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>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registerAlways</code></p></td><td colspan="1" r
 owspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If enabled then MBeans is always registered.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registerNewRoutes</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 enabled then adding new routes after <a shape="rect" href="camelcontext.html">CamelContext</a> has been started will also register MBeans from that given route.</p></td></tr></tbody></table></div><p>By default Camel registers MBeans for all the routes configured when its starting. The <code>registerNewRoutes</code> option control if MBeans should also be registered if you add new routes thereafter. You can disable this, if you for example add and remove temporary routes where management is not needed.</p><p>Be a bit caution to use the <code>registerAlways</code> option when using dynamic <a
  shape="rect" href="eip.html">EIP</a> patterns such as the <a shape="rect" href="recipient-list.html">Recipient List</a> having unique endpoints. If so then each unique endpoint and its associated services/producers would also be registered. This could potential lead to system degration due the rising number of mbeans in the registry. A MBean is not a light-weight object and thus consumes memory.</p><h3 id="CamelJMX-MonitoringCamelusingJMX">Monitoring Camel using JMX</h3><h4 id="CamelJMX-UsingJConsoletomonitorCamel">Using JConsole to monitor Camel</h4><p>The <code>CamelContext</code> should appear in the list of local connections, if you are running JConsole on the same host as Camel.</p><p>To connect to a remote Camel instance, or if the local process does not show up, use Remote Process option, and enter an URL. Here is an example localhost URL:service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel</p><p>Using the Apache Camel with JConsole</p><p><span class="confluence-embedde
 d-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="camel-jmx.data/camel-jmx.png" data-image-src="/confluence/download/attachments/85697/camel-jmx.png?version=1&amp;modificationDate=1224680681000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="9224" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="camel-jmx.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="85697" data-linked-resource-container-version="80"></span></p><h4 id="CamelJMX-Whichendpointsareregistered">Which endpoints are registered</h4><p>In <strong>Camel 2.1</strong> onwards <strong>only</strong> <code>singleton</code> endpoints are registered as the overhead for non singleton will be substantial in cases where thousands or millions of endpoints are used. This can happens when using a <a shape="rect" href="recipien
 t-list.html">Recipient List</a> EIP or from a <code>ProducerTemplate</code> that sends a lot of messages.</p><h4 id="CamelJMX-Whichprocessorsareregistered">Which processors are registered</h4><p>See <a shape="rect" href="why-is-my-processor-not-showing-up-in-jconsole.html">this FAQ</a>.</p><h4 id="CamelJMX-HowtousetheJMXNotificationListenertolistenthecamelevents?">How to use the JMX NotificationListener to listen the camel events?</h4><p>The Camel notification events give a coarse grained overview what is happening. You can see lifecycle event from context and endpoints and you can see exchanges being received by and sent to endpoints.</p><p>From <strong>Camel 2.4</strong> you can use a custom JMX NotificationListener to listen the camel events.<br clear="none"> First you need to set up a JmxNotificationEventNotifier before you start the CamelContext.</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[
 // Set up the JmxNotificationEventNotifier
 notifier = new JmxNotificationEventNotifier();
@@ -236,7 +236,7 @@ context.getManagementStrategy().getManag
     }, null);
 
 ]]></script>
-</div></div><h4 id="CamelJMX-UsingtheTracerMBeantogetfinegrainedtracing">Using the Tracer MBean to get fine grained tracing</h4><p>Additionally to the coarse grained notifications above <strong>Camel 2.9.0</strong> support JMX Notification for fine grained trace events.<br clear="none"> These can be found in the Tracer MBean. To activate fine grained tracing you first need to activate tracing on the context or on a route.<br clear="none"> This can either be done when configuring the context or on the context / route MBeans.</p><p>As a second step you have to set the <code>jmxTraceNotifications</code> attribute to <code>true</code> on the tracer. This can again be done when configuring the context or at runtime on the tracer MBean.</p><p>Now you can register for TraceEvent Notifications on the Tracer MBean using JConsole. There will be one Notification for every step on the route with all exchange and message details.</p><p><span class="confluence-embedded-file-wrapper"><img class="c
 onfluence-embedded-image confluence-content-image-border" src="camel-jmx.data/jconsole_trace_notifications.png" data-image-src="/confluence/download/attachments/85697/jconsole_trace_notifications.png?version=1&amp;modificationDate=1317961747000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28016788" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_trace_notifications.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="85697" data-linked-resource-container-version="79"></span></p><h3 id="CamelJMX-UsingJMXforyourownCamelCode">Using JMX for your own Camel Code</h3><h4 id="CamelJMX-RegisteringyourownManagedEndpoints">Registering your own Managed Endpoints</h4><p><strong>Available as of Camel 2.0</strong><br clear="none"> You can decorate your own endpoints with Spring managed annotations <code>@ManagedResource<
 /code> to allow to register them in the Camel <code>MBeanServer</code> and thus access your custom MBeans using JMX.<br clear="none"> <strong>Notice:</strong> in <strong>Camel 2.1</strong> we have changed this to apply other than just endpoints but then you need to implement the interface <code>org.apache.camel.spi.ManagementAware</code> as well. More about this later.</p><p>For example we have the following custom endpoint where we define some options to be managed:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="CamelJMX-UsingtheTracerMBeantogetfinegrainedtracing">Using the Tracer MBean to get fine grained tracing</h4><p>Additionally to the coarse grained notifications above <strong>Camel 2.9.0</strong> support JMX Notification for fine grained trace events.<br clear="none"> These can be found in the Tracer MBean. To activate fine grained tracing you first need to activate tracing on the context or on a route.<br clear="none"> This can either be done when configuring the context or on the context / route MBeans.</p><p>As a second step you have to set the <code>jmxTraceNotifications</code> attribute to <code>true</code> on the tracer. This can again be done when configuring the context or at runtime on the tracer MBean.</p><p>Now you can register for TraceEvent Notifications on the Tracer MBean using JConsole. There will be one Notification for every step on the route with all exchange and message details.</p><p><span class="confluence-embedded-file-wrapper"><img class="c
 onfluence-embedded-image confluence-content-image-border" src="camel-jmx.data/jconsole_trace_notifications.png" data-image-src="/confluence/download/attachments/85697/jconsole_trace_notifications.png?version=1&amp;modificationDate=1317961747000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28016788" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_trace_notifications.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="85697" data-linked-resource-container-version="80"></span></p><h3 id="CamelJMX-UsingJMXforyourownCamelCode">Using JMX for your own Camel Code</h3><h4 id="CamelJMX-RegisteringyourownManagedEndpoints">Registering your own Managed Endpoints</h4><p><strong>Available as of Camel 2.0</strong><br clear="none"> You can decorate your own endpoints with Spring managed annotations <code>@ManagedResource<
 /code> to allow to register them in the Camel <code>MBeanServer</code> and thus access your custom MBeans using JMX.<br clear="none"> <strong>Notice:</strong> in <strong>Camel 2.1</strong> we have changed this to apply other than just endpoints but then you need to implement the interface <code>org.apache.camel.spi.ManagementAware</code> as well. More about this later.</p><p>For example we have the following custom endpoint where we define some options to be managed:</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[
 @ManagedResource(description = &quot;Our custom managed endpoint&quot;)
 public class CustomEndpoint extends MockEndpoint implements ManagementAware&lt;CustomEndpoint&gt; {

Modified: websites/production/camel/content/console-example.html
==============================================================================
--- websites/production/camel/content/console-example.html (original)
+++ websites/production/camel/content/console-example.html Thu May 19 20:22:56 2016
@@ -141,7 +141,7 @@ Enter something:
 <p>Next, navigate to the <code>org.apache.camel.example.console.CamelConsoleMain</code> class, right-click, and select Run As &#8594; Java Application.</p>
 <div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 <p>Click on the screenshot below, to make it bigger.</p></div></div>
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-thumbnail" src="console-example.thumbs/run-as.png" data-image-src="/confluence/download/attachments/27843710/run-as.png?version=1&amp;modificationDate=1334026057000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017569" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="run-as.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="27843710" data-linked-resource-container-version="15"></span></p>
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-thumbnail" src="console-example.thumbs/run-as.png" data-image-src="/confluence/download/attachments/27843710/run-as.png?version=1&amp;modificationDate=1334026057000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017569" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="run-as.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="27843710" data-linked-resource-container-version="16"></span></p>
 
 
 <h3 id="ConsoleExample-Seealso">See also</h3>

Modified: websites/production/camel/content/debugger.html
==============================================================================
--- websites/production/camel/content/debugger.html (original)
+++ websites/production/camel/content/debugger.html Thu May 19 20:22:56 2016
@@ -121,7 +121,7 @@ protected void debugBefore(Exchange exch
     log.info(&quot;Before &quot; + definition + &quot; with body &quot; + exchange.getIn().getBody());
 }
 ]]></script>
-</div></div>Then from your Java editor just add a breakpoint inside the <code>debugBefore</code> method. Then fire up the unit test and wait for the Java editor to hit the breakpoint. Then you can inspect the <a shape="rect" href="exchange.html">Exchange</a> during debugging while it advances during routing. The <code>ProcessorDefinition</code> and the <code>id</code> and <code>shortName</code> parameters is all information which tells you where in the route the breakpoint was hit.<div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>There is also a <code>debugAfter</code> method which is invoked after the processor has been invoked. This allows you to <em>see</em> what happens to the <a shape="rect" href="exchange.html">Exchange</a> right after it has invoked a processor in the route.</p></div></div><p>The screens
 hot below shows the <a shape="rect" href="debugger.html">Debugger</a> in action. The IDE (IDEA) has hit the breakpoint and we can inspect the parameters.<br clear="none"> Notice how we can see that the message is to be send to the "mock:a" endpoint.</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="debugger.data/debug.png" data-image-src="/confluence/download/attachments/86210/debug.png?version=1&amp;modificationDate=1288586116000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346680" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="debug.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="86210" data-linked-resource-container-version="31"></span></p><h3 id="Debugger-SeeAlso">See Also</h3><ul class="alternate"><li><a shape="rect" href="tracer.html">Tracer</a></li><li><
 a shape="rect" href="backlogdebugger.html">BacklogDebugger</a></li></ul></div>
+</div></div>Then from your Java editor just add a breakpoint inside the <code>debugBefore</code> method. Then fire up the unit test and wait for the Java editor to hit the breakpoint. Then you can inspect the <a shape="rect" href="exchange.html">Exchange</a> during debugging while it advances during routing. The <code>ProcessorDefinition</code> and the <code>id</code> and <code>shortName</code> parameters is all information which tells you where in the route the breakpoint was hit.<div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>There is also a <code>debugAfter</code> method which is invoked after the processor has been invoked. This allows you to <em>see</em> what happens to the <a shape="rect" href="exchange.html">Exchange</a> right after it has invoked a processor in the route.</p></div></div><p>The screens
 hot below shows the <a shape="rect" href="debugger.html">Debugger</a> in action. The IDE (IDEA) has hit the breakpoint and we can inspect the parameters.<br clear="none"> Notice how we can see that the message is to be send to the "mock:a" endpoint.</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="debugger.data/debug.png" data-image-src="/confluence/download/attachments/86210/debug.png?version=1&amp;modificationDate=1288586116000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346680" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="debug.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="86210" data-linked-resource-container-version="32"></span></p><h3 id="Debugger-SeeAlso">See Also</h3><ul class="alternate"><li><a shape="rect" href="tracer.html">Tracer</a></li><li><
 a shape="rect" href="backlogdebugger.html">BacklogDebugger</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/pojo-messaging-example.html
==============================================================================
--- websites/production/camel/content/pojo-messaging-example.html (original)
+++ websites/production/camel/content/pojo-messaging-example.html Thu May 19 20:22:56 2016
@@ -112,7 +112,7 @@ mvn compile camel:run
 
 <p>When you start the example up you'll see a whole bunch of logs that won't really mean anything to you <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/smile.png" data-emoticon-name="smile" alt="(smile)"> The interesting stuff is happening in the background. Here's a diagram of whats going on.</p>
 
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="pojo-messaging-example.data/pojo-messaging.jpg" data-image-src="/confluence/download/attachments/108577/pojo-messaging.jpg?version=1&amp;modificationDate=1233062777000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="9645" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="pojo-messaging.jpg" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="108577" data-linked-resource-container-version="21"></span></p>
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="pojo-messaging-example.data/pojo-messaging.jpg" data-image-src="/confluence/download/attachments/108577/pojo-messaging.jpg?version=1&amp;modificationDate=1233062777000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="9645" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="pojo-messaging.jpg" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="108577" data-linked-resource-container-version="22"></span></p>
 
 <p>At step 1 the <code>SendFileRecordsToQueueBean</code> polls the <code>./src/data</code> directory for new files. There are 3 files in this directory so 3 messages will be created. As shown below, the <a shape="rect" href="pojo-consuming.html"><code>@Consume</code></a> annotation will cause any new messages coming from the <code>file:src/data endpoint</code> to be sent to the <code>onFileSendToQueue</code> method.</p>
 

Modified: websites/production/camel/content/route-throttling-example.html
==============================================================================
--- websites/production/camel/content/route-throttling-example.html (original)
+++ websites/production/camel/content/route-throttling-example.html Thu May 19 20:22:56 2016
@@ -150,7 +150,7 @@
 For example you can change the option <code>maxInflightExchanges</code> while its running to find a more suitable value.</p>
 
 <p>The screenshot below illustrates it from a JConsole.<br clear="none">
-<span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="route-throttling-example.data/throttling%20services.png" data-image-src="/confluence/download/attachments/5604305/throttling%20services.png?version=1&amp;modificationDate=1257166177000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="5865480" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="throttling services.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="5604305" data-linked-resource-container-version="16"></span></p>
+<span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="route-throttling-example.data/throttling%20services.png" data-image-src="/confluence/download/attachments/5604305/throttling%20services.png?version=1&amp;modificationDate=1257166177000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="5865480" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="throttling services.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="5604305" data-linked-resource-container-version="17"></span></p>
 
 <p>See more at <a shape="rect" href="camel-jmx.html">using JMX with Camel</a>.</p>