Menu

#5 invalidating entire area: don´t work in distributed mode

open
nobody
None
5
2004-10-15
2004-10-15
No

Problem:

We have two VM's working in distributed mode.
When clearing an entire area in one VM we expected
that area to be cleared in both VM's.
But it doesn't work that way, instead only one VM was
cleared (the one that invoke objectCache.clearAll() ),
but the other who receives the notification takes no
action.

Why ?

When clearing an individual element of an area swarm
transmits the key of the element. When clearing an
entire area, swarm transmits a dummy token (ALL).
But the VM that receives the token uses the ==
operand to test equality instead of equals().

Fix:

replace in MultiCacheManager.receiveNotification
if(notification.getKey()=="(ALL)")
with
if(notification.getKey().equals("(ALL)"))

Discussion


Log in to post a comment.