java如何验证EHCache的多播自动发现缓存复制是否正常工作?
我已经设置了EHCache,并提供了关于如何设置多播的建议:
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446"/>
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="port=40001, socketTimeoutMillis=2000"/>
然后我在两台机器上启动我的应用程序。我如何才能看到它们是否相互发现并使彼此的缓存失效
干杯
尼克
# 1 楼答案
似乎仅仅启用它并不会使缓存分布。对于每个缓存,添加如下内容:
然后它开始滴答作响
# 2 楼答案
您是否尝试过查看EhCache生成的日志记录?这似乎是一个好的开始