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

Description

I think that you have a concurrency bug in net.sh.ehcache.Cache linked to the memory store.

The method Cache.put() can be executed while the method Cache.dispose() is beeing executed by another Thread.

Example:

Thread 1: call Cache.put() Thread 2: call Cache.dispose() At this point, the execution of Cache.dispose() finished, then memoryStore = null. Thread 1: Cache.put() continues its execution and try to add the element to the memory store (memoryStore.put(element);) => the method crashed with a NullPointerException because the Cache a set to null the memory store.

We experienced this problem in our production environment using EhCache 1.2.4 and this problem looks still present in 1.5. Sourceforge Ticket ID: 2740073 - Opened By: lgrangier - 7 Apr 2009 08:25 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