Modified:
websites/production/camel/content/how-to-avoid-importing-bunch-of-cxf-packages-when-start-up-the-camel-cxf-endpoint-from-osgi-platform-.html
==============================================================================
---
websites/production/camel/content/how-to-avoid-importing-bunch-of-cxf-packages-when-start-up-the-camel-cxf-endpoint-from-osgi-platform-.html
(original)
+++
websites/production/camel/content/how-to-avoid-importing-bunch-of-cxf-packages-when-start-up-the-camel-cxf-endpoint-from-osgi-platform-.html
Tue Sep 22 14:26:24 2015
@@ -92,46 +92,46 @@ This is the code snippet to show to crea
<p><strong>NOTE</strong>, if you have other CXF configuration which want to be
load, you need to make sure the thread context class loader can load it. </p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(
BusFactory.class.getClassLoader());
SpringBusFactory springBusFactory = new SpringBusFactory();
Bus bus = springBusFactory.createBus(new String[]
- { "META-INF/cxf/cxf.xml", "META-INF/cxf/cxf-extension-soap.xml",
- "META-INF/cxf/cxf-extension-http-jetty.xml" }, false);
+ { "META-INF/cxf/cxf.xml",
"META-INF/cxf/cxf-extension-soap.xml",
+ "META-INF/cxf/cxf-extension-http-jetty.xml" },
false);
// The last parameter is telling CXF not to load the
cxf-extension-*.xml from META-INF/cxf
// You can set the bus the normal CXF endpoint or other camel-cxf
endpoint
} finally {
Thread.currentThread().setContextClassLoader(oldCL);
}
-</pre>
+]]></script>
</div></div>
<p>From Camel 2.2.0, we introduced a SpringBusFactoryBean which leverage the
BusApplicationContext will use the BusApplicationContext.class classloader as a
fall back classloader, so you can configure the SpringBusFactoryBean and set
the bus directly into the camel-cxf endpoint without using any java code. The
Spring configuration snippet is below:<br clear="none">
<strong>NOTE</strong><br clear="none">
If you are using URI to specify the camel-cxf endpoint , you can set the URI
with bus option like this "cxf://ADDRESS?bus=myBus&...".</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cxf="http://camel.apache.org/schema/cxf"
- xsi:schemaLocation="
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://camel.apache.org/schema/cxf"
+ xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
- ">
+ ">
- <bean id="myBus"
class="org.apache.camel.component.cxf.spring.SpringBusFactoryBean">
- <property name="cfgFiles"
value="META-INF/cxf/cxf.xml;META-INF/cxf/cxf-extension-soap.xml;META-INF/cxf/cxf-extension-http-jetty.xml"
/>
- <property name="includeDefaultBus" value="false" />
+ <bean id="myBus"
class="org.apache.camel.component.cxf.spring.SpringBusFactoryBean">
+ <property name="cfgFiles"
value="META-INF/cxf/cxf.xml;META-INF/cxf/cxf-extension-soap.xml;META-INF/cxf/cxf-extension-http-jetty.xml"
/>
+ <property name="includeDefaultBus" value="false"
/>
</bean>
- <cxf:cxfEndpoint id="routerEndpoint"
address="http://localhost:9000/router"
- serviceClass="org.apache.camel.component.cxf.HelloService" bus="myBus"/>
+ <cxf:cxfEndpoint id="routerEndpoint"
address="http://localhost:9000/router"
+ serviceClass="org.apache.camel.component.cxf.HelloService"
bus="myBus"/>
</beans>
-</pre>
+]]></script>
</div></div>
@@ -141,7 +141,7 @@ If you are using URI to specify the came
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -149,7 +149,7 @@ If you are using URI to specify the came
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>
Modified:
websites/production/camel/content/how-to-send-the-same-message-to-multiple-endpoints.html
==============================================================================
---
websites/production/camel/content/how-to-send-the-same-message-to-multiple-endpoints.html
(original)
+++
websites/production/camel/content/how-to-send-the-same-message-to-multiple-endpoints.html
Tue Sep 22 14:26:24 2015
@@ -90,17 +90,17 @@
<p>In the sample below we consume messages from the activemq queue
<code>foo</code> and want to send the <strong>same message</strong> to both
<code>seda:foo</code> and <code>seda:bar</code>. Sending the same message
requires that we use <a shape="rect" href="multicast.html">Multicast</a>. This
is done by adding the <code>multicast()</code> before the to type:</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
-from("activemq:queue:foo").multicast().to("seda:foo", "seda:bar");
-</pre>
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+from("activemq:queue:foo").multicast().to("seda:foo",
"seda:bar");
+]]></script>
</div></div>
<div class="confluence-information-macro confluence-information-macro-tip"><p
class="title">Pipeline is default in Camel</p><span class="aui-icon
aui-icon-small aui-iconfont-approve
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body">
<p>If you have a route such as:</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
-from("activemq:queue:foo").to("seda:foo", "seda:bar");
-</pre>
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+from("activemq:queue:foo").to("seda:foo",
"seda:bar");
+]]></script>
</div></div>
<p>It is default a <a shape="rect" href="pipes-and-filters.html">pipeline</a>
in Camel (that is the opposite to <a shape="rect"
href="multicast.html">Multicast</a>). In the above example using pipes and
filters then the result from seda:foo is sent to seda:bar, ie. its not the
<strong>same</strong> message sent to multiple destinations, but a sent through
a chain (the pipes and the filters).</p></div></div></div>
</td>
@@ -108,7 +108,7 @@ from("activemq:queue:foo").to("seda:foo"
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -116,7 +116,7 @@ from("activemq:queue:foo").to("seda:foo"
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>
Modified: websites/production/camel/content/infinispan.html
==============================================================================
--- websites/production/camel/content/infinispan.html (original)
+++ websites/production/camel/content/infinispan.html Tue Sep 22 14:26:24 2015
@@ -86,41 +86,41 @@
<tr>
<td valign="top" width="100%">
<div class="wiki-content maincontent"><h2
id="Infinispan-InfinispanComponent">Infinispan
Component</h2><p><strong>Available as of Camel 2.13.0</strong></p><p>This
component allows you to interact with <a shape="rect" class="external-link"
href="http://infinispan.org/" rel="nofollow">Infinispan</a> distributed data
grid / cache. Infinispan is an extremely scalable, highly available key/value
data store and data grid platform written in Java.</p><p>Maven users will need
to add the following dependency to their <code>pom.xml</code> for this
component:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><dependency>
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-infinispan</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
-</pre>
+]]></script>
</div></div><h3 id="Infinispan-URIformat">URI format</h3><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">infinispan://hostName?[options]
-</pre>
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[infinispan://hostName?[options]
+]]></script>
</div></div><h3 id="Infinispan-URIOptions">URI Options</h3><p>The producer
allows sending messages to a local infinispan cache configured in the registry,
or to a remote cache using the HotRod protocol.<br clear="none"> The consumer
allows listening for events from local infinispan cache accessible from the
registry.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Context</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>cacheContainer</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>CacheContainer</p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p>Shared</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Reference to a
<code>org.infinispan.manager.CacheContainer</code> in the <a shape="rect"
href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>cacheName</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Shared</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The cache name to use. If not specified, default cache
is used.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>command</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>PUT</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The operation to
perform. Currently supports the following values: PUT, GET, REMOVE,
CLEAR.</p><p><strong>From Camel 2.16:</strong> <span>PUT ALL, PUT IF ABSENT,
<span>REPLACE, SIZE.</span></span></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>eventTypes</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Set<String></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The event types to register. By default will listen for
all event types. Possible values defined in
org.infinispan.notifications.cachelistener.event.Event.Type</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>sync</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p>
</td><td colspan="1" rowspan="1" class="confluenceTd"><p>By default the
consumer will receive notifications synchronosly, by the same thread that
process the cache operation.</p></td></tr></tbody></table></div><h3
id="Infinispan-MessageHeaders">Message Headers</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Context</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>CamelInfinispanCacheName</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Shared</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The cache participating in the operation
or event.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanOperation</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>PUT</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The operation to perform: CamelInfinispanOperationPut,
CamelInfinispanOperationGet, CamelInfinispanOperationRemove,
CamelInfinispanOperationClear.</p><p><strong>From Camel 2.16:</strong>
<span>CamelInfinispanOperationPutAll, CamelInfinispanOperationPutIfAbsent,
<span>CamelInfinispanOperationReplace, CamelInfinispanOperationSize.
</span></span></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanMap</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan
="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>A Map to use in case of
<span>CamelInfinispanOperationPutAll operation</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>CamelInfinispanKey</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Shared</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The key to perform the operation to or the key
generating the event.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanValue</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The value to use for the
operation.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanOperationResult</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The result of the operation.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanEventType</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The type of the received event. Possible values defined
here
org.infinispan.notifications.cachelistener.event.Event.Type</p></td></tr><tr><td
colspan="1"
rowspan="1" class="confluenceTd"><p>CamelInfinispanIsPre</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Boolean</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Consumer</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Infinispan fires two events for each
operation: one before and one after the operation.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanLifespanTime</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>long</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The Lifespan time of a value inside the cache. Negative
values are interpreted as infinity.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>CamelInfinispanTimeUnit</p></td><td
colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The Time Unit of an entry Lifespan
Time.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanMaxIdleTime</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>long</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span>The maximum amount of time an entry is allowed to
be idle for before it is considered as expired.</span></p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p>CamelInfinispanMaxIdleTimeUnit</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confl
uenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The Time Unit of an entry Max Idle
Time.</p></td></tr></tbody></table></div><h3
id="Infinispan-Example">Example</h3><p>Below is an example route that retrieves
a value from the cache for a specific key:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">from("direct:start")
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("direct:start")
.setHeader(InfinispanConstants.OPERATION,
constant(InfinispanConstants.GET))
- .setHeader(InfinispanConstants.KEY, constant("123"))
- .to("infinispan://localhost?cacheContainer=#cacheContainer");
-</pre>
+ .setHeader(InfinispanConstants.KEY, constant("123"))
+ .to("infinispan://localhost?cacheContainer=#cacheContainer");
+]]></script>
</div></div><h3
id="Infinispan-UsingtheInfinispanbasedidempotentrepository">Using the
Infinispan based idempotent repository</h3><p>In this section we will use the
Infinispan based idempotent repository.</p><p>First, we need to create a
cacheManager and then configure
our</p><pre>org.apache.camel.component.infinispan.processor.idempotent.InfinispanIdempotentRepository:</pre><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><bean id="cacheManager"
class="org.infinispan.manager.DefaultCacheManager" init-method="start"
destroy-method="stop"/>
-<bean id="infinispanRepo"
class="org.apache.camel.component.infinispan.processor.idempotent.InfinispanIdempotentRepository"
- factory-method="infinispanIdempotentRepository">
- <argument ref="cacheManager"/>
- <argument value="idempotent"/>
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<bean id="cacheManager"
class="org.infinispan.manager.DefaultCacheManager"
init-method="start" destroy-method="stop"/>
+<bean id="infinispanRepo"
class="org.apache.camel.component.infinispan.processor.idempotent.InfinispanIdempotentRepository"
+ factory-method="infinispanIdempotentRepository">
+ <argument ref="cacheManager"/>
+ <argument value="idempotent"/>
</bean>
-</pre>
+]]></script>
</div></div><p>Then we can create our Infinispan idempotent repository in the
spring XML file as well:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><camelContext
xmlns="http://camel.apache.org/schema/spring">
- <route id="JpaMessageIdRepositoryTest">
- <from uri="direct:start" />
- <idempotentConsumer messageIdRepositoryRef="infinispanStore">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<camelContext
xmlns="http://camel.apache.org/schema/spring">
+ <route id="JpaMessageIdRepositoryTest">
+ <from uri="direct:start" />
+ <idempotentConsumer
messageIdRepositoryRef="infinispanStore">
<header>messageId</header>
- <to uri="mock:result" />
+ <to uri="mock:result" />
</idempotentConsumer>
</route>
</camelContext>
-</pre>
+]]></script>
</div></div><p>For more information, see these resources...</p><p></p><h3
id="Infinispan-SeeAlso">See Also</h3>
<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul></div>
</td>
@@ -128,7 +128,7 @@
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -136,7 +136,7 @@
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>
Modified: websites/production/camel/content/is-camel-an-esb.html
==============================================================================
--- websites/production/camel/content/is-camel-an-esb.html (original)
+++ websites/production/camel/content/is-camel-an-esb.html Tue Sep 22 14:26:24
2015
@@ -87,7 +87,7 @@
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -95,7 +95,7 @@
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>
Modified: websites/production/camel/content/jbi-service-unit-archetype.html
==============================================================================
--- websites/production/camel/content/jbi-service-unit-archetype.html (original)
+++ websites/production/camel/content/jbi-service-unit-archetype.html Tue Sep
22 14:26:24 2015
@@ -91,23 +91,23 @@
<p>Just type the following into a console...</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
mvn archetype:create \
-DarchetypeGroupId=org.apache.camel \
-DarchetypeArtifactId=camel-jbi-service-unit \
-DarchetypeVersion=1.0-SNAPSHOT \
-DgroupId=myGroupId \
-DartifactId=myArtifactId
-</pre>
+]]></script>
</div></div>
<p>This will create a maven project which can be run immediately via the <a
shape="rect" href="camel-maven-plugin.html">Camel Maven Plugin</a> as
follows</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
cd myArtifactId
mvn install
-</pre>
+]]></script>
</div></div>
<p>The configuration file is in
<strong>src/main/resources/camel-context.xml</strong>. </p>
@@ -118,7 +118,7 @@ mvn install
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -126,7 +126,7 @@ mvn install
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>
Modified: websites/production/camel/content/jgroups.html
==============================================================================
--- websites/production/camel/content/jgroups.html (original)
+++ websites/production/camel/content/jgroups.html Tue Sep 22 14:26:24 2015
@@ -86,87 +86,87 @@
<tr>
<td valign="top" width="100%">
<div class="wiki-content maincontent"><h2
id="JGroups-JGroupsComponent">JGroups Component</h2><div
class="confluence-information-macro confluence-information-macro-tip"><p
class="title">Available since Camel 2.10.0</p><span class="aui-icon
aui-icon-small aui-iconfont-approve
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"> </div></div><p><a shape="rect"
class="external-link" href="http://www.jgroups.org" rel="nofollow">JGroups</a>
is a toolkit for reliable multicast communication. The
<strong>jgroups:</strong> component provides exchange of messages between Camel
infrastructure and <a shape="rect" class="external-link"
href="http://jgroups.org" rel="nofollow">JGroups</a> clusters.</p><p>Maven
users will need to add the following dependency to their <code>pom.xml</code>
for this component.</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><dependency>
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<dependency>
<groupId>org.apache-extras.camel-extra</groupId>
<artifactId>camel-jgroups</artifactId>
<!-- use the same version as your Camel core version -->
<version>x.y.z</version>
</dependency>
-</pre>
+]]></script>
</div></div><p>Starting from the Camel <strong>2.13.0</strong>, JGroups
component has been moved from Camel Extra under the umbrella of the Apache
Camel. If you are using Camel <strong>2.13.0</strong> or higher, please use the
following POM entry instead.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><dependency>
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jgroups</artifactId>
<!-- use the same version as your Camel core version -->
-  <version>x.y.z</version>
+ Â <version>x.y.z</version>
</dependency>
-</pre>
+]]></script>
</div></div><h3 id="JGroups-URIformat">URI format</h3><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">jgroups:clusterName[?options]
-</pre>
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[jgroups:clusterName[?options]
+]]></script>
</div></div><p>Where <strong>clusterName</strong> represents the name of the
JGroups cluster the component should connect to.</p><h3
id="JGroups-Options">Options</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>channelProperties</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.0:</strong>
Specifies configuration properties of the <a shape="rect" class="external-link"
href="http://www.jgroups.org/javadoc/org/jgroups/JChannel.html"
rel="nofollow">JChannel </a> used by the endpoint.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>enableViewMessages</code><
/td><td colspan="1" rowspan="1"
class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.13.0</strong>:  Consumer only. If set
to <code>true</code>, the consumer endpoint will receive
<code>org.jgroups.View</code> messages as well (not only
<code>org.jgroups.Message</code> instances). By default only regular messages
are consumed by the endpoint.</td></tr></tbody></table></div><h3
id="JGroups-Headers">Headers</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh">Header</th><th colspan="1" rowspan="1"
class="confluenceTh">Constant</th><th colspan="1" rowspan="1"
class="confluenceTh">Since version</th><th colspan="1" rowspan="1"
class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>JGROUPS_ORIGINAL_MESSAGE</code></td><td colspan="1"
rowspan="1"
class="confluenceTd"><code>JGroupsEndpoint.HEADER_JGROUPS_ORIGINAL_MESSAGE<
/code></td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>2.13.0</strong></td><td colspan="1" rowspan="1"
class="confluenceTd">The original <code>org.jgroups.Message</code> instance
from which the body of the consumed message has been
extracted.</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>JGROUPS_SRC</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code><code>JGroupsEndpoint.</code>HEADER_JGROUPS_SRC</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>2.10.0</strong></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Consume</strong>r: The
<code>org.jgroups.Address</code> instance extracted by
<code>org.jgroups.Message</code>.getSrc() method of the consumed
message.</p><p><strong>Producer</strong>: The custom source
<code>org.jgroups.Address</code> of the message to be
sent.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>JGROUPS_DEST</code></td><td colspan="1" rowspan="1"
class="confl
uenceTd"><code><code>JGroupsEndpoint.</code>HEADER_JGROUPS_DEST</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>2.10.0</strong></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Consumer</strong>: The
<code>org.jgroups.Address</code> instance extracted by
<code>org.jgroups.Message</code>.getDest() method of the consumed
message.</p><p><strong>Producer</strong>: The custom destination
<code>org.jgroups.Address</code> of the message to be
sent.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>JGROUPS_CHANNEL_ADDRESS</code></td><td colspan="1"
rowspan="1"
class="confluenceTd"><code><code>JGroupsEndpoint.</code>HEADER_JGROUPS_CHANNEL_ADDRESS</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>2.13.0</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">Address
(<code>org.jgroups.Address</code>) of the channel associated with the
endpoint.</td></tr></tbody></table></div><p> </p><h3 id="JGroups-Usage">Us
age</h3><p>Using <code>jgroups</code> component on the consumer side of the
route will capture messages received by the <code>JChannel</code> associated
with the endpoint and forward them to the Camel route. JGroups consumer
processes incoming messages <a shape="rect" class="external-link"
href="http://camel.apache.org/asynchronous-routing-engine.html">asynchronously</a>.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">// Capture messages from cluster named
-// 'clusterName' and send them to Camel route.
-from("jgroups:clusterName").to("seda:queue");
-</pre>
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[// Capture messages from cluster named
+// 'clusterName' and send them to Camel route.
+from("jgroups:clusterName").to("seda:queue");
+]]></script>
</div></div><p>Using <code>jgroups</code> component on the producer side of
the route will forward body of the Camel exchanges to the <code>JChannel</code>
instance managed by the endpoint.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">// Send message to the cluster named 'clusterName'
-from("direct:start").to("jgroups:clusterName");
-</pre>
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[// Send message to the cluster named
'clusterName'
+from("direct:start").to("jgroups:clusterName");
+]]></script>
</div></div><h3 id="JGroups-Predefinedfilters">Predefined
filters</h3><p>Starting from version <strong>2.13.0</strong> of Camel, JGroups
component comes with predefined filters factory class named
<code>JGroupsFilters.</code></p><p>If you would like to consume only view
changes notifications sent to coordinator of the cluster (and ignore these sent
to the "slave" nodes), use the
<code>JGroupsFilters.dropNonCoordinatorViews()</code> filter. This filter is
particularly useful when you want a single Camel node to become the master in
the cluster, because messages passing this filter notifies you when given node
has become a coordinator of the cluster. The snippet below demonstrates how to
collect only messages received by the master node.</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">import static
org.apache.camel.component.jgroups.JGroupsFilters.dropNonCoordinatorViews;
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[import static
org.apache.camel.component.jgroups.JGroupsFilters.dropNonCoordinatorViews;
...
-from("jgroups:clusterName?enableViewMessages=true").
+from("jgroups:clusterName?enableViewMessages=true").
filter(dropNonCoordinatorViews()).
- to("seda:masterNodeEventsQueue");
-</pre>
+ to("seda:masterNodeEventsQueue");
+]]></script>
</div></div><h3 id="JGroups-Predefinedexpressions">Predefined
expressions</h3><p>Starting from version <strong>2.13.0</strong> of Camel,
JGroups component comes with predefined expressions factory class named
<code>JGroupsExpressions.</code></p><p>If you would like to create <a
shape="rect" href="delayer.html">delayer</a> that would affect the route only
if the Camel context has not been started yet, use the
<code>JGroupsExpressions.delayIfContextNotStarted(long delay)</code> factory
method. The expression created by this factory method will return given delay
value only if the Camel context is in the state different than
<code>started</code>. This expression is particularly useful if you would like
to use JGroups component for keeping singleton (master) route within the
cluster. <a shape="rect" href="controlbus-component.html">Control Bus</a>
<code>start</code> command won't initialize the singleton route if the Camel
Context hasn't been yet started. So you need to delay a startup
of the master route, to be sure that it has been initialized after the Camel
Context startup. Because such scenario can happen only during the
initialization of the cluster, we don't want to delay startup of the slave node
becoming the new master - that's why we need a conditional delay
expression.</p><p>The snippet below demonstrates how to use conditional
delaying with the JGroups component to delay the initial startup of master node
in the cluster.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">import static java.util.concurrent.TimeUnit.SECONDS;
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[import static
java.util.concurrent.TimeUnit.SECONDS;
import static
org.apache.camel.component.jgroups.JGroupsExpressions.delayIfContextNotStarted;
import static
org.apache.camel.component.jgroups.JGroupsFilters.dropNonCoordinatorViews;
...
-from("jgroups:clusterName?enableViewMessages=true").
+from("jgroups:clusterName?enableViewMessages=true").
filter(dropNonCoordinatorViews()).
- threads().delay(delayIfContextNotStarted(SECONDS.toMillis(5))). // run in
separated and delayed thread. Delay only if the context hasn't been started
already.
-
 to("controlbus:route?routeId=masterRoute&action=start&async=true");
+ threads().delay(delayIfContextNotStarted(SECONDS.toMillis(5))). // run in
separated and delayed thread. Delay only if the context hasn't been started
already.
+ Â
to("controlbus:route?routeId=masterRoute&action=start&async=true");
-from("timer://master?repeatCount=1").routeId("masterRoute").autoStartup(false).to(masterMockUri); </pre>
+from("timer://master?repeatCount=1").routeId("masterRoute").autoStartup(false).to(masterMockUri);Â
]]></script>
</div></div><h3 id="JGroups-Examples">Examples</h3><h4
id="JGroups-Sending(receiving)messagesto(from)theJGroupscluster">Sending
(receiving) messages to (from) the JGroups cluster</h4><p>In order to send
message to the JGroups cluster use producer endpoint, just as demonstrated on
the snippet below.</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">from("direct:start").to("jgroups:myCluster");
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("direct:start").to("jgroups:myCluster");
...
-producerTemplate.sendBody("direct:start", "msg")</pre>
+producerTemplate.sendBody("direct:start",
"msg")]]></script>
</div></div><p>To receive the message from the snippet above (on the same or
the other physical machine) listen on the messages coming from the given
cluster, just as demonstrated on the code fragment below.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">mockEndpoint.setExpectedMessageCount(1);
-mockEndpoint.message(0).body().isEqualTo("msg");
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[mockEndpoint.setExpectedMessageCount(1);
+mockEndpoint.message(0).body().isEqualTo("msg");
...
-from("jgroups:myCluster").to("mock:messagesFromTheCluster");
+from("jgroups:myCluster").to("mock:messagesFromTheCluster");
...
-mockEndpoint.assertIsSatisfied();</pre>
+mockEndpoint.assertIsSatisfied();]]></script>
</div></div><h4 id="JGroups-Receiveclusterviewchangenotifications">Receive
cluster view change notifications</h4><p>The snippet below demonstrates how to
create the consumer endpoint listening to the notifications regarding
cluster membership changes. By default only regular messages are consumed by
the endpoint.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">mockEndpoint.setExpectedMessageCount(1);
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[mockEndpoint.setExpectedMessageCount(1);
mockEndpoint.message(0).body().isInstanceOf(org.jgroups.View.class);
...
-from("jgroups:clusterName?enableViewMessages=true").to(mockEndpoint);
+from("jgroups:clusterName?enableViewMessages=true").to(mockEndpoint);
...
-mockEndpoint.assertIsSatisfied();</pre>
+mockEndpoint.assertIsSatisfied();]]></script>
</div></div><h4 id="JGroups-Keepingsingletonroutewithinthecluster">Keeping
singleton route within the cluster</h4><p>The snippet below demonstrates how to
keep the singleton consumer route in the cluster of Camel Contexts. As soon as
the master node dies, one of the slaves will be elected as a new master and
started. In this particular example we want to keep singleton <a shape="rect"
href="jetty.html">jetty</a> instance listening for the requests on
address<code> <span
class="nolink">http://localhost:8080/orders</span></code>.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">import static java.util.concurrent.TimeUnit.SECONDS;
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[import static
java.util.concurrent.TimeUnit.SECONDS;
import static
org.apache.camel.component.jgroups.JGroupsExpressions.delayIfContextNotStarted;
import static
org.apache.camel.component.jgroups.JGroupsFilters.dropNonCoordinatorViews;
...
-from("jgroups:clusterName?enableViewMessages=true").
+from("jgroups:clusterName?enableViewMessages=true").
filter(dropNonCoordinatorViews()).
- threads().delay(delayIfContextNotStarted(SECONDS.toMillis(5))). // run in
separated and delayed thread. Delay only if the context hasn't been started
already.
-
 to("controlbus:route?routeId=masterRoute&action=start&async=true");
+ threads().delay(delayIfContextNotStarted(SECONDS.toMillis(5))). // run in
separated and delayed thread. Delay only if the context hasn't been started
already.
+ Â
to("controlbus:route?routeId=masterRoute&action=start&async=true");
-from("jetty:http://localhost:8080/orders").routeId("masterRoute").autoStartup(false).to("jms:orders"); </pre>
+from("jetty:http://localhost:8080/orders").routeId("masterRoute").autoStartup(false).to("jms:orders");Â
]]></script>
</div></div></div>
</td>
<td valign="top">
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -174,7 +174,7 @@ from("jetty:http://localhost:8080/orders
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>