Author: buildbot
Date: Thu Nov 10 21:18:57 2016
New Revision: 1000900

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    
websites/production/camel/content/how-do-i-import-routes-from-other-xml-files.html
    websites/production/camel/content/spring.html

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

Modified: 
websites/production/camel/content/how-do-i-import-routes-from-other-xml-files.html
==============================================================================
--- 
websites/production/camel/content/how-do-i-import-routes-from-other-xml-files.html
 (original)
+++ 
websites/production/camel/content/how-do-i-import-routes-from-other-xml-files.html
 Thu Nov 10 21:18:57 2016
@@ -49,7 +49,7 @@
   </script>
 
     <title>
-    Apache Camel: How do I import routes from other XML files
+    Apache Camel: How Do I Import Routes From Other XML Files
     </title>
 </head>
 <body>
@@ -75,7 +75,7 @@
         <div class="top_red_bar">
           <div id="site-breadcrumbs">
                 <!-- Breadcrumbs -->
-<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a 
href="community.html">Community</a>&nbsp;&gt;&nbsp;<a 
href="faq.html">FAQ</a>&nbsp;&gt;&nbsp;<a 
href="using-camel-questions.html">Using Camel Questions</a>&nbsp;&gt;&nbsp;<a 
href="how-do-i-import-routes-from-other-xml-files.html">How do I import routes 
from other XML files</a>
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a 
href="community.html">Community</a>&nbsp;&gt;&nbsp;<a 
href="faq.html">FAQ</a>&nbsp;&gt;&nbsp;<a 
href="using-camel-questions.html">Using Camel Questions</a>&nbsp;&gt;&nbsp;<a 
href="how-do-i-import-routes-from-other-xml-files.html">How Do I Import Routes 
From Other XML Files</a>
           </div>
           <!-- Quicklinks -->
 <div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a> 
| <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" 
href="source.html">Source</a> | <a shape="rect" class="external-link" 
href="https://github.com/apache/camel/"; rel="nofollow">Github</a> |&#160;<a 
shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" 
href="support.html">Support</a></p></div>
@@ -86,18 +86,7 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 
id="HowdoIimportroutesfromotherXMLfiles-HowdoIimportroutesfromotherXMLfiles">How
 do I import routes from other XML files</h2>
-<p><strong>Available as of Camel 2.3</strong></p>
-
-<p>When defining routes in Camel using <a shape="rect" 
href="xml-configuration.html">Xml Configuration</a> you may want to define some 
routes in other XML files. For example you may have many routes and it may help 
to maintain the application if some of the routes are in separate XML files. 
You may also want to store common and reusable routes in other XML files, which 
you can simply import when needed.</p>
-
-<p>In <strong>Camel 2.3</strong> it is now possible to define routes outside 
<code>&lt;camelContext/&gt;</code> which you do in a new 
<code>&lt;routeContext/&gt;</code> tag.</p>
-
-<div class="confluence-information-macro 
confluence-information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
-<p><strong>Notice:</strong> When you use &lt;routeContext&gt; then they are 
separated, and cannot reuse existing &lt;onException&gt;, &lt;intercept&gt;, 
&lt;dataFormats&gt; and similar cross cutting functionality defined in the 
&lt;camelContext&gt;. In other words the &lt;routeContext&gt; is currently 
isolated. This may change in Camel 3.x.</p></div></div>
-
-<p>For example we could have a file named <code>myCoolRoutes.xml</code> which 
contains a couple of routes as shown:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 
1px;"><b>myCoolRoutes.xml</b></div><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h2 
id="HowDoIImportRoutesFromOtherXMLFiles-HowdoIimportroutesfromotherXMLfiles">How
 do I import routes from other XML files</h2><p><strong>Available as of Camel 
2.3</strong></p><p>When defining routes in Camel using <a shape="rect" 
href="xml-configuration.html">Xml Configuration</a> you may want to define some 
routes in other XML files. For example you may have many routes and it may help 
to maintain the application if some of the routes are in separate XML files. 
You may also want to store common and reusable routes in other XML files, which 
you can simply import when needed.</p><p>In <strong>Camel 2.3</strong> it is 
now possible to define routes outside 
<strong><code>&lt;camelContext/&gt;</code></strong> which you do in a new 
<strong><code>&lt;routeContext/&gt;</code></strong> tag.</p><div 
class="confluence-information-macro 
confluence-information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information
 -macro-icon"></span><div 
class="confluence-information-macro-body"><p><strong>Notice:</strong> When you 
use&#160;<strong><code>&lt;routeContext&gt;</code></strong> then they are 
separated, and cannot reuse existing 
<strong><code>&lt;onException&gt;</code></strong>, 
<strong><code>&lt;intercept&gt;</code></strong>,&#160;<strong><code>&lt;dataFormats&gt;</code></strong>
 and similar cross cutting functionality defined in the 
<strong><code>&lt;camelContext&gt;</code></strong>. In other words 
the&#160;<strong><code>&lt;routeContext&gt;</code></strong> is currently 
isolated. This may change in Camel 3.x.</p></div></div><p>For example we could 
have a file named <strong><code>myCoolRoutes.xml</code></strong> which contains 
a couple of routes as shown:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>myCoolRoutes.xml</b></div><div 
class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
@@ -122,12 +111,7 @@
 
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-
-<p>Then in your XML file which contains the CamelContext you can use Spring to 
import the <code>myCoolRoute.xml</code> file.<br clear="none">
-And then inside <code>&lt;camelContext/&gt;</code> you can refer to the 
<code>&lt;routeContext/&gt;</code> by its id as shown below:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div>Then in your XML file which contains the CamelContext you can use 
Spring to import the <strong><code>myCoolRoute.xml</code></strong> file. And 
then inside <strong><code>&lt;camelContext/&gt;</code></strong> you can refer 
to the <strong><code>&lt;routeContext/&gt;</code></strong> by 
its&#160;<strong><code>id</code></strong> as shown below:<div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;!-- import the routes from another XML file --&gt;
 &lt;import resource=&quot;myCoolRoutes.xml&quot;/&gt;
@@ -144,15 +128,7 @@ And then inside <code>&lt;camelContext/&
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<p>Also notice that you can mix and match, having routes inside CamelContext 
and also externalized in RouteContext.</p>
-
-<p>You can have as many <code>&lt;routeContextRef/&gt;</code> as you like.</p>
-
-<div class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Reusable routes</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
-<p>The routes defined in <code>&lt;routeContext/&gt;</code> can be reused by 
multiple <code>&lt;camelContext/&gt;</code>. However its only the definition 
which is reused. At runtime each CamelContext will create its own instance of 
the route based on the definition.</p></div></div>
-</div>
+</div></div>Also notice that you can mix and match, having routes 
inside&#160;<strong><code>CamelContext</code></strong> and also externalized in 
<strong><code>RouteContext</code></strong>.<p>You can have as many 
<strong><code>&lt;routeContextRef/&gt;</code></strong> as you like.</p><div 
class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Reusable routes</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>The routes defined in 
<strong><code>&lt;routeContext/&gt;</code></strong> can be reused by multiple 
<strong><code>&lt;camelContext/&gt;</code></strong>. However its only the 
definition which is reused. At runtime 
each&#160;<strong><code>CamelContext</code></strong> will create its own 
instance of the route based on the definition.</p></div></div></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/spring.html
==============================================================================
--- websites/production/camel/content/spring.html (original)
+++ websites/production/camel/content/spring.html Thu Nov 10 21:18:57 2016
@@ -86,13 +86,13 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Spring-SpringSupport">Spring 
Support</h2><p>Apache Camel is designed to work nicely with the <a shape="rect" 
class="external-link" href="http://www.springframework.org/"; 
rel="nofollow">Spring Framework</a> in a number of ways.</p><ul><li>Camel uses 
Spring Transactions as the default transaction handling in components like <a 
shape="rect" href="jms.html">JMS</a> and <a shape="rect" 
href="jpa.html">JPA</a></li><li>Camel works with Spring 2 XML processing with 
the <a shape="rect" href="xml-configuration.html">Xml 
Configuration</a></li><li>Camel Spring XML Schema's is defined at <a 
shape="rect" href="xml-reference.html">Xml Reference</a></li><li>Camel supports 
a powerful version of <a shape="rect" href="spring-remoting.html">Spring 
Remoting</a> which can use powerful routing between the client and server side 
along with using all of the available <a shape="rect" 
href="components.html">Components</a> for the transport</li><li>Camel provides p
 owerful <a shape="rect" href="bean-integration.html">Bean Integration</a> with 
any bean defined in a Spring ApplicationContext</li><li>Camel integrates with 
various Spring helper classes; such as providing <a shape="rect" 
href="type-converter.html">Type Converter</a> support for Spring Resources 
etc</li><li>Allows Spring to dependency inject <a shape="rect" 
href="component.html">Component</a> instances or the <a shape="rect" 
href="camelcontext.html">CamelContext</a> instance itself and auto-expose 
Spring beans as components and endpoints.</li><li>Allows you to reuse the <a 
shape="rect" href="spring-testing.html">Spring Testing</a> framework to 
simplify your unit and integration testing using <a shape="rect" 
href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> 
and Camel's powerful <a shape="rect" href="mock.html">Mock</a> and <a 
shape="rect" href="test.html">Test</a> 
endpoints</li><li>From&#160;<strong>Camel 2.15</strong> onwards Camel supports 
Spring Boot 
 using the&#160;<code><a shape="rect" 
href="spring-boot.html">camel-spring-boot</a></code> 
component.</li><li>From&#160;<strong>Camel 2.17.1&#160;</strong>onwards Camel 
supports Spring Cache based Idempotent repository</li></ul><h2 
id="Spring-UsingSpringtoconfiguretheCamelContext">Using Spring to configure the 
CamelContext</h2><p>You can configure a CamelContext inside any spring.xml 
using the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/CamelContextFactoryBean.html";>CamelContextFactoryBean</a>.
 This will automatically <a shape="rect" href="lifecycle.html">start</a> the <a 
shape="rect" href="camelcontext.html">CamelContext</a> along with any 
referenced <a shape="rect" href="routes.html">Routes</a> along any referenced 
<a shape="rect" href="component.html">Component</a> and <a shape="rect" 
href="endpoint.html">Endpoint</a> instances.</p><ul><li>Adding Camel 
schema</li><li>Configure <a shape="rect" href="
 routes.html">Routes</a> in two ways:<ul><li>Using Java Code</li><li>Using 
Spring XML</li></ul></li></ul><h3 id="Spring-AddingCamelSchema">Adding Camel 
Schema</h3><div class="confluence-information-macro 
confluence-information-macro-note"><span class="aui-icon aui-icon-small 
aui-iconfont-warning confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>For Camel 1.x you need to use the 
following namespace:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h2 id="Spring-SpringSupport">Spring 
Support</h2><p>Apache Camel is designed to work nicely with the <a shape="rect" 
class="external-link" href="http://www.springframework.org/"; 
rel="nofollow">Spring Framework</a> in a number of ways.</p><ul><li>Camel uses 
Spring Transactions as the default transaction handling in components like <a 
shape="rect" href="jms.html">JMS</a> and <a shape="rect" 
href="jpa.html">JPA</a></li><li>Camel works with Spring 2 XML processing with 
the <a shape="rect" href="xml-configuration.html">Xml 
Configuration</a></li><li>Camel Spring XML Schema's is defined at <a 
shape="rect" href="xml-reference.html">Xml Reference</a></li><li>Camel supports 
a powerful version of <a shape="rect" href="spring-remoting.html">Spring 
Remoting</a> which can use powerful routing between the client and server side 
along with using all of the available <a shape="rect" 
href="components.html">Components</a> for the transport</li><li>Camel provides p
 owerful <a shape="rect" href="bean-integration.html">Bean Integration</a> with 
any bean defined in a Spring 
<strong><code>ApplicationContext</code></strong>.</li><li>Camel integrates with 
various Spring helper classes; such as providing <a shape="rect" 
href="type-converter.html">Type Converter</a> support for Spring Resources 
etc</li><li>Allows Spring to dependency inject <a shape="rect" 
href="component.html">Component</a> instances or the <a shape="rect" 
href="camelcontext.html">CamelContext</a> instance itself and auto-expose 
Spring beans as components and endpoints.</li><li>Allows you to reuse the <a 
shape="rect" href="spring-testing.html">Spring Testing</a> framework to 
simplify your unit and integration testing using <a shape="rect" 
href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> 
and Camel's powerful <a shape="rect" href="mock.html">Mock</a> and <a 
shape="rect" href="test.html">Test</a> 
endpoints</li><li>From&#160;<strong>Camel 2.15</strong>: Cam
 el supports Spring Boot using the&#160;<code><a shape="rect" 
href="spring-boot.html">camel-spring-boot</a></code> 
component.</li><li>From&#160;<strong>Camel 2.17.1</strong>: Camel supports 
Spring Cache based Idempotent repository</li></ul><h2 
id="Spring-UsingSpringtoconfiguretheCamelContext">Using Spring to configure the 
CamelContext</h2><p>You can configure 
a&#160;<strong><code>CamelContext</code></strong> inside 
any&#160;<strong><code>spring.xml</code></strong> using the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/CamelContextFactoryBean.html";>CamelContextFactoryBean</a>.
 This will automatically <a shape="rect" href="lifecycle.html">start</a> the <a 
shape="rect" href="camelcontext.html">CamelContext</a> along with any 
referenced <a shape="rect" href="routes.html">Routes</a> along any referenced 
<a shape="rect" href="component.html">Component</a> and <a shape="rect" 
href="endpoint.html">Endpoint</a> 
 instances.</p><ul><li>Adding Camel schema</li><li>Configure <a shape="rect" 
href="routes.html">Routes</a> in two ways:<ul><li>Using Java Code</li><li>Using 
Spring XML</li></ul></li></ul><h3 id="Spring-AddingCamelSchema">Adding Camel 
Schema</h3><div class="confluence-information-macro 
confluence-information-macro-note"><span class="aui-icon aui-icon-small 
aui-iconfont-warning confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>For Camel 1.x you need to use the 
following namespace:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[http://activemq.apache.org/camel/schema/spring
 ]]></script>
 </div></div><p>with the following schema location:</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
 ]]></script>
-</div></div></div></div><p>You need to add Camel to the 
<code>schemaLocation</code> declaration</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div></div></div><p>You need to add Camel to the 
<strong><code>schemaLocation</code></strong> declaration</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
 ]]></script>
 </div></div><p>So the XML file looks like this:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -102,7 +102,7 @@
           http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
           http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd&quot;&gt;
 ]]></script>
-</div></div><h4 id="Spring-Usingcamel:namespace">Using camel: 
namespace</h4><p>Or you can refer to camel XSD in the XML declaration:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h4 
id="Spring-Usingcamel:Namespace">Using&#160;<code>camel:</code> 
Namespace</h4><p>Or you can refer to the camel XSD in the XML 
declaration:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[xmlns:camel=&quot;http://camel.apache.org/schema/spring&quot;
 ]]></script>
 </div></div><p>... so the declaration is:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -114,13 +114,13 @@
           http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
           http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd&quot;&gt;
 ]]></script>
-</div></div>... and then use the camel: namespace prefix, and you can omit the 
inline namespace declaration:<div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+</div></div>... and then use the&#160;<strong><code>camel:</code></strong> 
namespace prefix, and you can omit the inline namespace declaration:<div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;camel:camelContext id=&quot;camel5&quot;&gt;
   &lt;camel:package&gt;org.apache.camel.spring.example&lt;/camel:package&gt;
 &lt;/camel:camelContext&gt;
 ]]></script>
-</div></div><h4 id="Spring-AdvancedconfigurationusingSpring">Advanced 
configuration using Spring</h4><p>See more details at <a shape="rect" 
href="advanced-configuration-of-camelcontext-using-spring.html">Advanced 
configuration of CamelContext using Spring</a></p><h3 
id="Spring-UsingJavaCode">Using Java Code</h3><p>You can use Java Code to 
define your <a shape="rect" href="routebuilder.html">RouteBuilder</a> 
implementations. These can be defined as beans in spring and then referenced in 
your camel context e.g.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="Spring-AdvancedConfigurationUsingSpring">Advanced 
Configuration Using Spring</h4><p>See more details at <a shape="rect" 
href="advanced-configuration-of-camelcontext-using-spring.html">Advanced 
configuration of CamelContext using Spring</a></p><h3 
id="Spring-UsingJavaCode">Using Java Code</h3><p>You can use Java Code to 
define your <a shape="rect" href="routebuilder.html">RouteBuilder</a> 
implementations. These can be defined as beans in spring and then referenced in 
your camel context e.g.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
   &lt;camelContext id=&quot;camel5&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;routeBuilder ref=&quot;myBuilder&quot; /&gt;    
@@ -130,12 +130,12 @@
   
 &lt;/beans&gt;
 ]]></script>
-</div></div><h4 id="Spring-Using&lt;package&gt;">Using 
&lt;package&gt;</h4><p>Camel also provides a powerful feature that allows for 
the automatic discovery and initialization of routes in given packages. This is 
configured by adding tags to the camel context in your spring context 
definition, specifying the packages to be recursively searched for <a 
shape="rect" href="routebuilder.html">RouteBuilder</a> implementations. To use 
this feature in 1.X, requires a &lt;package&gt;&lt;/package&gt; tag specifying 
a comma separated list of packages that should be searched e.g.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h4 
id="Spring-Using&lt;package&gt;">Using&#160;<code>&lt;package&gt;</code></h4><p>Camel
 also provides a powerful feature that allows for the automatic discovery and 
initialization of routes in given packages. This is configured by adding tags 
to the camel context in your spring context definition, specifying the packages 
to be recursively searched for <a shape="rect" 
href="routebuilder.html">RouteBuilder</a> implementations. To use this feature 
in <strong><code>1.X</code></strong>, requires 
a&#160;<strong><code>&lt;package&gt;&lt;/package&gt;</code></strong> tag 
specifying a comma separated list of packages that should be searched 
e.g.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;camelContext 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;package&gt;org.apache.camel.spring.config.scan.route&lt;/package&gt;
   &lt;/camelContext&gt;
 ]]></script>
-</div></div><div class="confluence-information-macro 
confluence-information-macro-warning"><span class="aui-icon aui-icon-small 
aui-iconfont-error confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Use caution when specifying the 
package name as <code>org.apache.camel</code> or a sub package of this. This 
causes Camel to search in its own packages for your routes which could cause 
problems.</p></div></div><div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Will ignore already 
instantiated classes</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>The &lt;package&gt; and 
&lt;packageScan&gt; will skip any classes which has already been created by 
Spring etc. So if you define a route builder as a spring bean tag then that 
class will be skipped. You can include those beans using <code>&lt;routeBuilder 
 ref="theBeanId"/&gt;</code> or the <code>&lt;contextScan&gt;</code> 
feature.</p></div></div><h4 id="Spring-Using&lt;packageScan&gt;">Using 
&lt;packageScan&gt;</h4><p>In Camel 2.0 this has been extended to allow 
selective inclusion and exclusion of discovered route classes using Ant like 
path matching. In spring this is specified by adding a &lt;packageScan/&gt; 
tag. The tag must contain one or more 'package' elements (similar to 1.x), and 
optionally one or more 'includes' or 'excludes' elements specifying patterns to 
be applied to the fully qualified names of the discovered classes. e.g.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><div class="confluence-information-macro 
confluence-information-macro-warning"><span class="aui-icon aui-icon-small 
aui-iconfont-error confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Use caution when specifying the 
package name as <strong><code>org.apache.camel</code></strong> or a sub package 
of this. This causes Camel to search in its own packages for your routes which 
could cause problems.</p></div></div><div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Will ignore already 
instantiated classes</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>The&#160;<strong><code>&lt;package&gt;</code></strong>
 and&#160;<strong><code>&lt;packageScan&gt;</code></strong> will skip any 
classes which has already been created by Spring etc. So if you define a route 
builder as a spring bean tag the
 n that class will be skipped. You can include those beans using 
<strong><code>&lt;routeBuilder ref="theBeanId"/&gt;</code></strong> or the 
<strong><code>&lt;contextScan&gt;</code></strong> feature.</p></div></div><h4 
id="Spring-Using&lt;packageScan&gt;">Using&#160;<code>&lt;packageScan&gt;</code></h4><p>In
 Camel 2.0 this has been extended to allow selective inclusion and exclusion of 
discovered route classes using Ant like path matching. In spring this is 
specified by adding a&#160;<strong><code>&lt;packageScan/&gt;</code></strong> 
tag. The tag must contain one or 
more&#160;<strong><code>package</code></strong> elements (similar to 
<strong><code>1.x</code></strong>), and optionally one or 
more&#160;<strong><code>includes</code></strong> 
or&#160;<strong><code>excludes</code></strong> elements specifying patterns to 
be applied to the fully qualified names of the discovered classes. 
e.g.,</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl
 ">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;camelContext 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;packageScan&gt;
       &lt;package&gt;org.example.routes&lt;/package&gt;
@@ -144,12 +144,12 @@
     &lt;/packageScan&gt;
   &lt;/camelContext&gt;
 ]]></script>
-</div></div><p>Exclude patterns are applied before the include patterns. If no 
include or exclude patterns are defined then all the Route classes discovered 
in the packages will be returned.</p><p>In the above example, camel will scan 
all the 'org.example.routes' package and any subpackages for RouteBuilder 
classes. Say the scan finds two RouteBuilders, one in org.example.routes called 
'MyRoute" and another 'MyExcludedRoute' in a subpackage 'excluded'. The fully 
qualified names of each of the classes are extracted 
(org.example.routes.MyRoute, org.example.routes.excluded.MyExcludedRoute) and 
the include and exclude patterns are applied.</p><p>The exclude pattern 
**.*Excluded* is going to match the fqcn 
'org.example.routes.excluded.MyExcludedRoute' and veto camel from initializing 
it.</p><p>Under the covers, this is using Spring's <a shape="rect" 
class="external-link" 
href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/util/AntPathMatcher.html";
 rel="nofol
 low">AntPatternMatcher</a> implementation, which matches as follows</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>Exclude patterns are applied before the include patterns. If no 
include or exclude patterns are defined then all the Route classes discovered 
in the packages will be returned.</p><p>In the above example, camel will scan 
all the&#160;<strong><code>org.example.routes</code></strong> package and any 
subpackages for&#160;<strong><code>RouteBuilder</code></strong> classes. Say 
the scan finds two <strong><code>RouteBuilders</code></strong>, one 
in&#160;<strong><code>org.example.routes</code></strong> 
called&#160;<strong><code>MyRoute</code></strong> and 
another&#160;<strong><code>MyExcludedRoute</code></strong> in a subpackage 
<strong><code>excluded</code></strong>. The fully qualified names of each of 
the classes are extracted 
(<strong><code>org.example.routes.MyRoute</code></strong>,&#160;<strong><code>org.example.routes.excluded.MyExcludedRoute</code></strong>
 ) and the include and exclude patterns are applied.</p><p>The exclude 
pattern&#160;<strong><code>**.*Excluded*</
 code></strong> is going to match the FQCN 
<strong><code>org.example.routes.excluded.MyExcludedRoute</code></strong> and 
veto camel from initializing it.</p><p>Under the covers, this is using Spring's 
<a shape="rect" class="external-link" 
href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/util/AntPathMatcher.html";
 rel="nofollow">AntPatternMatcher</a> implementation, which matches as 
follows</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[? matches one character
 * matches zero or more characters
 ** matches zero or more segments of a fully qualified name
 ]]></script>
-</div></div><p>For example:</p><p>**.*Excluded* would match 
org.simple.Excluded, org.apache.camel.SomeExcludedRoute or 
org.example.RouteWhichIsExcluded</p><p>**.??cluded* would match 
org.simple.IncludedRoute, org.simple.Excluded but not match 
org.simple.PrecludedRoute</p><h4 id="Spring-UsingcontextScan">Using 
contextScan</h4><p><strong>Available as of Camel 2.4</strong></p><p>You can 
allow Camel to scan the container context, e.g. the Spring 
<code>ApplicationContext</code> for route builder instances. This allow you to 
use the Spring <code>&lt;component-scan&gt;</code> feature and have Camel 
pickup any RouteBuilder instances which was created by Spring in its scan 
process.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><p>For example:</p><p><strong><code>**.*Excluded*</code></strong> 
would match 
<strong><code>org.simple.Excluded</code></strong>,&#160;<strong><code>org.apache.camel.SomeExcludedRoute</code></strong>
 or 
<strong><code>org.example.RouteWhichIsExcluded</code></strong>.</p><p><strong><code>**.??cluded*</code></strong>
 would match 
<strong><code>org.simple.IncludedRoute</code></strong>,&#160;<strong><code>org.simple.Excluded</code></strong>
 but <em>not</em> match 
<strong><code>org.simple.PrecludedRoute</code></strong>.</p><h4 
id="Spring-UsingcontextScan">Using&#160;<code>contextScan</code></h4><p><strong>Available
 as of Camel 2.4</strong></p><p>You can allow Camel to scan the container 
context, e.g. the Spring <strong><code>ApplicationContext</code></strong> for 
route builder instances. This allow you to use the Spring 
<strong><code>&lt;component-scan&gt;</code></strong> feature and have Camel 
pickup any&#160;<strong><code>RouteBuilder</code></strong> instances which was 
create
 d by Spring in its scan process.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;!-- enable Spring @Component scan --&gt;
 &lt;context:component-scan 
base-package=&quot;org.apache.camel.spring.issues.contextscan&quot;/&gt;
@@ -159,28 +159,18 @@
     &lt;contextScan/&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>This allows you to just annotate your routes using the Spring 
<code>@Component</code> and have those routes included by Camel<div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>This allows you to just annotate your routes using the Spring 
<strong><code>@Component</code></strong> and have those routes included by 
Camel:<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[@Component
 public class MyRoute extends SpringRouteBuilder {
 
     @Override
     public void configure() throws Exception {
-        from(&quot;direct:start&quot;).to(&quot;mock:result&quot;);
+        from(&quot;direct:start&quot;)
+          .to(&quot;mock:result&quot;);
     }
 }
 ]]></script>
-</div></div><p>You can also use the ANT style for inclusion and exclusion, as 
mentioned above in the <code>&lt;packageScan&gt;</code> 
documentation.</p><p></p><h2 
id="Spring-HowdoIimportroutesfromotherXMLfiles">How do I import routes from 
other XML files</h2>
-<p><strong>Available as of Camel 2.3</strong></p>
-
-<p>When defining routes in Camel using <a shape="rect" 
href="xml-configuration.html">Xml Configuration</a> you may want to define some 
routes in other XML files. For example you may have many routes and it may help 
to maintain the application if some of the routes are in separate XML files. 
You may also want to store common and reusable routes in other XML files, which 
you can simply import when needed.</p>
-
-<p>In <strong>Camel 2.3</strong> it is now possible to define routes outside 
<code>&lt;camelContext/&gt;</code> which you do in a new 
<code>&lt;routeContext/&gt;</code> tag.</p>
-
-<div class="confluence-information-macro 
confluence-information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
-<p><strong>Notice:</strong> When you use &lt;routeContext&gt; then they are 
separated, and cannot reuse existing &lt;onException&gt;, &lt;intercept&gt;, 
&lt;dataFormats&gt; and similar cross cutting functionality defined in the 
&lt;camelContext&gt;. In other words the &lt;routeContext&gt; is currently 
isolated. This may change in Camel 3.x.</p></div></div>
-
-<p>For example we could have a file named <code>myCoolRoutes.xml</code> which 
contains a couple of routes as shown:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 
1px;"><b>myCoolRoutes.xml</b></div><div class="codeContent panelContent pdl">
+</div></div><p>You can also use the ANT style for inclusion and exclusion, as 
mentioned above in the <strong><code>&lt;packageScan&gt;</code></strong> 
documentation.</p><p></p><h2 
id="Spring-HowdoIimportroutesfromotherXMLfiles">How do I import routes from 
other XML files</h2><p><strong>Available as of Camel 2.3</strong></p><p>When 
defining routes in Camel using <a shape="rect" 
href="xml-configuration.html">Xml Configuration</a> you may want to define some 
routes in other XML files. For example you may have many routes and it may help 
to maintain the application if some of the routes are in separate XML files. 
You may also want to store common and reusable routes in other XML files, which 
you can simply import when needed.</p><p>In <strong>Camel 2.3</strong> it is 
now possible to define routes outside 
<strong><code>&lt;camelContext/&gt;</code></strong> which you do in a new 
<strong><code>&lt;routeContext/&gt;</code></strong> tag.</p><div 
class="confluence-information-macro confluence
 -information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p><strong>Notice:</strong> When you 
use&#160;<strong><code>&lt;routeContext&gt;</code></strong> then they are 
separated, and cannot reuse existing 
<strong><code>&lt;onException&gt;</code></strong>, 
<strong><code>&lt;intercept&gt;</code></strong>,&#160;<strong><code>&lt;dataFormats&gt;</code></strong>
 and similar cross cutting functionality defined in the 
<strong><code>&lt;camelContext&gt;</code></strong>. In other words 
the&#160;<strong><code>&lt;routeContext&gt;</code></strong> is currently 
isolated. This may change in Camel 3.x.</p></div></div><p>For example we could 
have a file named <strong><code>myCoolRoutes.xml</code></strong> which contains 
a couple of routes as shown:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>
 myCoolRoutes.xml</b></div><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
@@ -205,12 +195,7 @@ public class MyRoute extends SpringRoute
 
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-
-<p>Then in your XML file which contains the CamelContext you can use Spring to 
import the <code>myCoolRoute.xml</code> file.<br clear="none">
-And then inside <code>&lt;camelContext/&gt;</code> you can refer to the 
<code>&lt;routeContext/&gt;</code> by its id as shown below:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div>Then in your XML file which contains the CamelContext you can use 
Spring to import the <strong><code>myCoolRoute.xml</code></strong> file. And 
then inside <strong><code>&lt;camelContext/&gt;</code></strong> you can refer 
to the <strong><code>&lt;routeContext/&gt;</code></strong> by 
its&#160;<strong><code>id</code></strong> as shown below:<div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;!-- import the routes from another XML file --&gt;
 &lt;import resource=&quot;myCoolRoutes.xml&quot;/&gt;
@@ -227,15 +212,7 @@ And then inside <code>&lt;camelContext/&
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<p>Also notice that you can mix and match, having routes inside CamelContext 
and also externalized in RouteContext.</p>
-
-<p>You can have as many <code>&lt;routeContextRef/&gt;</code> as you like.</p>
-
-<div class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Reusable routes</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
-<p>The routes defined in <code>&lt;routeContext/&gt;</code> can be reused by 
multiple <code>&lt;camelContext/&gt;</code>. However its only the definition 
which is reused. At runtime each CamelContext will create its own instance of 
the route based on the definition.</p></div></div>
-<h4 id="Spring-Testtimeexclusion.">Test time exclusion.</h4><p>At test time it 
is often desirable to be able to selectively exclude matching routes from being 
initalized that are not applicable or useful to the test scenario. For instance 
you might a spring context file routes-context.xml and three Route builders 
RouteA, RouteB and RouteC in the 'org.example.routes' package. The packageScan 
definition would discover all three of these routes and initialize 
them.</p><p>Say RouteC is not applicable to our test scenario and generates a 
lot of noise during test. It would be nice to be able to exclude this route 
from this specific test. The SpringTestSupport class has been modified to allow 
this. It provides two methods (excludedRoute and excludedRoutes) that may be 
overridden to exclude a single class or an array of classes.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div>Also notice that you can mix and match, having routes 
inside&#160;<strong><code>CamelContext</code></strong> and also externalized in 
<strong><code>RouteContext</code></strong>.<p>You can have as many 
<strong><code>&lt;routeContextRef/&gt;</code></strong> as you like.</p><div 
class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Reusable routes</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>The routes defined in 
<strong><code>&lt;routeContext/&gt;</code></strong> can be reused by multiple 
<strong><code>&lt;camelContext/&gt;</code></strong>. However its only the 
definition which is reused. At runtime 
each&#160;<strong><code>CamelContext</code></strong> will create its own 
instance of the route based on the definition.</p></div></div><h4 
id="Spring-TestTimeExclusion.">Test Time Exclusion.</h4><p>At test time it is 
often desirable to be 
 able to selectively exclude matching routes from being initialized that are 
not applicable or useful to the test scenario. For instance you might a spring 
context file&#160;<strong><code>routes-context.xml</code></strong> and three 
Route builders <strong><code>RouteA</code>,&#160;</strong><code>RouteB</code> 
and&#160;<strong><code>RouteC</code></strong> in 
the&#160;<strong><code>org.example.routes</code></strong> package. 
The&#160;<strong><code>packageScan</code></strong> definition would discover 
all three of these routes and initialize 
them.</p><p>Say&#160;<strong><code>RouteC</code></strong> is not applicable to 
our test scenario and generates a lot of noise during test. It would be nice to 
be able to exclude this route from this specific test. 
The&#160;<strong><code>SpringTestSupport</code></strong> class has been 
modified to allow this. It provides two methods 
(<strong><code>excludedRoute</code></strong> and 
<strong><code>excludedRoutes</code></strong>) that may be overridden t
 o exclude a single class or an array of classes.</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[public class RouteAandRouteBOnlyTest extends 
SpringTestSupport {
     @Override      
     protected Class excludeRoute() {
@@ -243,13 +220,13 @@ And then inside <code>&lt;camelContext/&
     }
 }
 ]]></script>
-</div></div><p>In order to hook into the camelContext initialization by spring 
to exclude the MyExcludedRouteBuilder.class we need to intercept the spring 
context creation. When overriding createApplicationContext to create the spring 
context, we call the getRouteExcludingApplicationContext() method to provide a 
special parent spring context that takes care of the exclusion.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>In order to hook into 
the&#160;<strong><code>camelContext</code></strong> initialization by spring to 
exclude the&#160;<strong><code>MyExcludedRouteBuilder.class</code></strong> we 
need to intercept the spring context creation. When 
overriding&#160;<strong><code>createApplicationContext</code></strong> to 
create the spring context, we call 
the&#160;<strong><code>getRouteExcludingApplicationContext()</code></strong> 
method to provide a special parent spring context that takes care of the 
exclusion.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[@Override
 protected AbstractXmlApplicationContext createApplicationContext() {
     return new ClassPathXmlApplicationContext(new String[] 
{&quot;routes-context.xml&quot;}, getRouteExcludingApplicationContext());
 }
 ]]></script>
-</div></div><p>RouteC will now be excluded from initialization. Similarly, in 
another test that is testing only RouteC, we could exclude RouteB and RouteA by 
overriding</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><p><strong><code>RouteC</code></strong> will now be excluded from 
initialization. Similarly, in another test that is testing only 
<strong><code>RouteC</code></strong>, we could 
exclude&#160;<strong><code>RouteB</code></strong> 
and&#160;<strong><code>RouteA</code></strong> by overriding:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[@Override
 protected Class[] excludeRoutes() {
     return new Class[]{RouteA.class, RouteB.class};
@@ -278,7 +255,7 @@ protected Class[] excludeRoutes() {
   &lt;/property&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>Which allows you to configure a component using some name 
(activemq in the above example), then you can refer to the component using 
<strong>activemq:[queue:|topic:]destinationName</strong>. This works by the 
SpringCamelContext lazily fetching components from the spring context for the 
scheme name you use for <a shape="rect" href="endpoint.html">Endpoint</a> <a 
shape="rect" href="uris.html">URIs</a>.<p>For more detail see <a shape="rect" 
href="how-do-i-configure-endpoints.html">Configuring Endpoints and 
Components</a>.</p><h2 id="Spring-SpringCacheidempotentrepository">Spring Cache 
idempotent repository</h2><p>Available as of <strong>Camel 
2.17.1</strong></p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div>Which allows you to configure a component using some name 
(<strong><code>activemq</code></strong> in the above example), then you can 
refer to the component using 
<strong><code>activemq:[queue:|topic:]destinationName</code></strong>. This 
works by the&#160;<strong><code>SpringCamelContext</code></strong> lazily 
fetching components from the spring context for the scheme name you use for <a 
shape="rect" href="endpoint.html">Endpoint</a> <a shape="rect" 
href="uris.html">URIs</a>.<p>For more detail see <a shape="rect" 
href="how-do-i-configure-endpoints.html">Configuring Endpoints and 
Components</a>.</p><h2 id="Spring-SpringCacheIdempotentRepository">Spring Cache 
Idempotent Repository</h2><p>Available as of <strong>Camel 
2.17.1</strong></p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;repo&quot; 
class=&quot;org.apache.camel.spring.processor.idempotent.SpringCacheIdempotentRepository&quot;&gt;
     &lt;constructor-arg&gt;
        &lt;bean 
class=&quot;org.springframework.cache.guava.GuavaCacheManager&quot;/&gt;
@@ -296,7 +273,7 @@ protected Class[] excludeRoutes() {
         &lt;/idempotentConsumer&gt;
     &lt;/route&gt;
 &lt;/camelContext&gt;]]></script>
-</div></div><p>&#160;</p><p>&#160;</p><h3 
id="Spring-CamelContextAware">CamelContextAware</h3><p>If you want to be 
injected with the <a shape="rect" href="camelcontext.html">CamelContext</a> in 
your POJO just implement the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContextAware.html";>CamelContextAware
 interface</a>; then when Spring creates your POJO the CamelContext will be 
injected into your POJO. Also see the <a shape="rect" 
href="bean-integration.html">Bean Integration</a> for further 
injections.</p><h2 id="Spring-IntegrationTesting">Integration Testing</h2><p>To 
avoid a hung route when testing using Spring Transactions see the note about 
Spring Integration Testing under&#160;<a shape="rect" 
href="transactional-client.html">Transactional Client</a>.</p><h3 
id="Spring-Seealso">See also</h3><ul><li><a shape="rect" 
href="tutorial-jmsremoting.html">Spring JMS Tutorial</a></li><li><a 
shape="rect" href="cr
 eating-a-new-spring-based-camel-route.html">Creating a new Spring based Camel 
Route</a></li><li><a shape="rect" href="spring-example.html">Spring 
example</a></li><li><a shape="rect" href="xml-reference.html">Xml 
Reference</a></li><li><a shape="rect" 
href="advanced-configuration-of-camelcontext-using-spring.html">Advanced 
configuration of CamelContext using Spring</a></li><li><a shape="rect" 
href="how-do-i-import-routes-from-other-xml-files.html">How do I import routes 
from other XML files</a></li></ul></div>
+</div></div><p>&#160;</p><p>&#160;</p><h3 
id="Spring-CamelContextAware">CamelContextAware</h3><p>If you want to be 
injected with the <a shape="rect" href="camelcontext.html">CamelContext</a> in 
your POJO just implement the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContextAware.html";>CamelContextAware
 interface</a>; then when Spring creates your POJO 
the&#160;<strong><code>CamelContext</code></strong> will be injected into your 
POJO. Also see the <a shape="rect" href="bean-integration.html">Bean 
Integration</a> for further injections.</p><h2 
id="Spring-IntegrationTesting">Integration Testing</h2><p>To avoid a hung route 
when testing using Spring Transactions see the note about Spring Integration 
Testing under&#160;<a shape="rect" 
href="transactional-client.html">Transactional Client</a>.</p><h3 
id="Spring-Seealso">See also</h3><ul><li><a shape="rect" 
href="tutorial-jmsremoting.html">Spring JMS Tutorial</
 a></li><li><a shape="rect" 
href="creating-a-new-spring-based-camel-route.html">Creating a new Spring based 
Camel Route</a></li><li><a shape="rect" href="spring-example.html">Spring 
example</a></li><li><a shape="rect" href="xml-reference.html">Xml 
Reference</a></li><li><a shape="rect" 
href="advanced-configuration-of-camelcontext-using-spring.html">Advanced 
configuration of CamelContext using Spring</a></li><li><a shape="rect" 
href="how-do-i-import-routes-from-other-xml-files.html">How Do I Import Routes 
From Other XML Files</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">


Reply via email to