I have a simple one class test to load ehache 2.8.1
Everything is fine however if setting either diskPersistent="true" or overflowToDisk="true" then the VM never terminates.
I have tried setting the shutdown hook but this isn't fired as the thread used by Ehcache isn't a daemon so the vm never gets that far.
<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>
The ehcache is being managed by a spring 3.1.8 container with the beans
<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"/>
Changing the disk settings to false works fine but obviously not great. How do I tell ehcache that the disk threads are daemon?