EHC ❯ Adding a replication listener to an existing cache dsnt work
-
Bug
-
Status: Closed
-
-
Resolution: Fixed
-
-
-
drb
-
Reporter: sourceforgetracker
-
September 21, 2009
-
0
-
Watchers: 0
-
September 22, 2009
-
September 22, 2009
Description
This case applies to configuring a cache and adding it to a cache manager through method calls.
If the cache is created without a replication event listener and then added to a cache manager, creating and registering such a listener at a later point does not lead to the cache replication working.
getCache().getCacheEventNotificationService().registerListener(cacheEventListener);
According to the source code, caches get added to replication lists based on whether they have a replication event listener. However this happens at the time a cache is added to a cache manager (CacheManager.addCacheNoCheck()).
I believe similar behavior should be added to registerListener(cacheEventListener) method.
Without it registration succeeds but cache replication doesn’t happen. To work around this issue, after registering a replication listener the code has to make an explicit call to the cache manager’s event listener registry: getCache().getCacheManager().getCacheManagerEventListenerRegistry().notifyCacheAdded(“cacheName”);
Sourceforge Ticket ID: 1955199 - Opened By: igorgiev - 1 May 2008 00:18 UTC
Re-opening so that I can properly close out these issues and have correct Resolution status in Jira