You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2012/03/13 22:36:21 UTC

svn commit: r808557 [6/23] - /websites/production/camel/content/manual/

Added: websites/production/camel/content/manual/camel-manual-1.6.3.html
==============================================================================
--- websites/production/camel/content/manual/camel-manual-1.6.3.html (added)
+++ websites/production/camel/content/manual/camel-manual-1.6.3.html Tue Mar 13 21:36:20 2012
@@ -0,0 +1,25097 @@
+<html>
+<head>
+   <base href="https://cwiki.apache.org/confluence/display/CAMEL/Book+In+One+Page"/>
+<link href="file:/w1/apache/release/camel-1.6.3/target/checkout/tooling/camel-manual/src/styles/print.css" rel="stylesheet" type="text/css" />
+              <style type="text/css">
+                @page :left {
+                  @top-left {
+                    content: "Apache Camel 1.6.3 Developer's Manual";
+                  }
+                }
+              </style>
+</head>
+<body><div class="wiki-content">
+           
+            <div class="frontcover" id="frontcover"><h1><a shape="rect" name="BookInOnePage-ApacheCamel"></a>Apache Camel</h1>
+<h2><a shape="rect" name="BookInOnePage-UserGuide"></a>User Guide</h2>
+
+<h3>Version 1.6.3</h3>
+
+<p>Copyright 2007-2010, Apache Software Foundation</p></div>
+<div class="toc" id="toc"><h1><a shape="rect" name="BookInOnePage-TableofContents"></a>Table of Contents</h1>
+
+
+<ul class="toc"><li class="frontmatter"><a shape="rect" href="#toc">Table of Contents</a></li><li class="chapter"><a shape="rect" href="#chapter-introduction">Introduction</a></li><li class="chapter"><a shape="rect" href="#chapter-quickstart">Quickstart</a></li><li class="chapter"><a shape="rect" href="#chapter-getting-started">Getting Started</a></li><li class="chapter"><a shape="rect" href="#chapter-architecture">Architecture</a></li><li class="chapter"><a shape="rect" href="#chapter-enterprise-integration-patterns">Enterprise Integration Patterns</a></li><li class="chapter"><a shape="rect" href="#chapter-cook-book">Cook Book</a></li><li class="chapter"><a shape="rect" href="#chapter-tutorials">Tutorials</a></li><li class="chapter"><a shape="rect" href="#chapter-languages-supported-Appendix">Language Appendix</a></li><li class="chapter"><a shape="rect" href="#chapter-pattern-appendix">Pattern Appendix</a></li><li class="chapter"><a shape="rect" href="#chapter-component-app
 endix">Component Appendix</a></li><li class="endmatter"><a shape="rect" href="#index">Index</a></li></ul>
+</div>
+<div class="chapter page-reset" id="chapter-introduction"><h1><a shape="rect" name="BookInOnePage-Introduction"></a>Introduction</h1>
+
+Apache Camel is a powerful open source integration framework based on known <a shape="rect" href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a> with powerful <a shape="rect" href="/confluence/display/CAMEL/Bean+Integration" title="Bean Integration">Bean Integration</a>.
+
+<p>Camel lets you create the <a shape="rect" href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a> to implement routing and mediation rules in either a Java based <a shape="rect" href="/confluence/display/CAMEL/DSL" title="DSL">Domain Specific Language (or Fluent API)</a>, via <a shape="rect" href="/confluence/display/CAMEL/Spring" title="Spring">Spring</a> based <a shape="rect" href="/confluence/display/CAMEL/Xml+Configuration" title="Xml Configuration">Xml Configuration</a> files or via the <a shape="rect" href="/confluence/display/CAMEL/Scala+DSL" title="Scala DSL">Scala DSL</a>. This means you get smart completion of routing rules in your IDE whether in your Java, Scala or XML editor.</p>
+
+<p>Apache Camel uses <a shape="rect" href="/confluence/display/CAMEL/URIs" title="URIs">URIs</a> so that it can easily work directly with any kind of <a shape="rect" href="/confluence/display/CAMEL/Transport" title="Transport">Transport</a> or messaging model such as <a shape="rect" href="/confluence/display/CAMEL/HTTP" title="HTTP">HTTP</a>, <a shape="rect" href="/confluence/display/CAMEL/ActiveMQ" title="ActiveMQ">ActiveMQ</a>, <a shape="rect" href="/confluence/display/CAMEL/JMS" title="JMS">JMS</a>, <a shape="rect" href="/confluence/display/CAMEL/JBI" title="JBI">JBI</a>, SCA, <a shape="rect" href="/confluence/display/CAMEL/MINA" title="MINA">MINA</a> or <a shape="rect" href="/confluence/display/CAMEL/CXF" title="CXF">CXF Bus API</a> together with working with pluggable <a shape="rect" href="/confluence/display/CAMEL/Data+Format" title="Data Format">Data Format</a> options. Apache Camel is a small library which has minimal <a shape="rect" href="/confluence/display/CAMEL/W
 hat+are+the+dependencies" title="What are the dependencies">dependencies</a> for easy embedding in any Java application. Apache Camel lets you work with the same <a shape="rect" href="/confluence/display/CAMEL/Exchange" title="Exchange">API</a> regardless which kind of <a shape="rect" href="/confluence/display/CAMEL/Transport" title="Transport">Transport</a> used, so learn the API once and you will be able to interact with all the <a shape="rect" href="/confluence/display/CAMEL/Components" title="Components">Components</a> that is provided out-of-the-box.</p>
+
+<p>Apache Camel has powerful <a shape="rect" href="/confluence/display/CAMEL/Bean+Binding" title="Bean Binding">Bean Binding</a> and integrated seamless with popular frameworks such as <a shape="rect" href="/confluence/display/CAMEL/Spring" title="Spring">Spring</a> and <a shape="rect" href="/confluence/display/CAMEL/Guice" title="Guice">Guice</a>.</p>
+
+<p>Apache Camel has extensive <a shape="rect" href="/confluence/display/CAMEL/Testing" title="Testing">Testing</a> support allowing you to easily unit test your routes. </p>
+
+<p>Apache Camel can be used as a routing and mediation engine for the following projects:</p>
+
+<ul><li><a shape="rect" class="external-link" href="http://servicemix.apache.org/" rel="nofollow">Apache ServiceMix</a> which is the most popular and powerful distributed open source ESB and JBI container</li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/" rel="nofollow">Apache ActiveMQ</a>  which is the most popular and powerful open source message broker</li><li><a shape="rect" class="external-link" href="http://cxf.apache.org/" rel="nofollow">Apache CXF</a> which is a smart web services suite (JAX-WS)</li><li><a shape="rect" class="external-link" href="http://mina.apache.org/" rel="nofollow">Apache MINA</a> a networking framework</li></ul>
+
+
+<p>So don't get the hump, try Camel today! <img align="absmiddle" class="emoticon" src="/confluence/images/icons/emoticons/smile.gif" height="20" width="20" alt="" border="0"></p></div>
+<div class="chapter page-reset" id="chapter-quickstart"><h1><a shape="rect" name="BookInOnePage-Quickstart"></a>Quickstart</h1>
+
+<p>To start using Apache Camel quickly, you can read through some simple examples in this chapter. For readers who would like a more thorough introduction, please skip ahead to Chapter 3.</p>
+
+<h2><a shape="rect" name="BookInOnePage-WalkthroughanExampleCode"></a>Walk through an Example Code</h2>
+
+<p>This mini-guide takes you through the source code of a <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java" rel="nofollow">simple example</a>.</p>
+
+<p>Camel can be configured either by using <a shape="rect" href="/confluence/display/CAMEL/Spring" title="Spring">Spring</a> or directly in Java - which <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java" rel="nofollow">this example does</a>.</p>
+
+<p>We start with creating a <a shape="rect" href="/confluence/display/CAMEL/CamelContext" title="CamelContext">CamelContext</a> - which is a container for <a shape="rect" href="/confluence/display/CAMEL/Components" title="Components">Components</a>, <a shape="rect" href="/confluence/display/CAMEL/Routes" title="Routes">Routes</a> etc:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">CamelContext context = <span class="code-keyword">new</span> DefaultCamelContext();
+</pre>
+</div></div>
+
+<p>There is more than one way of adding a Component to the CamelContext. You can add components implicitly - when we set up the routing - as we do here for the <a shape="rect" href="/confluence/display/CAMEL/File" title="File">FileComponent</a>:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">context.addRoutes(<span class="code-keyword">new</span> RouteBuilder() {
+
+    <span class="code-keyword">public</span> void configure() {
+        from(<span class="code-quote">"test-jms:queue:test.queue"</span>).to(<span class="code-quote">"file:<span class="code-comment">//test"</span>);
+</span>        <span class="code-comment">// set up a listener on the file component
+</span>        from(<span class="code-quote">"file:<span class="code-comment">//test"</span>).process(<span class="code-keyword">new</span> Processor() {
+</span>
+            <span class="code-keyword">public</span> void process(Exchange e) {
+                <span class="code-object">System</span>.out.println(<span class="code-quote">"Received exchange: "</span> + e.getIn());
+            }
+        });
+    }
+});
+</pre>
+</div></div>
+
+
+<p>or explicitly - as we do here when we add the JMS Component:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">ConnectionFactory connectionFactory = <span class="code-keyword">new</span> ActiveMQConnectionFactory(<span class="code-quote">"vm:<span class="code-comment">//localhost?broker.persistent=<span class="code-keyword">false</span>"</span>);
+</span><span class="code-comment">// Note we can explicity name the component
+</span>context.addComponent(<span class="code-quote">"test-jms"</span>, JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
+</pre>
+</div></div>
+
+<p>The above works with any JMS provider. If we know we are using <a shape="rect" href="/confluence/display/CAMEL/ActiveMQ" title="ActiveMQ">ActiveMQ</a> we can use an even simpler form using the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/camel-activemq/apidocs/org/apache/camel/component/activemq/ActiveMQComponent.html#activeMQComponent(java.lang.String)" rel="nofollow">activeMQComponent() method</a> while specifying the <a shape="rect" class="external-link" href="http://activemq.apache.org/configuring-transports.html" rel="nofollow">brokerURL</a> used to connect to ActiveMQ </p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">camelContext.addComponent(<span class="code-quote">"activemq"</span>, activeMQComponent(<span class="code-quote">"vm:<span class="code-comment">//localhost?broker.persistent=<span class="code-keyword">false</span>"</span>));</span>
+</pre>
+</div></div>
+
+<p>In normal use, an external system would be firing messages or events directly into Camel through one if its <a shape="rect" href="/confluence/display/CAMEL/Components" title="Components">Components</a>  but we are going to use the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/camel-core/apidocs/org/apache/camel/ProducerTemplate.html" rel="nofollow">ProducerTemplate</a> which is a really easy way for testing your configuration:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">ProducerTemplate template = context.createProducerTemplate();
+</pre>
+</div></div>
+
+<p>Next you <b>must</b> start the camel context. If you are using <a shape="rect" href="/confluence/display/CAMEL/Spring" title="Spring">Spring</a> to configure the camel context this is automatically done for you; though if you are using a pure Java approach then you just need to call the start() method</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+camelContext.start();
+</pre>
+</div></div>
+
+<p>This will start all of the configured routing rules.</p>
+
+<p>So after starting the <a shape="rect" href="/confluence/display/CAMEL/CamelContext" title="CamelContext">CamelContext</a>, we can fire some objects into camel:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java"><span class="code-keyword">for</span> (<span class="code-object">int</span> i = 0; i &lt; 10; i++) {
+    template.sendBody(<span class="code-quote">"test-jms:queue:test.queue"</span>, <span class="code-quote">"Test Message: "</span> + i);
+}
+</pre>
+</div></div>
+
+
+<h2><a shape="rect" name="BookInOnePage-Whathappens%3F"></a>What happens?</h2>
+
+<p>From the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/camel-core/apidocs/org/apache/camel/ProducerTemplate.html" rel="nofollow">ProducerTemplate</a> - we send objects (in this case text) into the <a shape="rect" href="/confluence/display/CAMEL/CamelContext" title="CamelContext">CamelContext</a> to the Component <em>test-jms:queue:test.queue</em>. These text objects will be <a shape="rect" href="/confluence/display/CAMEL/Type+Converter" title="Type Converter">converted automatically</a> into JMS Messages and posted to a JMS Queue named <em>test.queue</em>. When we set up the <a shape="rect" href="/confluence/display/CAMEL/Routes" title="Routes">Route</a>, we configured the <a shape="rect" href="/confluence/display/CAMEL/File" title="File">FileComponent</a> to listen of the <em>test.queue</em>. </p>
+
+<p>The File <a shape="rect" href="/confluence/display/CAMEL/File" title="File">FileComponent</a> will take messages off the Queue, and save them to a directory named <em>test</em>. Every message will be saved in a file that corresponds to its destination and message id.</p>
+
+<p>Finally, we configured our own listener in the <a shape="rect" href="/confluence/display/CAMEL/Routes" title="Routes">Route</a> - to take notifications from the <a shape="rect" href="/confluence/display/CAMEL/File" title="File">FileComponent</a> and print them out as text.</p>
+
+<p><b>That's it!</b></p>
+
+<p>If you have the time then use 5 more minutes to <a shape="rect" href="/confluence/display/CAMEL/Walk+through+another+example" title="Walk through another example">Walk through another example</a> that demonstrates the Spring DSL (XML based) routing.</p>
+
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="absmiddle" src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Camel 1.4.0 change</b><br clear="none">In Camel 1.4.0, CamelTemplate has been marked as @deprecated. ProducerTemplate should be used instead and its created from the CamelContext itself.
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+ProducerTemplate template = context.createProducerTemplate();
+</pre>
+</div></div></td></tr></table></div>
+<h2><a shape="rect" name="BookInOnePage-Walkthroughanotherexample"></a>Walk through another example</h2>
+
+<h3><a shape="rect" name="BookInOnePage-Introduction"></a>Introduction</h3>
+<p>We continue the walk from <a shape="rect" href="/confluence/display/CAMEL/Walk+through+an+Example" title="Walk through an Example">Walk through an Example</a>. This time we take a closer look at the routing and explains a few pointers so you wont walk into a bear trap, but can enjoy a walk after hours to the local pub for a large beer <img align="absmiddle" class="emoticon" src="/confluence/images/icons/emoticons/wink.gif" height="20" width="20" alt="" border="0"></p>
+
+<p>First we take a moment to look at the <a shape="rect" href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a> that is the base pattern catalog for integrations. In particular we focus on the <a shape="rect" href="/confluence/display/CAMEL/Pipes+and+Filters" title="Pipes and Filters">Pipes and Filters</a> EIP pattern, that is a central pattern. This is used for: route through a sequence of processing steps, each performing a specific function - much like the Java Servlet Filters. </p>
+
+<h3><a shape="rect" name="BookInOnePage-Pipesandfilters"></a>Pipes and filters</h3>
+<p>In this sample we want to process a message in a sequence of steps where each steps can perform their specific function. In our example we have a <a shape="rect" href="/confluence/display/CAMEL/JMS" title="JMS">JMS</a> queue for receiving new orders. When an order is received we need to process it in several steps:</p>
+<ul type="square" class="alternate"><li>validate</li><li>register</li><li>send confirm email</li></ul>
+
+
+<p>This can be created in a route like this:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+   <span class="code-tag">&lt;from uri=<span class="code-quote">"jms:queue:order"</span>/&gt;</span>
+   <span class="code-tag">&lt;pipeline&gt;</span>
+      <span class="code-tag">&lt;bean ref=<span class="code-quote">"validateOrder"</span>/&gt;</span>
+      <span class="code-tag">&lt;bean ref=<span class="code-quote">"registerOrder"</span>/&gt;</span>
+      <span class="code-tag">&lt;bean ref=<span class="code-quote">"sendConfirmEmail"</span>/&gt;</span>
+   <span class="code-tag">&lt;/pipeline&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="absmiddle" src="/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Pipeline is default</b><br clear="none">In the route above we specify <tt>pipeline</tt> but it can be omitted as its default, so you can write the route as:
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+   <span class="code-tag">&lt;from uri=<span class="code-quote">"jms:queue:order"</span>/&gt;</span>
+   <span class="code-tag">&lt;bean ref=<span class="code-quote">"validateOrder"</span>/&gt;</span>
+   <span class="code-tag">&lt;bean ref=<span class="code-quote">"registerOrder"</span>/&gt;</span>
+   <span class="code-tag">&lt;bean ref=<span class="code-quote">"sendConfirmEmail"</span>/&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+<p>This is commonly used not to state the pipeline. </p>
+
+<p>An example where the pipeline needs to be used, is when using a multicast and "one" of the endpoints to send to (as a logical group) is a pipeline of other endpoints. For example.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+   <span class="code-tag">&lt;from uri=<span class="code-quote">"jms:queue:order"</span>/&gt;</span>
+   <span class="code-tag">&lt;multicast&gt;</span>
+     <span class="code-tag">&lt;to uri=<span class="code-quote">"log:org.company.log.Category"</span>/&gt;</span>
+     <span class="code-tag">&lt;pipeline&gt;</span>
+       <span class="code-tag">&lt;bean ref=<span class="code-quote">"validateOrder"</span>/&gt;</span>
+       <span class="code-tag">&lt;bean ref=<span class="code-quote">"registerOrder"</span>/&gt;</span>
+       <span class="code-tag">&lt;bean ref=<span class="code-quote">"sendConfirmEmail"</span>/&gt;</span>
+     <span class="code-tag">&lt;/pipeline&gt;</span>
+   <span class="code-tag">&lt;/multicast&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+
+<p>The above sends the order (from <tt>jms:queue:order</tt>) to two locations at the same time, our log component, and to the "pipeline" of beans which goes one to the other. If you consider the opposite, sans the <tt>&lt;pipeline&gt;</tt></p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+   <span class="code-tag">&lt;from uri=<span class="code-quote">"jms:queue:order"</span>/&gt;</span>
+   <span class="code-tag">&lt;multicast&gt;</span>
+     <span class="code-tag">&lt;to uri=<span class="code-quote">"log:org.company.log.Category"</span>/&gt;</span>
+     <span class="code-tag">&lt;bean ref=<span class="code-quote">"validateOrder"</span>/&gt;</span>
+     <span class="code-tag">&lt;bean ref=<span class="code-quote">"registerOrder"</span>/&gt;</span>
+     <span class="code-tag">&lt;bean ref=<span class="code-quote">"sendConfirmEmail"</span>/&gt;</span>
+   <span class="code-tag">&lt;/multicast&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+
+<p>you would see that multicast would not "flow" the message from one bean to the next, but rather send the order to all 4 endpoints (1x log, 3x bean) in parallel, which is not (for this example) what we want. We need the message to flow to the validateOrder, then to the registerOrder, then the sendConfirmEmail so adding the pipeline, provides this facility.</p></td></tr></table></div>
+
+<p>Where as the <tt>bean ref</tt> is a reference for a spring bean id, so we define our beans using regular Spring XML as:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+   <span class="code-tag">&lt;bean id=<span class="code-quote">"validateOrder"</span> class=<span class="code-quote">"com.mycompany.MyOrderValidator"</span>/&gt;</span>
+</pre>
+</div></div>
+
+<p>Our validator bean is a plain POJO that has no dependencies to Camel what so ever. So you can implement this POJO as you like. Camel uses rather intelligent <a shape="rect" href="/confluence/display/CAMEL/Bean+Binding" title="Bean Binding">Bean Binding</a> to invoke your POJO with the payload of the received message. In this example we will <b>not</b> dig into this how this happens. You should return to this topic later when you got some hands on experience with Camel how it can easily bind routing using your existing POJO beans.</p>
+
+<p>So what happens in the route above. Well when an order is received from the <a shape="rect" href="/confluence/display/CAMEL/JMS" title="JMS">JMS</a> queue the message is routed like <a shape="rect" href="/confluence/display/CAMEL/Pipes+and+Filters" title="Pipes and Filters">Pipes and Filters</a>:<br clear="none">
+1. payload from the <a shape="rect" href="/confluence/display/CAMEL/JMS" title="JMS">JMS</a> is sent as input to the validateOrder bean<br clear="none">
+2. the output from validateOrder bean is sent as input to the registerOrder bean<br clear="none">
+3. the output from registerOrder bean is sent as input to the sendConfirmEmail bean</p>
+
+<h3><a shape="rect" name="BookInOnePage-UsingCamelComponents"></a>Using Camel Components</h3>
+<p>In the route lets imagine that the registration of the order has to be done by sending data to a TCP socket that could be a big mainframe. As Camel has many <a shape="rect" href="/confluence/display/CAMEL/Components" title="Components">Components</a> we will use the camel-mina component that supports <a shape="rect" href="/confluence/display/CAMEL/MINA" title="MINA">TCP</a> connectivity. So we change the route to:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+   <span class="code-tag">&lt;from uri=<span class="code-quote">"jms:queue:order"</span>/&gt;</span>
+   <span class="code-tag">&lt;bean ref=<span class="code-quote">"validateOrder"</span>/&gt;</span>
+   <span class="code-tag">&lt;to uri=<span class="code-quote">"mina:tcp://mainframeip:4444?textline=true"</span>/&gt;</span>
+   <span class="code-tag">&lt;bean ref=<span class="code-quote">"sendConfirmEmail"</span>/&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+
+<p>What we now have in the route is a <tt>to</tt> type that can be used as a direct replacement for the bean type. The steps is now:<br clear="none">
+1. payload from the <a shape="rect" href="/confluence/display/CAMEL/JMS" title="JMS">JMS</a> is sent as input to the validateOrder bean<br clear="none">
+2. the output from validateOrder bean is sent as text to the mainframe using TCP<br clear="none">
+3. the output from mainframe is sent back as input to the sendConfirmEmai bean</p>
+
+<p>What to notice here is that the <tt>to</tt> is not the end of the route (the world <img align="absmiddle" class="emoticon" src="/confluence/images/icons/emoticons/wink.gif" height="20" width="20" alt="" border="0">) in this example it's used in the middle of the <a shape="rect" href="/confluence/display/CAMEL/Pipes+and+Filters" title="Pipes and Filters">Pipes and Filters</a>. In fact we can change the <tt>bean</tt> types to <tt>to</tt> as well:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+   <span class="code-tag">&lt;from uri=<span class="code-quote">"jms:queue:order"</span>/&gt;</span>
+   <span class="code-tag">&lt;to uri=<span class="code-quote">"bean:validateOrder"</span>/&gt;</span>
+   <span class="code-tag">&lt;to uri=<span class="code-quote">"mina:tcp://mainframeip:4444?textline=true"</span>/&gt;</span>
+   <span class="code-tag">&lt;to uri=<span class="code-quote">"bean:sendConfirmEmail"</span>/&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+
+<p>As the <tt>to</tt> is a generic type we must state in the uri scheme which component it is. So we must write <b>bean:</b> for the <a shape="rect" href="/confluence/display/CAMEL/Bean" title="Bean">Bean</a> component that we are using.</p>
+
+<h3><a shape="rect" name="BookInOnePage-Conclusion"></a>Conclusion</h3>
+<p>This example was provided to demonstrate the Spring DSL (XML based) as opposed to the pure Java DSL from the <a shape="rect" href="/confluence/display/CAMEL/Walk+through+an+Example" title="Walk through an Example">first example</a>. And as well to point about that the <tt>to</tt> doesn't have to be the last node in a route graph.</p>
+
+<p>This example is also based on the <b>in-only</b> message exchange pattern. What you must understand as well is the <b>in-out</b> message exchange pattern, where the caller expects a response. We will look into this in another example.</p>
+
+<h3><a shape="rect" name="BookInOnePage-Seealso"></a>See also</h3>
+<ul type="square" class="alternate"><li><a shape="rect" href="/confluence/display/CAMEL/Examples" title="Examples">Examples</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Tutorials" title="Tutorials">Tutorials</a></li><li><a shape="rect" href="/confluence/display/CAMEL/User+Guide" title="User Guide">User Guide</a></li></ul>
+</div>
+<div class="chapter" id="chapter-getting-started"><h1><a shape="rect" name="BookInOnePage-GettingStartedwithApacheCamel"></a>Getting Started with Apache Camel</h1></div>
+
+<p><a shape="rect" name="BookInOnePage-eipbook"></a></p>
+<h2><a shape="rect" name="BookInOnePage-TheEnterpriseIntegrationPatterns%28EIP%29book"></a>The <em>Enterprise Integration Patterns</em> (EIP) book</h2>
+<p>The purpose of a "patterns" book is not to advocate new techniques that the authors have invented, but rather to document existing best practices within a particular field. By doing this, the authors of a patterns book hope to spread knowledge of best practices and promote a vocabulary for discussing architectural designs.<br clear="none">
+One of the most famous patterns books is <a shape="rect" class="external-link" href="http://www.amazon.co.uk/Design-patterns-elements-reusable-object-oriented/dp/0201633612/ref=pd_bowtega_2/026-7569372-5501207?ie=UTF8&amp;s=books&amp;qid=1182245640&amp;sr=1-2" rel="nofollow"><em>Design Patterns: Elements of Reusable Object-oriented Software</em></a> by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Some people refer to this as the "gang of four" book, partly to distinguish this book from other books that use "Design Patterns" in their titles and, perhaps, partly because they cannot remember the names of all four authors.<br clear="none">
+Since the publication of <em>Design Patterns</em>, many other patterns books, of varying quality, have been written. One famous patterns book is called <a shape="rect" class="external-link" href="http://www.amazon.co.uk/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_bowtega_1/026-7569372-5501207?ie=UTF8&amp;s=books&amp;qid=1182252002&amp;sr=1-1" rel="nofollow"><em>Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions</em></a> by Gregor Hohpe and Bobby Woolfe. It is common for people to refer to this book as <em>EIP</em>, which is an acronym of its title. As the subtitle of EIP suggests, the book focusses on design patterns for asynchronous messaging systems. The book discusses 65 patterns. Each pattern is given a textual name and most are also given a graphical symbol. The graphical symbols are intended to be used in architectural diagrams.</p>
+
+<h2><a shape="rect" name="BookInOnePage-TheCamelproject"></a>The Camel project</h2>
+<p>Camel (<a shape="rect" class="external-link" href="http://activemq.apache.org/camel/" rel="nofollow">http://activemq.apache.org/camel/</a>) is an open-source, Java-based project that is a part of the Apache <em>ActiveMQ</em> project. Camel provides a class library that, according to its documentation, can be used to implement 31 design patterns in the EIP book. I am not sure why the Camel documentation discusses only 31 of the 65 EIP design patterns. Perhaps this is due to incomplete documentation. Or perhaps it means that the Camel project, which is less than 1 year old at the time of writing, is not yet as feature rich as the EIP book.<br clear="none">
+Because Camel implements many of the design patterns in the EIP book, it would be a good idea for people who work with Camel to read the EIP book.</p>
+
+<h2><a shape="rect" name="BookInOnePage-OnlinedocumentationforCamel"></a>Online documentation for Camel</h2>
+<p>The Camel project was started in early 2007. At the time of writing, the Camel project is too young for there to be published books available on how to use Camel. Instead, the only source of documentation seems to the <a shape="rect" class="external-link" href="http://activemq.apache.org/camel/documentation.html" rel="nofollow">documentation</a> page on the Apache Camel website.</p>
+
+<p>Here in early 2010 the Camel project have been successful for the last couple of years and thus there are now books available about Camel. We have gathered a <a shape="rect" href="/confluence/display/CAMEL/Books" title="Books">list of books here</a>.</p>
+
+<p><a shape="rect" name="BookInOnePage-problemswithonlinedocs"></a></p>
+<h3><a shape="rect" name="BookInOnePage-ProblemswithCamel%27sonlinedocumentation"></a>Problems with Camel's online documentation</h3>
+<p>Currently, the online documentation for the Apache Camel project suffers from two problems. First, the documentation is incomplete. Second, there is no clearly specified reading order to the documentation. For example, there is no table of contents. Instead, documentation is fragmented over a collection of 100+ web pages, and hypertext links haphazardly tie these web pages to each other. This documentation might suffice as reference material for people already familiar with Camel but it does not qualify as a tutorial for beginners.<br clear="none">
+The problems with the documentation are unlikely to be due to, say, its author(s) lacking writing ability. Rather, it is more likely that the problems are due to the author(s) lack of time. I expect Camel's documentation will improve over time. I am writing this overview of Camel to partially counter some of the problems that currently afflict the Camel documentation. In particular, this document aims to serve as a (so far, incomplete) "beginner's guide to Camel". As such, this document tries to complement, rather than compete with, the online Camel documentation.</p>
+
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="absmiddle" src="/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Camel in Action book</b><br clear="none">If you are on the lookup for a comprehensive and organized documentation, then we can recommend the <a shape="rect" class="external-link" href="http://manning.com/ibsen" rel="nofollow">Camel in Action</a> book, which is the Camel bible.</td></tr></table></div>
+
+<h3><a shape="rect" name="BookInOnePage-Ausefultipfornavigatingtheonlinedocumentation"></a>A useful tip for navigating the online documentation</h3>
+<p>There is one useful hint I can provide for reading the online Camel documentation. Each documentation page has a logo at the top, and immediately underneath this is a think reddish bar that contains some hypertext links. The Hypertext links on left side of this reddish bar indicate your position in documentation. For example, If you are on the "Languages" documentation page then the left-hand side of the reddish bar contains the following links.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+Apache Camel &gt; Documentation &gt; Architecture &gt; Languages
+</pre>
+</div></div>
+<p>As you might expect, clicking on "Apache Camel" takes you back to the home page of the Apache Camel project, and clicking on "Documentation" takes you to the main documentation page. You can interpret the "Architeture" and "Languages" buttons as indicating you are in the "Languages" section of the "Architecture" chapter. Doing this gives you at least some sense of where you are within the documentation. If you are patient then you can spend a few hours clicking on all the hypertext links you can find in the documentation pages, bookmark each page with a hierarchical name (for example, you might bookmark the above page with the name "Camel &#8211; Arch &#8211; Languages") and then you can use your bookmarks to serve as a primitive table of contents for the online Camel documentation.</p>
+
+<p><a shape="rect" name="BookInOnePage-onlinejavadocdocs"></a></p>
+<h2><a shape="rect" name="BookInOnePage-OnlineJavadocdocumentation"></a>Online Javadoc documentation</h2>
+<p>The Apache Camel website provides <a shape="rect" class="external-link" href="http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/index.html" rel="nofollow">Javadoc documentation</a>. It is important to note that the Javadoc documentation is spread over several <em>independent</em> Javadoc hierarchies rather than being all contained in a single Javadoc hierarchy. In particular, there is one Javadoc hierarchy for the <em>core</em> APIs of Camel, and a separate Javadoc hierarchy for each communications technology supported by Camel. For example, if you will be using Camel with ActiveMQ and FTP then you need to look at the Javadoc hierarchies for the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/index.html" rel="nofollow">core API</a> and <a shape="rect" class="external-link" href="http://camel.apache.org/maven/camel-2.2.0/camel-spring/apidocs/index.html" rel="nofollow">Spring API</a>.</p>
+
+<h2><a shape="rect" name="BookInOnePage-ConceptsandterminologyfundamentaltoCamel"></a>Concepts and terminology fundamental to Camel</h2>
+<p>I said in <a shape="rect" href="#BookInOnePage-problemswithonlinedocs">Section 3.1 ("Problems with Camel's online documentation")</a> that the online Camel documentation does not provide a tutorial for beginners. Because of this, in this section I try to explain some of the concepts and terminology that are fundamental to Camel. This section is not a complete Camel tutorial, but it is a first step in that direction.</p>
+
+<p><a shape="rect" name="BookInOnePage-endpoint"></a></p>
+<h3><a shape="rect" name="BookInOnePage-Endpoint"></a>Endpoint</h3>
+<p>The term <em>endpoint</em> is often used when talking about inter-process communication. For example, in client-server communication, the client is one endpoint and the server is the other endpoint. Depending on the context, an endpoint might refer to an <em>address</em>, such as a host:port pair for TCP-based communication, or it might refer to a <em>software entity</em> that is contactable at that address. For example, if somebody uses "www.example.com:80" as an example of an endpoint, they might be referring to the actual port at that host name (that is, an address), or they might be referring to the web server (that is, software contactable at that address). Often, the distinction between the address and software contactable at that address is not an important one.<br clear="none">
+Some middleware technologies make it possible for several software entities to be contactable at the same physical address. For example, CORBA is an object-oriented, remote-procedure-call (RPC) middleware standard. If a CORBA server process contains several objects then a client can communicate with any of these objects at the same <em>physical</em> address (host:port), but a client communicates with a particular object via that object's <em>logical</em> address (called an <em>IOR</em> in CORBA terminology), which consists of the physical address (host:port) plus an id that uniquely identifies the object within its server process. (An IOR contains some additional information that is not relevant to this present discussion.) When talking about CORBA, some people may use the term "endpoint" to refer to a CORBA server's <em>physical address</em>, while other people may use the term to refer to the <em>logical address</em> of a single CORBA object, and other people still might u
 se the term to refer to any of the following:</p>
+<ul><li>The physical address (host:port) of the CORBA server process</li><li>The logical address (host:port plus id) of a CORBA object.</li><li>The CORBA server process (a relatively heavyweight software entity)</li><li>A CORBA object (a lightweight software entity)<br clear="none">
+Because of this, you can see that the term <em>endpoint</em> is ambiguous in at least two ways. First, it is ambiguous because it might refer to an address or to a software entity contactable at that address. Second, it is ambiguous in the <em>granularity</em> of what it refers to: a heavyweight versus lightweight software entity, or physical address versus logical address. It is useful to understand that different people use the term <em>endpoint</em> in slightly different (and hence ambiguous) ways because Camel's usage of this term might be different to whatever meaning you had previously associated with the term.<br clear="none">
+Camel provides out-of-the-box support for endpoints implemented with many different communication technologies. Here are some examples of the Camel-supported endpoint technologies.</li><li>A JMS queue.</li><li>A web service.</li><li>A file. A file may sound like an unlikely type of endpoint, until you realize that in some systems one application might write information to a file and, later, another application might read that file.</li><li>An FTP server.</li><li>An email address. A client can send a message to an email address, and a server can read an incoming message from a mail server.</li><li>A POJO (plain old Java object).<br clear="none">
+In a Camel-based application, you create (Camel wrappers around) some endpoints and connect these endpoints with <em>routes</em>, which I will discuss later in <a shape="rect" href="#BookInOnePage-routes">Section 4.8 ("Routes, RouteBuilders and Java DSL")</a>. Camel defines a Java interface called <tt>Endpoint</tt>. Each Camel-supported endpoint has a class that implements this <tt>Endpoint</tt> interface. As I discussed in <a shape="rect" href="#BookInOnePage-onlinejavadocdocs">Section 3.3 ("Online Javadoc documentation")</a>, Camel provides a separate Javadoc hierarchy for each communications technology supported by Camel. Because of this, you will find documentation on, say, the <tt>JmsEndpoint</tt> class in the <a shape="rect" class="external-link" href="http://activemq.apache.org/camel/maven/camel-jms/apidocs/" rel="nofollow">JMS Javadoc hierarchy</a>, while documentation for, say, the <tt>FtpEndpoint</tt> class is in the <a shape="rect" class="external-link" href="http
 ://activemq.apache.org/camel/maven/camel-ftp/apidocs/" rel="nofollow">FTP Javadoc hierarchy</a>.</li></ul>
+
+
+<h3><a shape="rect" name="BookInOnePage-CamelContext"></a>CamelContext</h3>
+<p>A <tt>CamelContext</tt> object represents the Camel runtime system. You typically have one <tt>CamelContext</tt> object in an application. A typical application executes the following steps.</p>
+<ol><li>Create a <tt>CamelContext</tt> object.</li><li>Add endpoints &#8211; and possibly Components, which are discussed in <a shape="rect" href="#BookInOnePage-componentsanduris">Section 4.5 ("Components")</a> &#8211; to the <tt>CamelContext</tt> object.</li><li>Add routes to the <tt>CamelContext</tt> object to connect the endpoints.</li><li>Invoke the <tt>start()</tt> operation on the <tt>CamelContext</tt> object. This starts Camel-internal threads that are used to process the sending, receiving and processing of messages in the endpoints.</li><li>Eventually invoke the <tt>stop()</tt> operation on the <tt>CamelContext</tt> object. Doing this gracefully stops all the endpoints and Camel-internal threads.<br clear="none">
+Note that the <tt>CamelContext.start()</tt> operation does not block indefinitely. Rather, it starts threads internal to each <tt>Component</tt> and <tt>Endpoint</tt> and then <tt>start()</tt> returns. Conversely, <tt>CamelContext.stop()</tt> waits for all the threads internal to each <tt>Endpoint</tt> and <tt>Component</tt> to terminate and then <tt>stop()</tt> returns.<br clear="none">
+If you neglect to call <tt>CamelContext.start()</tt> in your application then messages will not be processed because internal threads will not have been created.<br clear="none">
+If you neglect to call <tt>CamelContext.stop()</tt> before terminating your application then the application may terminate in an inconsistent state. If you neglect to call <tt>CamelContext.stop()</tt> in a JUnit test then the test may fail due to messages not having had a chance to be fully processed.</li></ol>
+
+
+<h3><a shape="rect" name="BookInOnePage-CamelTemplate"></a>CamelTemplate</h3>
+<p>Camel used to have a class called <tt>CamelClient</tt>, but this was renamed to be <tt>CamelTemplate</tt> to be similar to a naming convention used in some other open-source projects, such as the <tt>TransactionTemplate</tt> and <tt>JmsTemplate</tt> classes in <a shape="rect" class="external-link" href="http://www.springframework.org/" rel="nofollow">Spring</a>.<br clear="none">
+The <tt>CamelTemplate</tt> class is a thin wrapper around the <tt>CamelContext</tt> class. It has methods that send a <tt>Message</tt> or <tt>Exchange</tt> &#8211; both discussed in <a shape="rect" href="#BookInOnePage-messageandexchange">Section 4.6 ("Message and Exchange")</a>) &#8211; to an <tt>Endpoint</tt> &#8211; discussed in <a shape="rect" href="#BookInOnePage-endpoint">Section 4.1 ("Endpoint")</a>. This provides a way to enter messages into source endpoints, so that the messages will move along routes &#8211; discussed in <a shape="rect" href="#BookInOnePage-routes">Section 4.8 ("Routes, RouteBuilders and Java DSL")</a> &#8211; to destination endpoints.</p>
+
+<p><a shape="rect" name="BookInOnePage-urluriurniri"></a></p>
+<h3><a shape="rect" name="BookInOnePage-TheMeaningofURL%2CURI%2CURNandIRI"></a>The Meaning of URL, URI, URN and IRI </h3>
+<p>Some Camel methods take a parameter that is a <em>URI</em> string. Many people know that a URI is "something like a URL" but do not properly understand the relationship between URI and URL, or indeed its relationship with other acronyms such as IRI and URN.<br clear="none">
+Most people are familiar with <em>URLs</em> (uniform resource locators), such as "http://...", "ftp://...", "mailto:...". Put simply, a URL specifies the <em>location</em> of a resource.<br clear="none">
+A <em>URI</em> (uniform resource identifier) is a URL <em>or</em> a URN. So, to fully understand what URI means, you need to first understand what is a URN.<br clear="none">
+<em>URN</em> is an acronym for <em>uniform resource name</em>. There are may "unique identifier" schemes in the world, for example, ISBNs (globally unique for books), social security numbers (unique within a country), customer numbers (unique within a company's customers database) and telephone numbers. Each "unique identifier" scheme has its own notation. A URN is a wrapper for different "unique identifier" schemes. The syntax of a URN is "urn:&lt;scheme-name&gt;:&lt;unique-identifier&gt;". A URN uniquely identifies a <em>resource</em>, such as a book, person or piece of equipment. By itself, a URN does not specify the <em>location</em> of the resource. Instead, it is assumed that a <em>registry</em> provides a mapping from a resource's URN to its location. The URN specification does not state what form a registry takes, but it might be a database, a server application, a wall chart or anything else that is convenient. Some hypothetical examples of URNs are "urn:employee:08
 765245", "urn:customer:uk:3458:hul8" and "urn:foo:0000-0000-9E59-0000-5E-2". The &lt;scheme-name&gt; ("employee", "customer" and "foo" in these examples) part of a URN implicitly defines how to parse and interpret the &lt;unique-identifier&gt; that follows it. An arbitrary URN is meaningless unless: (1) you know the semantics implied by the &lt;scheme-name&gt;, and (2) you have access to the registry appropriate for the &lt;scheme-name&gt;. A registry does not have to be public or globally accessible. For example, "urn:employee:08765245" might be meaningful only within a specific company.<br clear="none">
+To date, URNs are not (yet) as popular as URLs. For this reason, URI is widely misused as a synonym for URL.<br clear="none">
+<em>IRI</em> is an acronym for <em>internationalized resource identifier</em>. An IRI is simply an internationalized version of a URI. In particular, a URI can contain letters and digits in the US-ASCII character set, while a IRI can contain those same letters and digits, and <em>also</em> European accented characters, Greek letters, Chinese ideograms and so on.</p>
+
+<h3><a shape="rect" name="BookInOnePage-Components"></a>Components</h3>
+<p><em>Component</em> is confusing terminology; <em>EndpointFactory</em> would have been more appropriate because a <tt>Component</tt> is a factory for creating <tt>Endpoint</tt> instances. For example, if a Camel-based application uses several JMS queues then the application will create one instance of the <tt>JmsComponent</tt> class (which implements the <tt>Component</tt> interface), and then the application invokes the <tt>createEndpoint()</tt> operation on this <tt>JmsComponent</tt> object several times. Each invocation of <tt>JmsComponent.createEndpoint()</tt> creates an instance of the <tt>JmsEndpoint</tt> class (which implements the <tt>Endpoint</tt> interface). Actually, application-level code does not invoke <tt>Component.createEndpoint()</tt> directly. Instead, application-level code normally invokes <tt>CamelContext.getEndpoint()</tt>; internally, the <tt>CamelContext</tt> object finds the desired <tt>Component</tt> object (as I will discuss shortly) and then inv
 okes <tt>createEndpoint()</tt> on it.<br clear="none">
+Consider the following code.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+myCamelContext.getEndpoint(<span class="code-quote">"pop3:<span class="code-comment">//john.smith@mailserv.example.com?password=myPassword"</span>);</span>
+</pre>
+</div></div>
+<p>The parameter to <tt>getEndpoint()</tt> is a URI. The URI <em>prefix</em> (that is, the part before ":") specifies the name of a component. Internally, the <tt>CamelContext</tt> object maintains a mapping from names of components to <tt>Component</tt> objects. For the URI given in the above example, the <tt>CamelContext</tt> object would probably map the <tt>pop3</tt> prefix to an instance of the <tt>MailComponent</tt> class. Then the <tt>CamelContext</tt> object invokes <tt>createEndpoint("pop3://john.smith@mailserv.example.com?password=myPassword")</tt> on that <tt>MailComponent</tt> object. The <tt>createEndpoint()</tt> operation splits the URI into its component parts and uses these parts to create and configure an <tt>Endpoint</tt> object.<br clear="none">
+In the previous paragraph, I mentioned that a <tt>CamelContext</tt> object maintains a mapping from component names to <tt>Component</tt> objects. This raises the question of how this map is populated with named <tt>Component</tt> objects. There are two ways of populating the map. The first way is for application-level code to invoke <tt>CamelContext.addComponent(String componentName, Component component)</tt>. The example below shows a single <tt>MailComponent</tt> object being registered in the map under 3 different names.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+Component mailComponent = <span class="code-keyword">new</span> org.apache.camel.component.mail.MailComponent();
+myCamelContext.addComponent(<span class="code-quote">"pop3"</span>, mailComponent);
+myCamelContext.addComponent(<span class="code-quote">"imap"</span>, mailComponent);
+myCamelContext.addComponent(<span class="code-quote">"smtp"</span>, mailComponent);
+</pre>
+</div></div>
+<p>The second (and preferred) way to populate the map of named <tt>Component</tt> objects in the <tt>CamelContext</tt> object is to let the <tt>CamelContext</tt> object perform lazy initialization. This approach relies on developers following a convention when they write a class that implements the <tt>Component</tt> interface. I illustrate the convention by an example. Let's assume you write a class called <tt>com.example.myproject.FooComponent</tt> and you want Camel to automatically recognize this by the name "foo". To do this, you have to write a properties file called "META-INF/services/org/apache/camel/component/foo" (without a ".properties" file extension) that has a single entry in it called <tt>class</tt>, the value of which is the fully-scoped name of your class. This is shown below.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/services/org/apache/camel/component/foo</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+class=com.example.myproject.FooComponent
+</pre>
+</div></div>
+<p>If you want Camel to also recognize the class by the name "bar" then you write another properties file in the same directory called "bar" that has the same contents. Once you have written the properties file(s), you create a jar file that contains the <tt>com.example.myproject.FooComponent</tt> class and the properties file(s), and you add this jar file to your CLASSPATH. Then, when application-level code invokes <tt>createEndpoint("foo:...")</tt> on a <tt>CamelContext</tt> object, Camel will find the "foo"" properties file on the CLASSPATH, get the value of the <tt>class</tt> property from that properties file, and use reflection APIs to create an instance of the specified class.<br clear="none">
+As I said in <a shape="rect" href="#BookInOnePage-endpoint">Section 4.1 ("Endpoint")</a>, Camel provides out-of-the-box support for numerous communication technologies. The out-of-the-box support consists of classes that implement the <tt>Component</tt> interface plus properties files that enable a <tt>CamelContext</tt> object to populate its map of named <tt>Component</tt> objects.<br clear="none">
+Earlier in this section I gave the following example of calling <tt>CamelContext.getEndpoint()</tt>.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+myCamelContext.getEndpoint(<span class="code-quote">"pop3:<span class="code-comment">//john.smith@mailserv.example.com?password=myPassword"</span>);</span>
+</pre>
+</div></div>
+<p>When I originally gave that example, I said that the parameter to <tt>getEndpoint()</tt> was a URI. I said that because the online Camel documentation and the Camel source code both claim the parameter is a URI. In reality, the parameter is restricted to being a URL. This is because when Camel extracts the component name from the parameter, it looks for the first ":", which is a simplistic algorithm. To understand why, recall from <a shape="rect" href="#BookInOnePage-urluriurniri">Section 4.4 ("The Meaning of URL, URI, URN and IRI")</a> that a URI can be a URL <em>or</em> a URN. Now consider the following calls to <tt>getEndpoint</tt>.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+myCamelContext.getEndpoint(<span class="code-quote">"pop3:..."</span>);
+myCamelContext.getEndpoint(<span class="code-quote">"jms:..."</span>);
+myCamelContext.getEndpoint(<span class="code-quote">"urn:foo:..."</span>);
+myCamelContext.getEndpoint(<span class="code-quote">"urn:bar:..."</span>);
+</pre>
+</div></div>
+<p>Camel identifies the components in the above example as "pop3", "jms", "urn" and "urn". It would be more useful if the latter components were identified as "urn:foo" and "urn:bar" or, alternatively, as "foo" and "bar" (that is, by skipping over the "urn:" prefix). So, in practice you must identify an endpoint with a URL (a string of the form "&lt;scheme&gt;:...") rather than with a URN (a string of the form "urn:&lt;scheme&gt;:..."). This lack of proper support for URNs means the you should consider the parameter to <tt>getEndpoint()</tt> as being a URL rather than (as claimed) a URI.</p>
+
+<p><a shape="rect" name="BookInOnePage-messageandexchange"></a></p>
+<h3><a shape="rect" name="BookInOnePage-MessageandExchange"></a>Message and Exchange</h3>
+<p>The <tt>Message</tt> interface provides an abstraction for a single message, such as a request, reply or exception message.<br clear="none">
+There are concrete classes that implement the <tt>Message</tt> interface for each Camel-supported communications technology. For example, the <tt>JmsMessage</tt> class provides a JMS-specific implementation of the <tt>Message</tt> interface. The public API of the <tt>Message</tt> interface provides get- and set-style methods to access the <em>message id</em>, <em>body</em> and individual <em>header</em> fields of a messge.<br clear="none">
+The <tt>Exchange</tt> interface provides an abstraction for an exchange of messages, that is, a request message and its corresponding reply or exception message. In Camel terminology, the request, reply and exception messages are called <em>in</em>, <em>out</em> and <em>fault</em> messages.<br clear="none">
+There are concrete classes that implement the <tt>Exchange</tt> interface for each Camel-supported communications technology. For example, the <tt>JmsExchange</tt> class provides a JMS-specific implementation of the <tt>Exchange</tt> interface. The public API of the <tt>Exchange</tt> interface is quite limited. This is intentional, and it is expected that each class that implements this interface will provide its own technology-specific operations.<br clear="none">
+Application-level programmers rarely access the <tt>Exchange</tt> interface (or classes that implement it) directly. However, many classes in Camel are generic types that are instantiated on (a class that implements) <tt>Exchange</tt>. Because of this, the <tt>Exchange</tt> interface appears a lot in the generic signatures of classes and methods.</p>
+
+<h3><a shape="rect" name="BookInOnePage-Processor"></a>Processor</h3>
+<p>The <tt>Processor</tt> interface represents a class that processes a message. The signature of this interface is shown below.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Processor</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">package</span> org.apache.camel;
+<span class="code-keyword">public</span> <span class="code-keyword">interface</span> Processor {
+    void process(Exchange exchange) <span class="code-keyword">throws</span> Exception;
+}
+</pre>
+</div></div>
+<p>Notice that the parameter to the <tt>process()</tt> method is an <tt>Exchange</tt> rather than a <tt>Message</tt>. This provides flexibility. For example, an implementation of this method initially might call <tt>exchange.getIn()</tt> to get the input message and process it. If an error occurs during processing then the method can call <tt>exchange.setException()</tt>.<br clear="none">
+An application-level developer might implement the <tt>Processor</tt> interface with a class that executes some business logic. However, there are many classes in the Camel library that implement the <tt>Processor</tt> interface in a way that provides support for a design pattern in the <a shape="rect" href="#BookInOnePage-eipbook">EIP book</a>. For example, <tt>ChoiceProcessor</tt> implements the message router pattern, that is, it uses a cascading if-then-else statement to route a message from an input queue to one of several output queues. Another example is the <tt>FilterProcessor</tt> class which discards messages that do not satisfy a stated <em>predicate</em> (that is, condition).</p>
+
+<p><a shape="rect" name="BookInOnePage-routes"></a></p>
+<h3><a shape="rect" name="BookInOnePage-Routes%2CRouteBuildersandJavaDSL"></a>Routes, RouteBuilders and Java DSL</h3>
+<p>A <em>route</em> is the step-by-step movement of a <tt>Message</tt> from an input queue, through arbitrary types of decision making (such as filters and routers) to a destination queue (if any). Camel provides two ways for an application developer to specify routes. One way is to specify route information in an XML file. A discussion of that approach is outside the scope of this document. The other way is through what Camel calls a Java <em>DSL</em> (domain-specific language).</p>
+
+<h4><a shape="rect" name="BookInOnePage-IntroductiontoJavaDSL"></a>Introduction to Java DSL</h4>
+<p>For many people, the term "domain-specific language" implies a compiler or interpreter that can process an input file containing keywords and syntax specific to a particular domain. This is <em>not</em> the approach taken by Camel. Camel documentation consistently uses the term "Java DSL" instead of "DSL", but this does not entirely avoid potential confusion. The Camel "Java DSL" is a class library that can be used in a way that looks almost like a DSL, except that it has a bit of Java syntactic baggage. You can see this in the example below. Comments afterwards explain some of the constructs used in the example.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example of Camel's "Java DSL"</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+RouteBuilder builder = <span class="code-keyword">new</span> RouteBuilder() {
+    <span class="code-keyword">public</span> void configure() {
+        from(<span class="code-quote">"queue:a"</span>).filter(header(<span class="code-quote">"foo"</span>).isEqualTo(<span class="code-quote">"bar"</span>)).to(<span class="code-quote">"queue:b"</span>);
+        from(<span class="code-quote">"queue:c"</span>).choice()
+                .when(header(<span class="code-quote">"foo"</span>).isEqualTo(<span class="code-quote">"bar"</span>)).to(<span class="code-quote">"queue:d"</span>)
+                .when(header(<span class="code-quote">"foo"</span>).isEqualTo(<span class="code-quote">"cheese"</span>)).to(<span class="code-quote">"queue:e"</span>)
+                .otherwise().to(<span class="code-quote">"queue:f"</span>);
+    }
+};
+CamelContext myCamelContext = <span class="code-keyword">new</span> DefaultCamelContext();
+myCamelContext.addRoutes(builder);
+</pre>
+</div></div>
+<p>The first line in the above example creates an object which is an instance of an anonymous subclass of <tt>RouteBuilder</tt> with the specified <tt>configure()</tt> method.<br clear="none">
+The <tt>CamelContext.addRoutes(RouterBuilder builder)</tt> method invokes <tt>builder.setContext(this)</tt> &#8211; so the <tt>RouteBuilder</tt> object knows which <tt>CamelContext</tt> object it is associated with &#8211; and then invokes <tt>builder.configure()</tt>. The body of <tt>configure()</tt> invokes methods such as <tt>from()</tt>, <tt>filter()</tt>, <tt>choice()</tt>, <tt>when()</tt>, <tt>isEqualTo()</tt>, <tt>otherwise()</tt> and <tt>to()</tt>.<br clear="none">
+The <tt>RouteBuilder.from(String uri)</tt> method invokes <tt>getEndpoint(uri)</tt> on the <tt>CamelContext</tt> associated with the <tt>RouteBuilder</tt> object to get the specified <tt>Endpoint</tt> and then puts a <tt>FromBuilder</tt> "wrapper" around this <tt>Endpoint</tt>. The <tt>FromBuilder.filter(Predicate predicate)</tt> method creates a <tt>FilterProcessor</tt> object for the <tt>Predicate</tt> (that is, condition) object built from the <tt>header("foo").isEqualTo("bar")</tt> expression. In this way, these operations incrementally build up a <tt>Route</tt> object (with a <tt>RouteBuilder</tt> wrapper around it) and add it to the <tt>CamelContext</tt> object associated with the <tt>RouteBuilder</tt>.</p>
+
+<h4><a shape="rect" name="BookInOnePage-CritiqueofJavaDSL"></a>Critique of Java DSL</h4>
+<p>The online Camel documentation compares Java DSL favourably against the alternative of configuring routes and endpoints in a XML-based Spring configuration file. In particular, Java DSL is less verbose than its XML counterpart. In addition, many integrated development environments (IDEs) provide an auto-completion feature in their editors. This auto-completion feature works with Java DSL, thereby making it easier for developers to write Java DSL.<br clear="none">
+However, there is another option that the Camel documentation neglects to consider: that of writing a parser that can process DSL stored in, say, an external file. Currently, Camel does not provide such a DSL parser, and I do not know if it is on the "to do" list of the Camel maintainers. I think that a DSL parser would offer a significant benefit over the current Java DSL. In particular, the DSL would have a syntactic definition that could be expressed in a relatively short BNF form. The effort required by a Camel user to learn how to use DSL by reading this BNF would almost certainly be significantly less than the effort currently required to study the API of the <tt>RouterBuilder</tt> classes.</p>
+
+
+<h3><a shape="rect" name="BookInOnePage-WanttoknowmoreaboutCamel"></a>Want to know more about Camel</h3>
+
+<p>The <a shape="rect" class="external-link" href="http://www.manning.com/ibsen/" rel="nofollow">Camel in Action</a> book, contains a free chapter 1, which is highly recommended to read to get more familiar with Camel. After all three authors have worked on this chapter, it has been reviewed extensively at four different occasions by a professional review panel, and had two passes of copy editing. What we are saying is that it is 100+ hours of work which nobody every would voluntarily would have used to write on these wiki pages about Camel. </p>
+
+<div class="chapter" id="chapter-architecture"><h1><a shape="rect" name="BookInOnePage-Architecture"></a>Architecture</h1>
+
+<p>Camel uses a Java based <a shape="rect" href="/confluence/display/CAMEL/DSL" title="DSL">Routing Domain Specific Language (DSL)</a> or an <a shape="rect" href="/confluence/display/CAMEL/Xml+Configuration" title="Xml Configuration">Xml Configuration</a> to configure <a shape="rect" href="/confluence/display/CAMEL/Routes" title="Routes">routing and mediation rules</a> which are added to a <a shape="rect" class="external-link" href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/CamelContext.html" rel="nofollow">CamelContext</a> to implement the various <a shape="rect" href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a>. 
+
+</p><p>At a high level Camel consists of a <a shape="rect" class="external-link" href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/CamelContext.html" rel="nofollow">CamelContext</a> which contains a collection of <a shape="rect" href="/confluence/display/CAMEL/Component" title="Component">Component</a> instances. A <a shape="rect" href="/confluence/display/CAMEL/Component" title="Component">Component</a> is essentially a factory of <a shape="rect" href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a> instances. You can explicitly configure <a shape="rect" href="/confluence/display/CAMEL/Component" title="Component">Component</a> instances in Java code or an IoC container like Spring or Guice, or they can be auto-discovered using <a shape="rect" href="/confluence/display/CAMEL/URIs" title="URIs">URIs</a>. </p>
+
+<p>An <a shape="rect" href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a> acts rather like a URI or URL in a web application or a Destination in a JMS system; you can communicate with an endpoint; either sending messages to it or consuming messages from it. You can then create a <a shape="rect" class="external-link" href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/Producer.html" rel="nofollow">Producer</a> or <a shape="rect" class="external-link" href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/Consumer.html" rel="nofollow">Consumer</a> on an <a shape="rect" href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a> to exchange messages with it.</p>
+
+<p>The <a shape="rect" href="/confluence/display/CAMEL/DSL" title="DSL">DSL</a> makes heavy use of pluggable <a shape="rect" href="/confluence/display/CAMEL/Languages" title="Languages">Languages</a> to create an <a shape="rect" href="/confluence/display/CAMEL/Expression" title="Expression">Expression</a> or <a shape="rect" href="/confluence/display/CAMEL/Predicate" title="Predicate">Predicate</a> to make a truly powerful DSL which is extensible to the most suitable language depending on your needs. The following languages are supported</p>
+
+<ul><li><a shape="rect" href="/confluence/display/CAMEL/Bean+Language" title="Bean Language">Bean Language</a> for using Java for expressions</li><li><a shape="rect" href="/confluence/display/CAMEL/Constant" title="Constant">Constant</a></li><li>the unified <a shape="rect" href="/confluence/display/CAMEL/EL" title="EL">EL</a> from JSP and JSF</li><li><a shape="rect" href="/confluence/display/CAMEL/Header" title="Header">Header</a></li><li><a shape="rect" href="/confluence/display/CAMEL/JXPath" title="JXPath">JXPath</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Mvel" title="Mvel">Mvel</a></li><li><a shape="rect" href="/confluence/display/CAMEL/OGNL" title="OGNL">OGNL</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Property" title="Property">Property</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Scala+DSL" title="Scala DSL">Scala DSL</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Scripting+Languages" title="Scripting Languag
 es">Scripting Languages</a> such as
+	<ul><li><a shape="rect" href="/confluence/display/CAMEL/BeanShell" title="BeanShell">BeanShell</a></li><li><a shape="rect" href="/confluence/display/CAMEL/JavaScript" title="JavaScript">JavaScript</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Groovy" title="Groovy">Groovy</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Python" title="Python">Python</a></li><li><a shape="rect" href="/confluence/display/CAMEL/PHP" title="PHP">PHP</a></li><li><a shape="rect" href="/confluence/display/CAMEL/Ruby" title="Ruby">Ruby</a></li></ul>
+	</li><li><a shape="rect" href="/confluence/display/CAMEL/Simple" title="Simple">Simple</a>
+	<ul><li><a shape="rect" href="/confluence/display/CAMEL/File+Language" title="File Language">File Language</a></li></ul>
+	</li><li><a shape="rect" href="/confluence/display/CAMEL/SQL" title="SQL">SQL</a></li><li><a shape="rect" href="/confluence/display/CAMEL/XPath" title="XPath">XPath</a></li><li><a shape="rect" href="/confluence/display/CAMEL/XQuery" title="XQuery">XQuery</a></li></ul>
+
+
+<p>Most of these languages is also supported used as <a shape="rect" href="/confluence/display/CAMEL/Annotation+Based+Expression+Language" title="Annotation Based Expression Language">Annotation Based Expression Language</a>.</p>
+
+<p>For a full details of the individual languages see the <a shape="rect" href="/confluence/display/CAMEL/Book+Languages+Appendix" title="Book Languages Appendix">Language Appendix</a></p>
+
+<h2><a shape="rect" name="BookInOnePage-URIs"></a>URIs</h2>
+
+<p>Camel makes extensive use of URIs to allow you to refer to endpoints which are lazily created by a <a shape="rect" href="/confluence/display/CAMEL/Component" title="Component">Component</a> if you refer to them within <a shape="rect" href="/confluence/display/CAMEL/Routes" title="Routes">Routes</a></p>
+
+<h3><a shape="rect" name="BookInOnePage-CurrentSupportedURIs"></a>Current Supported URIs</h3>
+
+<div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Component / ArtifactId / URI </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/ActiveMQ" title="ActiveMQ">ActiveMQ</a> / activemq-camel
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+activemq:[topic:]destinationName
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For JMS Messaging with <a shape="rect" class="external-link" href="http://activemq.apache.org/" title="The most popular and powerful open source message broker" rel="nofollow">Apache ActiveMQ</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/ActiveMQ+Journal" title="ActiveMQ Journal">ActiveMQ Journal</a> / activemq-core
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+activemq.journal:directory-on-filesystem
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Uses ActiveMQ's fast disk journaling implementation to store message bodies in a rolling log file </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/AMQP" title="AMQP">AMQP</a> / camel-amqp
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+amqp:[topic:]destinationName
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For Messaging with <a shape="rect" class="external-link" href="http://www.amqp.org/" rel="nofollow">AMQP protocol</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Atom" title="Atom">Atom</a> / camel-atom
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+atom:uri
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Working with <a shape="rect" class="external-link" href="http://incubator.apache.org/abdera/" rel="nofollow">Apache Abdera</a> for atom integration, such as consuming an atom feed. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Bean" title="Bean">Bean</a> / camel-core
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+bean:beanName[?method=someMethod]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Uses the <a shape="rect" href="/confluence/display/CAMEL/Bean+Binding" title="Bean Binding">Bean Binding</a> to bind message exchanges to beans in the <a shape="rect" href="/confluence/display/CAMEL/Registry" title="Registry">Registry</a>. Is also used for exposing and invoking POJO (Plain Old Java Objects). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Bean+Validation" title="Bean Validation">Bean Validation</a> / camel-bean-validator
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+bean-validator:something
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Validates the payload of a message using the Java Validation API (<a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=303" rel="nofollow">JSR 303</a> and JAXP Validation) and its reference implementation <a shape="rect" class="external-link" href="http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single/" rel="nofollow">Hibernate Validator</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Browse" title="Browse">Browse</a> / camel-core
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+browse:someName
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Provides a simple <a shape="rect" href="/confluence/display/CAMEL/BrowsableEndpoint" title="BrowsableEndpoint">BrowsableEndpoint</a> which can be useful for testing, visualisation tools or debugging. The exchanges sent to the endpoint are all available to be browsed. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Cache" title="Cache">Cache</a> / camel-cache
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+cache://cachename[?options]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> The cache component facilitates creation of caching endpoints and processors using <a shape="rect" class="external-link" href="http://ehcache.org/" rel="nofollow">EHCache</a> as the cache implementation. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Cometd" title="Cometd">Cometd</a> / camel-cometd
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+cometd://host:port/channelname
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Used to deliver messages using the <a shape="rect" class="external-link" href="http://docs.codehaus.org/display/JETTY/Cometd+(aka+Bayeux)" rel="nofollow">jetty cometd implementation</a> of the <a shape="rect" class="external-link" href="http://svn.xantus.org/shortbus/trunk/bayeux/bayeux.html" rel="nofollow">bayeux protocol</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Crypto+%28Digital+Signatures%29" title="Crypto (Digital Signatures)">Crypto (Digital Signatures)</a> / camel-crypto
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+crypto:sign:name[?options]
+crypto:verify:name[?options]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Used to sign and verify exchanges using the Signature Service of the Java Cryptographic Extension.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/CXF" title="CXF">CXF</a> / camel-cxf
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+cxf:address[?serviceClass=...]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Working with <a shape="rect" class="external-link" href="http://apache.org/cxf/" rel="nofollow">Apache CXF</a> for web services integration </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/CXFRS" title="CXFRS">CXFRS</a> / camel-cxf
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+cxfrs:address[?resourcesClasses=...]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Working with <a shape="rect" class="external-link" href="http://apache.org/cxf/" rel="nofollow">Apache CXF</a> for REST services integration </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/DataSet" title="DataSet">DataSet</a> / camel-core
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+dataset:name
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For load &amp; soak testing the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/camel-core/apidocs/org/apache/camel/component/dataset/DataSet.html" rel="nofollow">DataSet</a> provides a way to create huge numbers of messages for sending to <a shape="rect" href="/confluence/display/CAMEL/Components" title="Components">Components</a> or asserting that they are consumed correctly </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Direct" title="Direct">Direct</a> / camel-core
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+direct:name
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Synchronous call to another endpoint </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Esper" title="Esper">Esper</a> / camel-esper in <a shape="rect" class="external-link" href="http://code.google.com/p/camel-extra/" rel="nofollow">camel-extra</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+esper:name
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Working with the <a shape="rect" class="external-link" href="http://esper.codehaus.org" rel="nofollow">Esper Library</a> for Event Stream Processing </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Event" title="Event">Event</a> / camel-spring
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+event://default
+spring-event://default
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Working with Spring ApplicationEvents </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Exec" title="Exec">Exec</a> / camel-exec
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+exec://executable[?options]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For executing system commands </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/File2" title="File2">File</a> / camel-core
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+file://nameOfFileOrDirectory
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sending messages to a file or polling a file or directory. <b>Camel 1.x use this link <a shape="rect" href="/confluence/display/CAMEL/File" title="File">File</a></b>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Flatpack" title="Flatpack">Flatpack</a> / camel-flatpack
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+flatpack:[fixed|delim]:configFile
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Processing fixed width or delimited files or messages using the <a shape="rect" class="external-link" href="http://flatpack.sourceforge.net" rel="nofollow">FlatPack library</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Freemarker" title="Freemarker">Freemarker</a> / camel-freemarker
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+freemarker:someTemplateResource
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Generates a response using a <a shape="rect" class="external-link" href="http://freemarker.org/" rel="nofollow">Freemarker</a> template </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/FTP2" title="FTP2">FTP</a> / camel-ftp
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+ftp://host[:port]/fileName
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sending and receiving files over FTP. <b>Camel 1.x use this link <a shape="rect" href="/confluence/display/CAMEL/FTP" title="FTP">FTP</a></b>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/FTP2" title="FTP2">FTPS</a> / camel-ftp
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+ftps://host[:port]/fileName
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> Sending and receiving files over FTP Secure (TLS and SSL). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="/confluence/display/CAMEL/gauth" title="gauth">GAuth</a> / <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">camel-gae</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+gauth://name[?options]
+</pre>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"> Used by web applications to implement an <a shape="rect" class="external-link" href="http://code.google.com/apis/accounts/docs/OAuth.html" rel="nofollow">OAuth</a> consumer. See also <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">Camel Components for Google App Engine</a>.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="/confluence/display/CAMEL/ghttp" title="ghttp">GHttp</a> / <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">camel-gae</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+ghttp://hostname[:port][/path][?options]
+ghttp:///path[?options]
+</pre>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"> Provides connectivity to the <a shape="rect" class="external-link" href="http://code.google.com/appengine/docs/java/urlfetch/" rel="nofollow">URL fetch service</a> of Google App Engine but can also be used to receive messages from servlets. See also <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">Camel Components for Google App Engine</a>.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="/confluence/display/CAMEL/glogin" title="glogin">GLogin</a> / <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">camel-gae</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+gauth://hostname[:port][?options]
+</pre>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"> Used by Camel applications outside Google App Engine (GAE) for programmatic login to GAE applications. See also <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">Camel Components for Google App Engine</a>.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="/confluence/display/CAMEL/gtask" title="gtask">GTask</a> / <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">camel-gae</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+gtask://queue-name
+</pre>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"> Supports asynchronous message processing on Google App Engine by using the <a shape="rect" class="external-link" href="http://code.google.com/appengine/docs/java/taskqueue/" rel="nofollow">task queueing service</a> as message queue. See also <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">Camel Components for Google App Engine</a>.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="/confluence/display/CAMEL/gmail" title="gmail">GMail</a> / <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">camel-gae</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+gmail://user@gmail.com[?options]
+gmail://user@googlemail.com[?options]
+</pre>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"> Supports sending of emails via the <a shape="rect" class="external-link" href="http://code.google.com/appengine/docs/java/mail/" rel="nofollow">mail service</a> of Google App Engine. See also <a shape="rect" href="/confluence/display/CAMEL/GAE" title="GAE">Camel Components for Google App Engine</a>.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/HDFS" title="HDFS">HDFS</a> / camel-hdfs in <a shape="rect" class="external-link" href="http://github.com/dgreco/camel-hdfs/" rel="nofollow">camel-hdfs</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+hdfs://path[?options]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For reading/writing from/to an <a shape="rect" class="external-link" href="http://http://hadoop.apache.org/hdfs/" rel="nofollow">HDFS</a> filesystem </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/Hibernate" title="Hibernate">Hibernate</a> / camel-hibernate in <a shape="rect" class="external-link" href="http://code.google.com/p/camel-extra/" rel="nofollow">camel-extra</a>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+hibernate://entityName
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For using a database as a queue via the <a shape="rect" class="external-link" href="http://www.hibernate.org/" rel="nofollow">Hibernate</a> library </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/HL7" title="HL7">HL7</a> / camel-hl7
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+mina:tcp://hostname[:port]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For working with the HL7 MLLP protocol and the HL7 model using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/HTTP" title="HTTP">HTTP</a> / camel-http
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+http://hostname[:port]
+</pre>
+</div></div> </td><td colspan="1" rowspan="1" class="confluenceTd"> For calling out to external HTTP servers </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" href="/confluence/display/CAMEL/iBATIS" title="iBATIS">iBATIS</a> / camel-ibatis
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+ibatis://sqlOperationName
+</pre>

[... 24467 lines stripped ...]