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 2015/04/05 10:19:06 UTC

svn commit: r946383 - in /websites/production/camel/content: cache/main.pageCache camel-2160-release.html type-converter.html

Author: buildbot
Date: Sun Apr  5 08:19:05 2015
New Revision: 946383

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/camel-2160-release.html
    websites/production/camel/content/type-converter.html

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

Modified: websites/production/camel/content/camel-2160-release.html
==============================================================================
--- websites/production/camel/content/camel-2160-release.html (original)
+++ websites/production/camel/content/camel-2160-release.html Sun Apr  5 08:19:05 2015
@@ -84,7 +84,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h1 id="Camel2.16.0Release-Camel2.16.0release(currentlyinprogress)">Camel 2.16.0&#160;release (currently in progress)</h1><div style="padding-right:20px;float:left;margin-left:-20px;"><p><img class="confluence-embedded-image confluence-external-resource" src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png" data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"></p></div><div style="min-height:200px">&#160;</div><h2 id="Camel2.16.0Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to the x.y.z release which approx XXX issues resolved (new features, improvements and bug fixes such as...)</p><p>Noteworthy improvements:</p><ul><li>The route models (definition classes) preserve property placeholders, which allows round trip editing, and also prevents showing potential sensitive information</li><li>Added onPrepareFailure option to&#160;<a shape="rect" href="dead-letter-channel.html">Dead Letter Cha
 nnel</a> to allow a custom processor to prepare the Exchange before sending to the dead letter queue.</li><li><a shape="rect" href="mongodb.html">MongoDB</a> tailable consumers now allow setting the <code>readPreference</code> option.</li><li>Using setFaultBody / setFaultHeader behaves similar to setBody / setHeader to preserve existing headers/attachments by setting on existing IN or OUT message.</li><li>Java DSL using choice with end vs endChoice now validates you use them as intended. Any misconfiguration now throws an exception explaining the problem.</li><li><a shape="rect" href="pojo-producing.html">POJO Producing</a> and&#160;<a shape="rect" href="pojo-consuming.html">POJO Consuming</a> lifecycle is now in sync with <a shape="rect" href="camelcontext.html">CamelContext</a>&#160;which ensures it works as similar to Camel&#160;<a shape="rect" href="routes.html">Routes</a> does. Also the created producer/consumer is stopped when&#160;<a shape="rect" href="camelcontext.html">Came
 lContext</a>&#160;is stopping to cleanup properly.</li><li><a shape="rect" href="jms.html">JMS</a>&#160;component now allows configuring concurrentConsumers/maxConcurrentConsumers separately between from(jms) vs to(jms) using request/reply over JMS</li><li><span><a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8506">Added SEARCH</a> operation to Elasticsearch component</span></li><li><span>The&#160;<a shape="rect" href="properties.html">Properties</a> component (property placeholder) now supports an encoding option to allow reading the .properties files using a specific charset such as UTF-8. By default ISO-8859-1 is used (latin1)</span></li><li><span>Added&#160;<code>receviveBufferSize</code> option to the <a shape="rect" href="ftp.html">FTP</a>&#160;component to make download faster. The size is by default 32kb buffer.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> EIP now allows an external source using
  a&#160;<code>AggregateController</code> to control the aggregator, such as for forcing completing a group or all groups, or query runtime information from the aggregator. A default controller is provided out of the box if none has been configured.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> now enlists in JMX using a&#160;<code>ManagedAggregateProcessorMBean</code> which has more information, and also allows using the aggregate controller to control it.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> now includes more runtime statistics which can be accessed from Java and JMX about number of incoming and completed exchanges, and per different completion triggers.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> now supports pre-completion mode if the aggregation strategy implements&#160;<code>PreCompletionAwareAggregationStrategy</code>. This supports the use-case wh
 ere an incoming Exchange are used to determine if the current aggregated group is completed or not. If completed the group is emitted as-is, and the new incoming Exchange is used to start a new group from scratch.</span></li><li><span>Added options to&#160;<a shape="rect" href="mail.html">Mail</a> consumer so it can skip or handle a mail message that cannot be read from the mail server in the batch; and then move on to read the next message. This ensures the consumer can deal with mail boxes that has problematic mails that otherwise will cause no mails to be retrieve by the consumer in the batch.</span></li><li>The runtime route processors and their corresponding model definition are now linked by their id using <code>HasId</code>, so its easier to obtain the processor or model definition from the <code>getProcessor(id)</code>&#160;and <code>getProcessorDefintion(id)</code>&#160;api on CamelContext.</li><li>CamelContext now also includes a getManagedProcessor API to easily get the m
 bean client api for the processor, so you can access the runtime JMX statistics from Java code.&#160;</li><li><span><a shape="rect" href="spring-boot.html">Spring Boot</a> applications now <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8532">block the main thread of the execution</a></span></li><li><span><a shape="rect" href="spring-boot.html">Spring Boot</a> automagically <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8523">loads XML routes definitions</a> from classpath</span></li><li><span>Added&#160;<code>MainListener</code> to make it easier for Camel Boot / Standalone Camel to implement custom logic to trigger during the starting and stopping of the application.</span></li><li><span><span>Camel Jackson now provides <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8554"><code>Map</code> to <code>Object</code> converter</a></span></span></li><li><span>Ability 
 to refer to existing hazelcast instance by id, using&#160;<a shape="rect" href="hazelcast-component.html">Hazelcast Component</a></span></li><li><a shape="rect" href="direct.html">Direct</a> and&#160;<a shape="rect" href="direct-vm.html">Direct-VM</a> now supports the&#160;<span>failIfNoConsumers option</span></li></ul><p>Fixed the following issues:</p><ul><li>File language now properly supports file extensions having double dots, such as .tar.gz</li><li>Fixed issue with doTry not stopping routing if a fault message was set using setFaultBody within the doTry.</li><li>Fixed&#160;<a shape="rect" href="bean.html">Bean</a>&#160;language to support end parenthesis in quoted string literals as part of method parameters, and not as end of method signature.&#160;</li><li>Fixed&#160;<a shape="rect" href="ftp2.html">FTP2</a> using&#160;<code>pollEnrich</code> with disconnect=true and delete=true, would disconnect before deleting the file. Now we disconnect last.</li><li>Various EIPs such as&
 #160;<a shape="rect" href="splitter.html">Splitter</a>,&#160;<a shape="rect" href="recipient-list.html">Recipient List</a>,&#160;<a shape="rect" href="multicast.html">Multicast</a> no longer reuse message id in their sub messages, but each sub message has its own unique message id (just as the exchange has).</li><li>Fixed an issue with the circuit breaker&#160;<a shape="rect" href="load-balancer.html">Load Balancer</a> not honoring the half open after period after an error was detected.</li></ul><h3 id="Camel2.16.0Release-New">New <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></h3><h3 id="Camel2.16.0Release-New.1">New <a shape="rect" href="components.html">Components</a></h3><ul><li><a shape="rect" href="paho.html">camel-paho</a>&#160;- For MQTT messaging using Eclipse Paho client</li></ul><h3 id="Camel2.16.0Release-NewDSL">New DSL</h3><h3 id="Camel2.16.0Release-NewAnnotations">New Annotations</h3><h3 id="Camel2.16.0Release-NewDataFor
 mats">New <a shape="rect" href="data-format.html">Data Formats</a></h3><ul><li><a shape="rect" href="boon.html">camel-boon</a> - For mapping POJO to/from json</li></ul><h3 id="Camel2.16.0Release-New.2">New <a shape="rect" href="languages.html">Languages</a></h3><h3 id="Camel2.16.0Release-New.3">New <a shape="rect" href="examples.html">Examples</a></h3><h3 id="Camel2.16.0Release-New.4">New <a shape="rect" href="tutorials.html">Tutorials</a></h3><h2 id="Camel2.16.0Release-APIbreaking">API breaking</h2><h2 id="Camel2.16.0Release-KnownIssues">Known Issues</h2><h2 id="Camel2.16.0Release-Dependencyupgrades">Dependency upgrades</h2><ul><li>MongoDB Java Driver from 2.12.4 to 2.13.0.</li><li>Embed MongoDB test harness from 1.46.4 to 1.47.0.</li><li>Jsonpath from 1.2.0 to 2.0.0</li><li>Restlet from 2.2.x to 2.3.1</li><li>Various Spring version upgrades.</li></ul><h2 id="Camel2.16.0Release-Importantchangestoconsiderwhenupgrading">Important changes to consider when upgrading</h2><ul><li>The dum
 pRoutesAsXml operation now preserve property placeholder used in the route models.&#160;</li><li>Using setFaultBody / setFaultHeader behaves similar to setBody / setHeader to preserve existing headers/attachments by setting on existing IN or OUT message.</li><li>If using concurrent consumer on&#160;<a shape="rect" href="jms.html">JMS</a>&#160;endpoints for request/reply over JMS then you must use the new replyToConcurrentConsumers, replyToMaxConcurrentConsumers options to configure the values.&#160;</li><li>When the&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> is forced completed the exchange property&#160;<code>Exchange.AGGREGATED_COMPLETED_BY</code> value has been changed from "forceCompletion" to "force" so its named like the other completion triggers.</li><li>Removed unsupported modules camel-web and camel-web-standalone.</li><li>Removed unsupported camel:dot functionality from camel:run plugin.</li><li>Removed unsupported camel-archetype-scala-component from mav
 en archetypes.</li></ul><h2 id="Camel2.16.0Release-GettingtheDistributions">Getting the Distributions</h2><h3 id="Camel2.16.0Release-BinaryDistributions">Binary Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Windows Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip">apache-camel-2.16.0.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip.asc">apache-camel-2.16.0.zip.asc
 </a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Unix/Linux/Cygwin Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz">apache-camel-2.16.0.tar.gz</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz.asc">apache-camel-2.16.0.tar.gz.asc</a></p></td></tr></tbody></table></div>    <div class="aui-message hint shadowed information-macro">
+<div class="wiki-content maincontent"><h1 id="Camel2.16.0Release-Camel2.16.0release(currentlyinprogress)">Camel 2.16.0&#160;release (currently in progress)</h1><div style="padding-right:20px;float:left;margin-left:-20px;"><p><img class="confluence-embedded-image confluence-external-resource" src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png" data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"></p></div><div style="min-height:200px">&#160;</div><h2 id="Camel2.16.0Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to the x.y.z release which approx XXX issues resolved (new features, improvements and bug fixes such as...)</p><p>Noteworthy improvements:</p><ul><li>The route models (definition classes) preserve property placeholders, which allows round trip editing, and also prevents showing potential sensitive information</li><li>Added onPrepareFailure option to&#160;<a shape="rect" href="dead-letter-channel.html">Dead Letter Cha
 nnel</a> to allow a custom processor to prepare the Exchange before sending to the dead letter queue.</li><li><a shape="rect" href="mongodb.html">MongoDB</a> tailable consumers now allow setting the <code>readPreference</code> option.</li><li>Using setFaultBody / setFaultHeader behaves similar to setBody / setHeader to preserve existing headers/attachments by setting on existing IN or OUT message.</li><li>Java DSL using choice with end vs endChoice now validates you use them as intended. Any misconfiguration now throws an exception explaining the problem.</li><li><a shape="rect" href="pojo-producing.html">POJO Producing</a> and&#160;<a shape="rect" href="pojo-consuming.html">POJO Consuming</a> lifecycle is now in sync with <a shape="rect" href="camelcontext.html">CamelContext</a>&#160;which ensures it works as similar to Camel&#160;<a shape="rect" href="routes.html">Routes</a> does. Also the created producer/consumer is stopped when&#160;<a shape="rect" href="camelcontext.html">Came
 lContext</a>&#160;is stopping to cleanup properly.</li><li><a shape="rect" href="jms.html">JMS</a>&#160;component now allows configuring concurrentConsumers/maxConcurrentConsumers separately between from(jms) vs to(jms) using request/reply over JMS</li><li><span><a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8506">Added SEARCH</a> operation to Elasticsearch component</span></li><li><span>The&#160;<a shape="rect" href="properties.html">Properties</a> component (property placeholder) now supports an encoding option to allow reading the .properties files using a specific charset such as UTF-8. By default ISO-8859-1 is used (latin1)</span></li><li><span>Added&#160;<code>receviveBufferSize</code> option to the <a shape="rect" href="ftp.html">FTP</a>&#160;component to make download faster. The size is by default 32kb buffer.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> EIP now allows an external source using
  a&#160;<code>AggregateController</code> to control the aggregator, such as for forcing completing a group or all groups, or query runtime information from the aggregator. A default controller is provided out of the box if none has been configured.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> now enlists in JMX using a&#160;<code>ManagedAggregateProcessorMBean</code> which has more information, and also allows using the aggregate controller to control it.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> now includes more runtime statistics which can be accessed from Java and JMX about number of incoming and completed exchanges, and per different completion triggers.</span></li><li><span>The&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> now supports pre-completion mode if the aggregation strategy implements&#160;<code>PreCompletionAwareAggregationStrategy</code>. This supports the use-case wh
 ere an incoming Exchange are used to determine if the current aggregated group is completed or not. If completed the group is emitted as-is, and the new incoming Exchange is used to start a new group from scratch.</span></li><li><span>Added options to&#160;<a shape="rect" href="mail.html">Mail</a> consumer so it can skip or handle a mail message that cannot be read from the mail server in the batch; and then move on to read the next message. This ensures the consumer can deal with mail boxes that has problematic mails that otherwise will cause no mails to be retrieve by the consumer in the batch.</span></li><li>The runtime route processors and their corresponding model definition are now linked by their id using <code>HasId</code>, so its easier to obtain the processor or model definition from the <code>getProcessor(id)</code>&#160;and <code>getProcessorDefintion(id)</code>&#160;api on CamelContext.</li><li>CamelContext now also includes a getManagedProcessor API to easily get the m
 bean client api for the processor, so you can access the runtime JMX statistics from Java code.&#160;</li><li><span><a shape="rect" href="spring-boot.html">Spring Boot</a> applications now <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8532">block the main thread of the execution</a></span></li><li><span><a shape="rect" href="spring-boot.html">Spring Boot</a> automagically <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8523">loads XML routes definitions</a> from classpath</span></li><li><span>Added&#160;<code>MainListener</code> to make it easier for Camel Boot / Standalone Camel to implement custom logic to trigger during the starting and stopping of the application.</span></li><li><span><span>Camel Jackson now provides <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CAMEL-8554"><code>Map</code> to <code>Object</code> converter</a></span></span></li><li><span>Ability 
 to refer to existing hazelcast instance by id, using&#160;<a shape="rect" href="hazelcast-component.html">Hazelcast Component</a></span></li><li><a shape="rect" href="direct.html">Direct</a> and&#160;<a shape="rect" href="direct-vm.html">Direct-VM</a> now supports the&#160;<span>failIfNoConsumers option</span></li><li>Making it easier to add custom&#160;<a shape="rect" href="type-converter.html">Type Converter</a> to your Camel applications without having to use the META-INF file. In Spring or Blueprint just add them as &lt;bean&gt;s. See more details at&#160;<a shape="rect" href="type-converter.html">Type Converter</a> documentation.</li></ul><p>Fixed the following issues:</p><ul><li>File language now properly supports file extensions having double dots, such as .tar.gz</li><li>Fixed issue with doTry not stopping routing if a fault message was set using setFaultBody within the doTry.</li><li>Fixed&#160;<a shape="rect" href="bean.html">Bean</a>&#160;language to support end parenthes
 is in quoted string literals as part of method parameters, and not as end of method signature.&#160;</li><li>Fixed&#160;<a shape="rect" href="ftp2.html">FTP2</a> using&#160;<code>pollEnrich</code> with disconnect=true and delete=true, would disconnect before deleting the file. Now we disconnect last.</li><li>Various EIPs such as&#160;<a shape="rect" href="splitter.html">Splitter</a>,&#160;<a shape="rect" href="recipient-list.html">Recipient List</a>,&#160;<a shape="rect" href="multicast.html">Multicast</a> no longer reuse message id in their sub messages, but each sub message has its own unique message id (just as the exchange has).</li><li>Fixed an issue with the circuit breaker&#160;<a shape="rect" href="load-balancer.html">Load Balancer</a> not honoring the half open after period after an error was detected.</li></ul><h3 id="Camel2.16.0Release-New">New <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></h3><h3 id="Camel2.16.0Release-Ne
 w.1">New <a shape="rect" href="components.html">Components</a></h3><ul><li><a shape="rect" href="paho.html">camel-paho</a>&#160;- For MQTT messaging using Eclipse Paho client</li></ul><h3 id="Camel2.16.0Release-NewDSL">New DSL</h3><h3 id="Camel2.16.0Release-NewAnnotations">New Annotations</h3><h3 id="Camel2.16.0Release-NewDataFormats">New <a shape="rect" href="data-format.html">Data Formats</a></h3><ul><li><a shape="rect" href="boon.html">camel-boon</a> - For mapping POJO to/from json</li></ul><h3 id="Camel2.16.0Release-New.2">New <a shape="rect" href="languages.html">Languages</a></h3><h3 id="Camel2.16.0Release-New.3">New <a shape="rect" href="examples.html">Examples</a></h3><h3 id="Camel2.16.0Release-New.4">New <a shape="rect" href="tutorials.html">Tutorials</a></h3><h2 id="Camel2.16.0Release-APIbreaking">API breaking</h2><h2 id="Camel2.16.0Release-KnownIssues">Known Issues</h2><h2 id="Camel2.16.0Release-Dependencyupgrades">Dependency upgrades</h2><ul><li>MongoDB Java Driver from 
 2.12.4 to 2.13.0.</li><li>Embed MongoDB test harness from 1.46.4 to 1.47.0.</li><li>Jsonpath from 1.2.0 to 2.0.0</li><li>Restlet from 2.2.x to 2.3.1</li><li>Various Spring version upgrades.</li></ul><h2 id="Camel2.16.0Release-Importantchangestoconsiderwhenupgrading">Important changes to consider when upgrading</h2><ul><li>The dumpRoutesAsXml operation now preserve property placeholder used in the route models.&#160;</li><li>Using setFaultBody / setFaultHeader behaves similar to setBody / setHeader to preserve existing headers/attachments by setting on existing IN or OUT message.</li><li>If using concurrent consumer on&#160;<a shape="rect" href="jms.html">JMS</a>&#160;endpoints for request/reply over JMS then you must use the new replyToConcurrentConsumers, replyToMaxConcurrentConsumers options to configure the values.&#160;</li><li>When the&#160;<a shape="rect" href="aggregator2.html">Aggregator2</a> is forced completed the exchange property&#160;<code>Exchange.AGGREGATED_COMPLETED_
 BY</code> value has been changed from "forceCompletion" to "force" so its named like the other completion triggers.</li><li>Removed unsupported modules camel-web and camel-web-standalone.</li><li>Removed unsupported camel:dot functionality from camel:run plugin.</li><li>Removed unsupported camel-archetype-scala-component from maven archetypes.</li></ul><h2 id="Camel2.16.0Release-GettingtheDistributions">Getting the Distributions</h2><h3 id="Camel2.16.0Release-BinaryDistributions">Binary Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Windows Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href
 ="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip">apache-camel-2.16.0.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.zip.asc">apache-camel-2.16.0.zip.asc</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Unix/Linux/Cygwin Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz">apache-camel-2.16.0.tar.gz</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/2.16.0/apache-camel-2.16.0.tar.gz.asc">apache-camel-2.16.0.tar.gz.asc</a></p></td></tr></tbody></table></div>    <div class="aui-message hint shadowed information-macro">
                     <p class="title">The above URLs use redirection</p>
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">

Modified: websites/production/camel/content/type-converter.html
==============================================================================
--- websites/production/camel/content/type-converter.html (original)
+++ websites/production/camel/content/type-converter.html Sun Apr  5 08:19:05 2015
@@ -86,80 +86,29 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="TypeConverter-TypeConverter">Type Converter</h2>
-
-<p>Its very common when routing messages from one endpoint to another to need to convert the body payloads from one type to another such as to convert to and from the following common types</p>
-
-<ul><li>File</li><li>String</li><li>byte[] and ByteBuffer</li><li>InputStream and OutputStream</li><li>Reader and Writer</li><li>Document and Source</li><li>...</li></ul>
-
-
-<p>The <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Message.html">Message interface</a> defines a helper method to allow conversions to be done via the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Message.html#getBody(java.lang.Class)">getBody(Class)</a> method.</p>
-
-<p>So in an endpoint you can convert a body to another type via</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-Message message = exchange.getIn();
+<div class="wiki-content maincontent"><h2 id="TypeConverter-TypeConverter">Type Converter</h2><p>Its very common when routing messages from one endpoint to another to need to convert the body payloads from one type to another such as to convert to and from the following common types</p><ul><li>File</li><li>String</li><li>byte[] and ByteBuffer</li><li>InputStream and OutputStream</li><li>Reader and Writer</li><li>Document and Source</li><li>...</li></ul><p>The <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Message.html">Message interface</a> defines a helper method to allow conversions to be done via the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Message.html#getBody(java.lang.Class)">getBody(Class)</a> method.</p><p>So in an endpoint you can convert a body to another type via</p><div class="code panel pdl" style="border-width: 1px;"><div c
 lass="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[Message message = exchange.getIn();
 Document document = message.getBody(Document.class);
 ]]></script>
-</div></div>
-
-<h3 id="TypeConverter-HowTypeConversionworks">How Type Conversion works</h3>
-
-<p>The type conversion strategy is defined by the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/TypeConverter.html">TypeConverter</a> interface that can be customized on a <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html">CamelContext</a>. </p>
-
-<p>The default implementation, <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/DefaultTypeConverter.html">DefaultTypeConverter</a>, uses pluggable strategies to load type converters via <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/TypeConverterLoader.html">TypeConverterLoader</a>. The default strategy, <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.html">AnnotationTypeConverterLoader</a>, uses a discovery mechanism to find converters.</p>
-
-<p><strong>New in Camel 1.5</strong></p>
-
-<p>The default implementation, <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/DefaultTypeConverter.html">DefaultTypeConverter</a>, now throws a <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/NoTypeConversionAvailableException.html">NoTypeConversionAvailableException</a> if a suitable conversion cannot be found (CAMEL-84). The semantical ambiguity of <code>null</code> (both valid result and indication of no conversion found) is now resolved, but this may impact existing code in that it should now catch the exception instead of checking for <code>null</code>.</p>
-
-<h3 id="TypeConverter-TypeConverterRegistry">TypeConverterRegistry</h3>
-
-<p><strong>New in Camel 2.0</strong></p>
-
-<p>Exposed the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/TypeConverterRegistry.html">TypeConverterRegistry</a> from <a shape="rect" href="camelcontext.html">CamelContext</a> so end users more easily will be able to add type converters at runtime. This is also usable in situations where the default discovering of type converters fails on platforms with classloading issues. </p>
-
-<p>To access the registry, you get it from the CamelContext</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-   CamelContext context = ...
+</div></div><h3 id="TypeConverter-HowTypeConversionworks">How Type Conversion works</h3><p>The type conversion strategy is defined by the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/TypeConverter.html">TypeConverter</a> interface that can be customized on a <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html">CamelContext</a>.</p><p>The default implementation, <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/DefaultTypeConverter.html">DefaultTypeConverter</a>, uses pluggable strategies to load type converters via <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/TypeConverterLoader.html">TypeConverterLoader</a>. The default strategy, <a shape="rect" class="externa
 l-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.html">AnnotationTypeConverterLoader</a>, uses a discovery mechanism to find converters.</p><p><strong>New in Camel 1.5</strong></p><p>The default implementation, <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/DefaultTypeConverter.html">DefaultTypeConverter</a>, now throws a <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/NoTypeConversionAvailableException.html">NoTypeConversionAvailableException</a> if a suitable conversion cannot be found (CAMEL-84). The semantical ambiguity of <code>null</code> (both valid result and indication of no conversion found) is now resolved, but this may impact existing code in that it should now catch the exception instead of checking for <code>null</code>.</p><h3 id="T
 ypeConverter-TypeConverterRegistry">TypeConverterRegistry</h3><p><strong>New in Camel 2.0</strong></p><p>Exposed the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/TypeConverterRegistry.html">TypeConverterRegistry</a> from <a shape="rect" href="camelcontext.html">CamelContext</a> so end users more easily will be able to add type converters at runtime. This is also usable in situations where the default discovering of type converters fails on platforms with classloading issues.</p><p>To access the registry, you get it from the CamelContext</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[   CamelContext context = ...
    context.getTypeConverterRegistry()
 ]]></script>
-</div></div>
-
-<h4 id="TypeConverter-TypeConverterRegistryutilizationstatistics">TypeConverterRegistry utilization statistics</h4>
-
-<p>Camel can gather utilization statistics of the runtime usage of type converters. These stats are available in JMX, and as well as from the <code>getStatistics()</code> method from <code>TypeConverterRegistry</code>.</p>
-
-<p>From <strong>Camel 2.11.0/2.10.5</strong> onwards these statistics are turned off by default as there is some performance overhead under very high concurrent load. To enable the statistics in Java, do the following:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-   CamelContext context = ...
+</div></div><h4 id="TypeConverter-TypeConverterRegistryutilizationstatistics">TypeConverterRegistry utilization statistics</h4><p>Camel can gather utilization statistics of the runtime usage of type converters. These stats are available in JMX, and as well as from the <code>getStatistics()</code> method from <code>TypeConverterRegistry</code>.</p><p>From <strong>Camel 2.11.0/2.10.5</strong> onwards these statistics are turned off by default as there is some performance overhead under very high concurrent load. To enable the statistics in Java, do the following:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[   CamelContext context = ...
    context.setTypeConverterStatisticsEnabled(true);
 ]]></script>
-</div></div>
-
-<p>Or in the XML DSL with:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot; typeConverterStatisticsEnabled=&quot;true&quot;&gt;
+</div></div><p>Or in the XML DSL with:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot; typeConverterStatisticsEnabled=&quot;true&quot;&gt;
 ...
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<h4 id="TypeConverter-Addtypeconverteratruntime">Add type converter at runtime</h4>
-<p>The following sample demonstrates how to add a type converter at runtime:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="TypeConverter-Addtypeconverteratruntime">Add type converter at runtime</h4><p>The following sample demonstrates how to add a type converter at runtime:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 // add our own type converter manually that converts from String -&gt; MyOrder using MyOrderTypeConverter
 context.getTypeConverterRegistry().addTypeConverter(MyOrder.class, String.class, new MyOrderTypeConverter());
 ]]></script>
-</div></div>
-
-<p>And our type converter is implemented as:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And our type converter is implemented as:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 private static class MyOrderTypeConverter extends TypeConverterSupport {
 
@@ -172,24 +121,31 @@ private static class MyOrderTypeConverte
     }
 }
 ]]></script>
-</div></div>
-
-<p>And then we can convert from String to MyOrder as we are used to with the type converter:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And then we can convert from String to MyOrder as we are used to with the type converter:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 MyOrder order = context.getTypeConverter().convertTo(MyOrder.class, &quot;123&quot;);
 ]]></script>
-</div></div>
-
-<h3 id="TypeConverter-DiscoveringTypeConverters">Discovering Type Converters</h3>
-
-<p>The <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.html">AnnotationTypeConverterLoader</a> will search the classpath for a file called <em>META-INF/services/org/apache/camel/TypeConverter</em>. The contents are expected to be comma separated package names. These packages are then recursively searched for any objects with the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Converter">@Converter</a> annotation. Then any method marked with @Converter is assumed to be a conversion method; where the parameter is the from value and the return is the to value.</p>
-
-<p>e.g. the following shows how to register a converter from File -&gt; InputStream</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-@Converter
+</div></div><h3 id="TypeConverter-Addtypeconverterclassesatruntime">Add type converter classes at runtime</h3><p><strong>Available as of Camel 2.16</strong></p><p>From Camel 2.16 onwards you type converter classes can implement&#160;<code>org.apache.camel.TypeConverters</code> which is an marker interface. Then for each type converter you want use the&#160;<code>@Converter</code>&#160;annotation.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[private class MyOrderTypeConverters implements TypeConverters {
+ 
+    @Converter
+    public MyOrder toMyOrder(String orderId) {
+        MyOrder order = new MyOrder();
+        order.setId(Integer.parseInt(orderId));
+        return order;
+    }
+}]]></script>
+</div></div><p>&#160;</p><p>Then you can add these converters to the registry using</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[MyOrderTypeConverters myClass = ...
+context.getTypeConverterRegistry().addTypeConverters(myClass);]]></script>
+</div></div><p>If you are using Spring or Blueprint, then you can just declare a &lt;bean&gt; then CamelContext will automatic discover and add the converters.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;myOrderTypeConverters&quot; class=&quot;...&quot;/&gt;
+ 
+&lt;camelContext ...&gt;
+   ...
+&lt;/camelContext&gt;]]></script>
+</div></div><p>You can declare multiple &lt;bean&gt;s if you have more classes.</p><p>Using this technique do not require to scan the classpath and using the file <code>META-INF/services/org/apache/camel/TypeConverter</code>&#160;as discussed in the&#160;<em>Discovering Type Converters</em> section. However the latter is highly recommended when developing Camel components or data formats as then the type converters is automatic included out of the box. The functionality from this section requires the end users to explicit add the converters to their Camel applications.</p><h3 id="TypeConverter-DiscoveringTypeConverters">Discovering Type Converters</h3><p>The <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.html">AnnotationTypeConverterLoader</a> will search the classpath for a file called <em>META-INF/services/org/apache/camel/TypeConverter</em>. The contents are expecte
 d to be comma separated package names. These packages are then recursively searched for any objects with the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Converter">@Converter</a> annotation. Then any method marked with @Converter is assumed to be a conversion method; where the parameter is the from value and the return is the to value.</p><p>e.g. the following shows how to register a converter from File -&gt; InputStream</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Converter
 public class IOConverter {
 
     @Converter
@@ -198,19 +154,8 @@ public class IOConverter {
     }
 }
 ]]></script>
-</div></div>
-
-<p>Static methods are invoked; non-static methods require an instance of the converter object to be created (which is then cached). If a converter requires configuration you can plug in an Injector interface to the DefaultTypeConverter which can construct and inject converter objects via Spring or Guice. </p>
-
-<p>We have most of the common converters for common Java types in the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/converter/package-summary.html">org.apache.camel.converter</a> package and its children.</p>
-
-<h4 id="TypeConverter-Returningnullvalues">Returning null values</h4>
-
-<p>By default when using a method in a POJO annotation with @Converter returning null is not a valid response. If null is returned, then Camel will regard that type converter as a <em>miss</em>, and prevent from using it in the future. If null should be allowed as a valid response, then from <strong>Camel 2.11.2/2.12</strong> onwards you can specify this in the annotation as shown:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    @Converter(allowNull = true)
+</div></div><p>Static methods are invoked; non-static methods require an instance of the converter object to be created (which is then cached). If a converter requires configuration you can plug in an Injector interface to the DefaultTypeConverter which can construct and inject converter objects via Spring or Guice.</p><p>We have most of the common converters for common Java types in the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/converter/package-summary.html">org.apache.camel.converter</a> package and its children.</p><h4 id="TypeConverter-Returningnullvalues">Returning null values</h4><p>By default when using a method in a POJO annotation with @Converter returning null is not a valid response. If null is returned, then Camel will regard that type converter as a <em>miss</em>, and prevent from using it in the future. If null should be allowed as a valid response, then from <strong>Camel 2.11.2/2.12</strong>
  onwards you can specify this in the annotation as shown:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    @Converter(allowNull = true)
     public static InputStream toInputStream(File file) throws IOException {
         if (file.exist()) {
             return new BufferedInputStream(new FileInputStream(file));
@@ -219,38 +164,16 @@ public class IOConverter {
         }
     }
 ]]></script>
-</div></div>
-
-<h3 id="TypeConverter-DiscoveringFallbackTypeConverters">Discovering Fallback Type Converters</h3>
-<p><strong>Available in Camel 2.0</strong><br clear="none">
-The <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.html">AnnotationTypeConverterLoader</a> has been enhanced to also look for methods defined with a @FallbackConverter annotation, and register it as a fallback type converter.</p>
-
-<p>Fallback type converters are used as a last resort for converting a given value to another type. Its used when the regular type converters give up.<br clear="none">
-The fallback converters is also meant for a broader scope, so its method signature is a bit different:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    @FallbackConverter
+</div></div><h3 id="TypeConverter-DiscoveringFallbackTypeConverters">Discovering Fallback Type Converters</h3><p><strong>Available in Camel 2.0</strong><br clear="none"> The <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.html">AnnotationTypeConverterLoader</a> has been enhanced to also look for methods defined with a @FallbackConverter annotation, and register it as a fallback type converter.</p><p>Fallback type converters are used as a last resort for converting a given value to another type. Its used when the regular type converters give up.<br clear="none"> The fallback converters is also meant for a broader scope, so its method signature is a bit different:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    @FallbackConverter
     public static &lt;T&gt; T convertTo(Class&lt;T&gt; type, Exchange exchange, Object value, TypeConverterRegistry registry)
 ]]></script>
-</div></div>
-
-<p>Or you can use the non generic signature.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    @FallbackConverter
+</div></div><p>Or you can use the non generic signature.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    @FallbackConverter
     public static Object convertTo(Class type, Exchange exchange, Object value, TypeConverterRegistry registry)
 ]]></script>
-</div></div>
-
-<p>And the method name can be anything (<code>convertTo</code> is not required as a name), so it can be named <code>convertMySpecialTypes</code> if you like.<br clear="none">
-The <code>Exchange</code> parameter is optional, just as its with the regular <code>@Converter</code> methods.</p>
-
-<p>The purpose with this broad scope method signature is allowing you to control if you can convert the given type or not. The <code>type</code> parameter holds the type we want the <code>value</code> converted to. Its used internally in Camel for wrapper objects so we can delegate the type convertions to the body that is wrapped.</p>
-
-<p>For instance in the method below we will handle all type conversions that is based on the wrapper class <code>GenericFile</code> and we let Camel do the type conversions on its body instead.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    @FallbackConverter
+</div></div><p>And the method name can be anything (<code>convertTo</code> is not required as a name), so it can be named <code>convertMySpecialTypes</code> if you like.<br clear="none"> The <code>Exchange</code> parameter is optional, just as its with the regular <code>@Converter</code> methods.</p><p>The purpose with this broad scope method signature is allowing you to control if you can convert the given type or not. The <code>type</code> parameter holds the type we want the <code>value</code> converted to. Its used internally in Camel for wrapper objects so we can delegate the type convertions to the body that is wrapped.</p><p>For instance in the method below we will handle all type conversions that is based on the wrapper class <code>GenericFile</code> and we let Camel do the type conversions on its body instead.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    @FallbackConverter
     public static &lt;T&gt; T convertTo(Class&lt;T&gt; type, Exchange exchange, Object value, TypeConverterRegistry registry) {
         // use a fallback type converter so we can convert the embedded body if the value is GenericFile
         if (GenericFile.class.isAssignableFrom(value.getClass())) {
@@ -266,67 +189,24 @@ The <code>Exchange</code> parameter is o
         return null;
     }
 ]]></script>
-</div></div>
-
-<h3 id="TypeConverter-WritingyourownTypeConverters">Writing your own Type Converters</h3>
-
-    <div class="aui-message success shadowed information-macro">
+</div></div><h3 id="TypeConverter-WritingyourownTypeConverters">Writing your own Type Converters</h3>    <div class="aui-message success shadowed information-macro">
                     <p class="title">Use FQN</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>In <strong>Camel 2.8</strong> the TypeConverter file now supports specifying the FQN class name. This is recommended to be used. See below for more details</p>
+                            <p>In <strong>Camel 2.8</strong> the TypeConverter file now supports specifying the FQN class name. This is recommended to be used. See below for more details</p>
                     </div>
     </div>
-
-
-<p>You are welcome to write your own converters. Remember to use the @Converter annotations on the classes and methods you wish to use. Then add the packages to a file called <em>META-INF/services/org/apache/camel/TypeConverter</em> in your jar. Remember to make sure that :-</p>
-
-<ul><li>static methods are encouraged to reduce caching, but instance methods are fine, particularly if you want to allow optional dependency injection to customize the converter</li><li>converter methods should be thread safe and reentrant</li></ul>
-
-
-<h4 id="TypeConverter-ExamplesofTypeConverterfile">Examples of TypeConverter file</h4>
-<p>The file in the JAR: <code>META-INF/services/org/apache/camel/TypeConverter</code> contains the following line(s) </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-com.foo
+<p>You are welcome to write your own converters. Remember to use the @Converter annotations on the classes and methods you wish to use. Then add the packages to a file called <em>META-INF/services/org/apache/camel/TypeConverter</em> in your jar. Remember to make sure that :-</p><ul><li>static methods are encouraged to reduce caching, but instance methods are fine, particularly if you want to allow optional dependency injection to customize the converter</li><li>converter methods should be thread safe and reentrant</li></ul><h4 id="TypeConverter-ExamplesofTypeConverterfile">Examples of TypeConverter file</h4><p>The file in the JAR: <code>META-INF/services/org/apache/camel/TypeConverter</code> contains the following line(s)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[com.foo
 com.bar
 ]]></script>
-</div></div>
-
-<p>Each line in the file is a package name. This tells Camel to go scan those packages for any classes that has been annotated with the @Converter.</p>
-
-<h3 id="TypeConverter-ImprovedTypeConverterbyusingFQNclassnames">Improved TypeConverter by using FQN class names</h3>
-<p><strong>Available as of Camel 2.8</strong><br clear="none">
-In Camel 2.8 we improved the type converter loader to support specifying the FQN class name of the converter classes. This has the advantage of avoiding having to scan packages for @Converter classes. Instead it loads the @Converter class directly. This is a <strong>highly</strong> recommend approach to use going forward.</p>
-
-<h4 id="TypeConverter-ExamplesofTypeConverterfile.1">Examples of TypeConverter file</h4>
-<p>The file in the JAR: <code>META-INF/services/org/apache/camel/TypeConverter</code> contains the following line(s) for FQN class names </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-com.foo.MyConverter
+</div></div><p>Each line in the file is a package name. This tells Camel to go scan those packages for any classes that has been annotated with the @Converter.</p><h3 id="TypeConverter-ImprovedTypeConverterbyusingFQNclassnames">Improved TypeConverter by using FQN class names</h3><p><strong>Available as of Camel 2.8</strong><br clear="none"> In Camel 2.8 we improved the type converter loader to support specifying the FQN class name of the converter classes. This has the advantage of avoiding having to scan packages for @Converter classes. Instead it loads the @Converter class directly. This is a <strong>highly</strong> recommend approach to use going forward.</p><h4 id="TypeConverter-ExamplesofTypeConverterfile.1">Examples of TypeConverter file</h4><p>The file in the JAR: <code>META-INF/services/org/apache/camel/TypeConverter</code> contains the following line(s) for FQN class names</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[com.foo.MyConverter
 com.bar.MyOtherConverter
 com.bar.YetOtherConverter
 ]]></script>
-</div></div>
-
-<p>As you can see each line in the file now contains a FQN class name. This is the recommended approach.</p>
-
-<h3 id="TypeConverter-Encodingsupportforbyte[]andStringConversion">Encoding support for byte[] and String Conversion</h3>
-
-<p><strong>Available in Camel 1.5</strong></p>
-
-<p>Since Java provides converting the byte[] to String and String to byte[] with the <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a> parameter. You can define the charset name by setting the exchange property name <code>Exchange.CHARSET_NAME</code> with the charset name, such as <code>"UTF-8"</code> or <code>"iso-8859-1"</code>.</p>
-
-<h3 id="TypeConverter-Exchangeparameter">Exchange parameter</h3>
-
-<p><strong>Available in Camel 1.5</strong></p>
-
-<p>The type converter accepts the <code>Exchange</code> as an optional 2nd parameter. This is usable if the type converter for instance needs information from the current exchange. For instance combined with the encoding support its possible for type converters to convert with the configured encoding. An example from camel-core for the <code>byte[] -&gt; String</code> converter:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    @Converter
+</div></div><p>As you can see each line in the file now contains a FQN class name. This is the recommended approach.</p><h3 id="TypeConverter-Encodingsupportforbyte[]andStringConversion">Encoding support for byte[] and String Conversion</h3><p><strong>Available in Camel 1.5</strong></p><p>Since Java provides converting the byte[] to String and String to byte[] with the <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a> parameter. You can define the charset name by setting the exchange property name <code>Exchange.CHARSET_NAME</code> with the charset name, such as <code>"UTF-8"</code> or <code>"iso-8859-1"</code>.</p><h3 id="TypeConverter-Exchangeparameter">Exchange parameter</h3><p><strong>Available in Camel 1.5</strong></p><p>The type converter accepts the <code>Exchange</code> as an optional 2nd parameter. This is usable if the type converter for instance needs information from the curr
 ent exchange. For instance combined with the encoding support its possible for type converters to convert with the configured encoding. An example from camel-core for the <code>byte[] -&gt; String</code> converter:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    @Converter
     public static String toString(byte[] data, Exchange exchange) {
         if (exchange != null) {
             String charsetName = exchange.getProperty(Exchange.CHARSET_NAME, String.class);