을 종료하지 나는 단순한 하나 개의 클래스 테스트 ehache 2.8.1으로 Ehcache - VM
모든 것이 하나 diskPersistent = "true"또는 overflowToDisk = "true"를 다음 VM은 결코 종료하지 그러나 설정하면 괜찮로드 할 수 있습니다.
종료 훅을 설정하려고했지만 Ehcache에서 사용하는 스레드가 데몬이 아니므로 VM이 절대로 그렇게하지 못합니다.
<ehcache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
<diskStore path="/temp"/>
<defaultCache
maxElementsInMemory="100"
eternal="false"
overflowToDisk="false"
/>
<cache
name="resolveIpAddresses"
maxElementsInMemory="100000"
diskPersistent="true"
overflowToDisk="true"
eternal="false"
timeToLiveSeconds="3600"
/>
</ehcache>
으로 Ehcache
은 크지 분명히 잘하지만 거짓 작품 디스크 설정을 변경 콩<cache:annotation-driven />
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehcache"/>
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="/ehcache.xml" p:shared="true"/>
와 스프링 3.1.8 컨테이너에 의해 관리되고 있습니다. ehcache에게 디스크 쓰레드가 데몬인지 어떻게 알 수 있습니까?
관련 답변은 http://stackoverflow.com/questions/2373431/ehcache-disk-store-unclean-shutdown에서 사용할 수 있습니다. –