• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

I’m trying to set up a cache using the following configuration:

The idea is that the cache does not overflow to disk during runtime but is persisted when the JVM exits. However, with the current version of ehcache my testCache is never persisted.

Therefore i started debugging into the source code and noticed that the Cache.dispose() methode, which is called by CacheManager.shutdown() contains the following code:

public synchronized void dispose() throws IllegalStateException { checkStatusNotDisposed();

if (executorService != null) { executorService.shutdown(); } disposeRegisteredCacheExtensions(); registeredEventListeners.dispose();

if (memoryStore != null) { memoryStore.dispose(); } memoryStore = null; if (configuration.isOverflowToDisk() && diskStore != null) { diskStore.dispose(); diskStore = null; } changeStatus(Status.STATUS_SHUTDOWN); }

if i interpret this code correctly the diskStore.dispose() method is only called if the overflowToDisk parameter is set to true. However, in my opinion this code should be

if (configuration.isDiskPersistent() && diskStore != null)

then the diskStore.dispose() would be called if the diskPersistent is set to true.

Christian Sourceforge Ticket ID: 1909427 - Opened By: ceedee - 7 Mar 2008 10:18 UTC

Comments

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira