camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r985096 - in /websites/production/camel/content: cache/main.pageCache infinispan.html
Date Fri, 08 Apr 2016 15:18:51 GMT
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&#160;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[&lt;bean
id=&quot;cacheManager&quot; class=&quot;org.infinispan.manager.DefaultCacheManager&quot;
init-method=&quot;start&quot; destroy-method=&quot;stop&quot;/&gt;
 &lt;bean id=&quot;infinispanRepo&quot; class=&quot;org.apache.camel.component.infinispan.processor.idempotent.InfinispanIdempotentRepository&quot;
       factory-method=&quot;infinispanIdempotentRepository&quot;&gt;
@@ -121,7 +121,26 @@
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div><p>For more information, see these resources...</p><p></p><h3
id="Infinispan-SeeAlso">See Also</h3>
+</div></div><p>&#160;</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(&quot;localhost&quot;)
+        .forceReturnValues(true)
+        .build(),
+    true
+);
+
+
+context.addRoutes(new RouteBuilder() {
+    void configure() {
+        from(&quot;direct:start&quot;)
+            .idempotentConsumer(
+                header(&quot;MessageID&quot;), 
+                new InfinispanIdempotentRepository(manager, &quot;idempotent&quot;))
+            .to(&quot;mock:result&quot;);
+    }
+});]]></script>
+</div></div><p>&#160;</p><p>&#160;</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">



Mime
View raw message