[infinispan-dev] CacheManagerNotifierImpl now registered in GlobalComponentRegistry ctor

galder at redhat.com galder at redhat.com
Thu Apr 8 06:41:30 EDT 2010


Hi all,

Re: https://jira.jboss.org/jira/browse/ISPN-388

To implement this, I needed to create a listener class with a @ViewChanged and I needed to plug it in before any other caches had started. This is so that I can start calculating the rank from the very first cache started. However, until now, CacheManagerNotifierImpl component would only be registered when 1st cache was started. So, I'd miss the first view change. 

In similar fashion to what I did with CacheManagerJmxRegistration, I've added the following line in the GlobalComponentRegistry:
registerComponent(new CacheManagerNotifierImpl(), CacheManagerNotifier.class);

This means that I can now add listeners to CacheManager before any cache has started, hence being able to get all view change notifications from the start. This also expands to other cache manager listener events such as CacheStarted/CacheStopped

Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list