我试图启用replecated ehcache和由于某种原因,它似乎并没有工作。复制Ehcache不工作
我ehcache.xml中 -
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd"
updateCheck="true" monitoring="autodetect"
dynamicConfig="true">
<diskStore path="java.io.tmpdir"/>
<transactionManagerLookup class="net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup"
properties="jndiName=java:/TransactionManager" propertySeparator=";"/>
<cacheManagerEventListenerFactory class="com.adobe_services.cache.SampleCacheManagerEventListenerFactory" properties="type=counting"/>
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=1"
propertySeparator=","
/>
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=, port=, socketTimeoutMillis="/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
diskSpoolBufferSizeMB="30"
maxElementsOnDisk="10000000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"
statistics="false"
/>
<cache name="replicatedCache"
maxElementsInMemory="5"
maxElementsOnDisk="100000"
eternal="true"
overflowToDisk="true"
diskPersistent="true"
diskSpoolBufferSizeMB="20"
timeToIdleSeconds="3600"
timeToLiveSeconds="3600"
memoryStoreEvictionPolicy="LFU"
transactionalMode="off">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
<bootstrapCacheLoaderFactory
class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
properties="bootstrapAsynchronously=false, maximumChunkSizeBytes=5000000"
propertySeparator="," />
</cache>
</ehcache>
当我插入一个缓存值,然后提取它在另一个群集实例我不能够得到的对象。我在同一台机器上使用tomcat集群。
不知道什么是错的。
我得到这个错误 - “java.net.SocketException:不是多播地址”,如果我尝试将127.0.0.1设置为多播地址 – Pushkar 2011-06-20 21:43:26