Java 使用ehcache单播的RMI复制无法工作
以下是我在10.0.110.134计算机上的ehcache配置xml:Java 使用ehcache单播的RMI复制无法工作,java,spring,replication,rmi,ehcache,Java,Spring,Replication,Rmi,Ehcache,以下是我在10.0.110.134计算机上的ehcache配置xml: <cache name="sessionIds" maxElementsInMemory="5000" eternal="false" overflowToDisk="false" timeToIdleSeconds="0" timeToLiveSeconds="0" memoryStoreEvictionPolicy="LRU"> <bootstra
<cache name="sessionIds" maxElementsInMemory="5000" eternal="false"
overflowToDisk="false" timeToIdleSeconds="0" timeToLiveSeconds="0"
memoryStoreEvictionPolicy="LRU">
<bootstrapCacheLoaderFactory
class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
</cache>
<!-- Cluster Configuration -->
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=manual,
rmiUrls=//10.0.110.133:40001/sessionIds"/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=10.0.110.134, port=40001,
socketTimeoutMillis=20000"/>
虽然这对于OP来说可能已经太晚了,但缓存本身需要向RMReplicatorCacheFactory注册,例如
<cache name="sessionIds" maxElementsInMemory="5000" eternal="false"
overflowToDisk="false" timeToIdleSeconds="0" timeToLiveSeconds="0"
memoryStoreEvictionPolicy="LRU">
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
...
</cache>
...
您有没有找到解决此问题的方法?我面临同样的问题,根据下面的回复,仍然不起作用。任何帮助都将不胜感激。谢谢
<cache name="sessionIds" maxElementsInMemory="5000" eternal="false"
overflowToDisk="false" timeToIdleSeconds="0" timeToLiveSeconds="0"
memoryStoreEvictionPolicy="LRU">
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
...
</cache>