-
1. what happens, when updating a bean object in replication?
brenuart Feb 22, 2011 3:56 AM (in response to amalrajvinoth)- what happens, when updating a bean object in replication?
when a particular field is updated using setMethod(...), only modified value sent or whole obj is sent?
how to verify this?
Nothing happens unless you explicitly put() the object back in the cache after modification.
Note however that, depending on your configuration, the same object instance might be returned by your local cache on subsquent get. This means that modifications applied to it might be visible - but the cache won't be aware of them (because you haven't put it back).
2.what happens in case of invalidation
Invalidation means you tell other nodes of the cluster that a particular key has been modified - but you don't transfer them the new value.
With invalidation, the key is removed from your local cache.
With replication, the new key is updated.
-
2. Re: what happens, when updating a bean object in replication?
amalrajvinoth Feb 22, 2011 4:52 AM (in response to brenuart)Hello Bertrand Renuart,
Thanks for ur quick reply,
Actually i am using put() after modifying as follows,
creating and putting bean obj
Address address = new Address();
address.setStreet("3rd Street");
address.setCity("MA");
address.setZip(640001);
cache.put("address", address);
modifying th e bean obj...
address = (Address) cache.get("address");
address.setCity("CA");
cache.put("address", address);
in this case what happens...
does it send whole obj or only the City...
thanks.
regards,
amal.
-
3. Re: what happens, when updating a bean object in replication?
brenuart Feb 22, 2011 5:04 AM (in response to amalrajvinoth)modifying th e bean obj...
address = (Address) cache.get("address");
address.setCity("CA");
cache.put("address", address);
What do you think?
How could Infinispan detect what are the changes in your bean/bean graph? Your bean is not instrumented and there is no "session-like" concept like in Hibernate...
So the answer is: currently, the whole Address will be transfered.
-
4. what happens, when updating a bean object in replication?
amalrajvinoth Feb 22, 2011 8:02 AM (in response to brenuart)thanks a lot for ur response.
-
5. Re: what happens, when updating a bean object in replication?
mircea.markus Feb 22, 2011 8:27 AM (in response to brenuart)and there is no "session-like" concept like in Hibernate...