2011-11-09 5 views
0

テラコッタサーバーが利用できないときに、テラコッタサーバー設定からdiskStoreにスワップするために私のアプリを設定する必要があります。これを行う方法はありますか? 私はehcache.xmlにterracottaConfig要素を設定するとき、私は起動することはできませんアプリケーションをTerracottaサーバが到達不能だった場合.... これは私のehcache.xml設定です:Ehcache:TerracottaサーバーがオフラインのときにdiskStoreにスワップする方法は?

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:noNamespaceSchemaLocation="ehcache.xsd" name="gpCacheManager"> 

    <diskStore path="java.io.tmpdir" /> 

    <terracottaConfig rejoin="true"> 
     <tc-config> 
      <servers> 
       <server host="XXX.XXX.XXX.XX" name="host1"> 
       </server> 
      </servers> 
      <clients> 
       <logs>app/logs-%i</logs> 
      </clients> 
      <nonstop immediateTimeout="true" timeoutMillis="3000"> 
       <timeoutBehavior type="localReads" /> 
      </nonstop> 
     </tc-config> 
    </terracottaConfig> 

    <defaultCache maxElementsInMemory="10000" eternal="false" 
     timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="false" 
     diskPersistent="false" diskExpiryThreadIntervalSeconds="120" 
     memoryStoreEvictionPolicy="LRU"> 
     <terracotta clustered="true"> 
      <nonstop immediateTimeout="false" timeoutMillis="3000"> 
       <timeoutBehavior type="localReads" /> 
      </nonstop> 
     </terracotta> 
    </defaultCache> 

    <cache name="oxmCache" maxElementsInMemory="10000" eternal="false" 
     timeToIdleSeconds="240" timeToLiveSeconds="240" overflowToDisk="false" 
     diskPersistent="false" diskExpiryThreadIntervalSeconds="240" 
     memoryStoreEvictionPolicy="LRU"> 
     <terracotta clustered="true"> 
      <nonstop immediateTimeout="false" timeoutMillis="3000"> 
       <timeoutBehavior type="localReads" /> 
      </nonstop> 
     </terracotta> 
    </cache> 

</ehcache> 

ありがとうございました!

答えて

0

私は恐らく、(クライアント上の)ディスクを使用するのは現在サポートされていない機能です。 基本的に私が正しいと思うなら、エントリが利用できないときに、テラコッタサーバーではなく、ディスクにディスクを書き出したいと思っています。

これで、サーバーが復活したときに調整をしたいと思います。私は、ディスク上の(部分的な)データがどのように役立つのかを見て苦労しています...詳細を教えてもらえますか?

+0

本当の問題は、アプリケーションをオフラインで使用できないことです(テラコッタサーバーなし)。利用可能なTerracottaサーバーなしでアプリケーションを起動する方法がある場合、サーバーが利用可能になると、調整用のディスク上の部分データを管理します... – AndyPower

関連する問題