You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2016/04/08 17:18:51 UTC
svn commit: r985096 - in /websites/production/camel/content:
cache/main.pageCache infinispan.html
Author: buildbot
Date: Fri Apr 8 15:18:51 2016
New Revision: 985096
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/infinispan.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/infinispan.html
==============================================================================
--- websites/production/camel/content/infinispan.html (original)
+++ websites/production/camel/content/infinispan.html Fri Apr 8 15:18:51 2016
@@ -102,7 +102,7 @@
.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">
+</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 org.apache.camel.component.infinispan.processor.idempotent.InfinispanIdempotentRepository:</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[<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">
@@ -121,7 +121,26 @@
</route>
</camelContext>
]]></script>
-</div></div><p>For more information, see these resources...</p><p></p><h3 id="Infinispan-SeeAlso">See Also</h3>
+</div></div><p> </p><p>If you plan to use a RemoteCacheManager instead of DefaultcacheManager please note that you need to force the cache to return values for Map oeprations:</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[RemoteCacheManager manager = new RemoteCacheManager(
+ new ConfigurationBuilder()
+ .addServers("localhost")
+ .forceReturnValues(true)
+ .build(),
+ true
+);
+
+
+context.addRoutes(new RouteBuilder() {
+ void configure() {
+ from("direct:start")
+ .idempotentConsumer(
+ header("MessageID"),Â
+ new InfinispanIdempotentRepository(manager, "idempotent"))
+ .to("mock:result");
+ }
+});]]></script>
+</div></div><p> </p><p> </p><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>
<td valign="top">