2016-05-18 12 views
0

Springで下記のキャッシュ定義を仮定すると、別のehcache.xmlファイルまたは同じxmlファイルでbootstrapCacheLoaderFactoryとcacheEventListenerFactoryを設定できますか? ehcache.xmlのキャッシュ定義にキャッシュを設定すると、現在のxmlファイルまたはehcache.xmlにあるキャッシュ定義が適用されますか?Springで定義されたEHCache Beanの変更

ここで、CacheManagerのcacheManagerPeerProviderFactoryおよびcacheManagerPeerListenerFactoryを設定できますか?

<bean id="reportCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> 
     <property name="cacheManager" ref="cacheManager"/> 
     <property name="maxElementsInMemory" value="${cache.report.maxMemoryElements}"/> 
     </bean> 

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> 
    <property name="configLocation" value="WEB-INF/ehcache.xml"/> 

    </bean> 

ehcache.xmlの下のタグは機能しますか?

<cache name="reporteCache"> 
    <bootstrapCacheLoaderFactory class = "net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" properties = "bootstrapAsynchronously=false, maximumChunkSizeBytes=5000000"/> 

      <cacheEventListenerFactory class = "net.sf.ehcache.distribution.RMICacheReplicatorFactory" properties="replicateAsynchronously=true, asynchronousReplicationIntervalMillis=100"/> 

     </cache> 

xmlコードとjavaコードの両方が問題ありません。

ありがとうございます。

答えて

0

他の誰かがこれを読んでいますか? ehcache.xmlファイルのcacheManagerPeerListenerFactoryを次のように設定できます。

<cacheManagerPeerProviderFactory 
     class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory" 
     properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.2, 
       multicastGroupPort=4455, timeToLive=1"/> 
<cacheManagerPeerListenerFactory 
     class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" 
     properties="host=hostname,port=40001, socketTimeoutMillis=2000"/> 
関連する問題