[infinispan-dev] Merged and MergeEvent in 4.2

Vladimir Blagojevic vblagoje at redhat.com
Mon Oct 11 15:37:17 EDT 2010


On 2010-10-11, at 1:22 PM, Mircea Markus wrote:

> 
> On 11 Oct 2010, at 18:12, Vladimir Blagojevic wrote:
> 
>> Hey,
>> 
>> No need to register a new listener for merge event. There is no addMergeEventListener, only addListener! Manik's mechanism looks for annotated callback methods in a listener and registers them with event notifiers. So when you do addListener(x) and x has methods annotated with ViewChaged and Merged annotations then x will get registered in appropriate list in CacheManagerNotifierImpl. Very ingenious mechanism. 
>> 
>> Yes, I made MergeEvent subclass of ViewChangeEvent. It was not before. To all our view change listener classes that had ViewChange annotated method callback I added Merged as well.
> I see! My question is: if a  cluster merge happens, and I have a method annotated with ViewChange *only* (i.e. doesn't have @Merged) - will the @ViewChange annotated method be called? IMO it should because merge is only a special kind of view change.

Aha, I see :) It will not get called! The root cause is split of view notification in JGroups transport! We have to make this clear for 4.2 release! 

Vladimir 




More information about the infinispan-dev mailing list