Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The real problem is that Ehcache's documentation isn't right -- not even close -- to how it is really implemented. Through logging and looking through the code in the jmsreplication module, I was able to get it working.</p> <pre><code> &lt;cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.jms.JMSCacheManagerPeerProviderFactory" properties="initialContextFactoryName=com.InitialContextFactory; userName=uname;password=passwd; replicationTopicConnectionFactoryBindingName=TCF; replicationTopicBindingName=CACHE; providerURL=tcp://server1:7222,tcp://server2:7222; getQueueConnectionFactoryBindingName=QCF; getQueueBindingName=CACHE_LOAD " propertySeparator=";" /&gt; </code></pre> <p>Another thing that tripped me up was simple, once I realized it -- you have to implement your own key generator to ensure that Ehcache saves the objects with the same keys on each JVM. That makes perfect sense, when you think about it.</p> <p>Yes, you have to put in the loader queue information into the cacheManagerPeerProviderFactory. That is because, if you start up a process after one has been running, the new process can pre-load the cache from the existing process.</p> <p>You configure the loader requester (cacheLoaderFactory) with the exact same settings:</p> <pre><code> &lt;cacheLoaderFactory class="net.sf.ehcache.distribution.jms.JMSCacheLoaderFactory" properties="initialContextFactoryName=com.InitialContextFactory; userName=uname;password=passwd; replicationTopicConnectionFactoryBindingName=TCF; replicationTopicBindingName=CACHE; providerURL=tcp://server1:7222,tcp://server2:7222; getQueueConnectionFactoryBindingName=QCF; getQueueBindingName=CACHE_LOAD " propertySeparator=";" /&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload