2011-09-15 170 views
3

我試圖將使用RMI從ehcache.xml文件的緩存的創建移動到Spring xml。 創建一個EhCacheFactoryBean不是一個問題,但RMICacheReplicatorFactory定義假設/可以如何實現? 下面是它在ehcache.xml文件中的外觀。ehcache RMI配置爲彈簧

非常感謝, 伊詹

<cache name="MyCache1" 
    maxElementsInMemory="1000" 
    eternal="false" 
    overflowToDisk="true" 
    diskSpoolBufferSizeMB="20" 
    timeToLiveSeconds="3000" 
    timeToIdleSeconds="3000" 
    memoryStoreEvictionPolicy="LFU"> 

    <!-- RMI replication listener --> 
    <cacheEventListenerFactory 
     class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" 
     properties="replicateAsynchronously=true, 
      replicatePuts=true, 
      replicatePutsViaCopy=true, 
      replicateUpdates=true, 
      replicateUpdatesViaCopy=true, 
      replicateRemovals=true" /> 

    <!-- RMI Cache bootstrap --> 
    <bootstrapCacheLoaderFactory 
     class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" 
     properties="bootstrapAsynchronously=true, maximumChunkSizeBytes=5000000" 
     propertySeparator="," /> 
</cache> 
+0

Hows bean的定義是否會輸出錯誤,這個問題太廣泛了。 – ssedano

回答