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

Description

Hi,

I’ve the following configuration:

All my caches are created programmatically from the default configuration. On the created caches, I register a CacheEventListener through the RegisteredEventListeners obtained via Cache#getCacheEventNotificationService().

Each time my listener is called, the cache instance passed to the invoked method is incorrect, it is always the default cache instance.

I’ve debugged the CacheManager#addCache(String) method and found that the Cache#clone method uses Object#clone which do not deep clone references to other objects. Well in this case, the instance of my cache shares the RegisteredEventListeners reference with the default cache instance. This is clearly wrong as RegisteredEventListeners as a back reference to Cache.

As a work around, I’ll have to create the caches myself using the Cache constructor.

Thank you! Sourceforge Ticket ID: 1457268 - Opened By: olafontaine - 23 Mar 2006 20:51 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