This content has been marked as final.
Show 2 replies
-
1. Basic doubt on cache transaction when modifying cache value by reference
galder.zamarreno Feb 4, 2011 10:10 AM (in response to sudheerk84)Whenever you update the object, you should call cache,put() or equivalent, otherwise, even if the changes might be visible in the local machine, these won't be replicated/distributed to other nodes.
-
2. Basic doubt on cache transaction when modifying cache value by reference
sudheerk84 Feb 4, 2011 10:24 AM (in response to galder.zamarreno)Hi Galder,
i did observe that behavour. The changes were reflected locally but not distributed.
So as a guideline - we are planninng to make all objects(POJO) in cache as immutable(i .e is cache.get always returns immutable POJOs) . This will force the developer to ensure that he doesnt make pojo modifications(by calling setter methods) by mistake and expect it to get distributed across cluster.
Is this a good guideline when cache objects are POJO's and we are heavily relying on transactions.