Hmm, based on your description, I would say that Infinispan does not know about your change and this is IMO expected. If you would like to replicate the changes, you would have to use cache.replace() and pass the new changed object. When you just update the object like you did, it's just changed on the local heap but Ispn does not now that it should replicate it. That's my opinion, maybe others can argue.
Thanks Martin. I just wanted to confirm this behavior, so that I can be sure that I have not missed out any feature of Infinispan in accomplishing the same. Is this feature eligible to be a road-map item for Infinispan ? Bcoz, I see this as a very much required feature in any distributred deployments. Please let me know your thoughts on the same.
I don't know if this is doable at all. Tracking changes in Java objects would be perhaps very resource and time consuming task. This would be a nice feature but do you think there are cases when the application cannot call cache.replace() which does this job?
We have solved this by maintaining a list for each request that stores each of the accessed keys. We have safely assumed that all those keys that are accessed using get are modified. So, at the end of request, we are replacing the keys with the latest value available in that local heap. When a replace is invoked, the Externalizer associated with the object replicates this changes to the other nodes of the cluster.
Just a thought : Is there a way that Infinispan can maintain a Shared Memory across nodes in a cluster ? Not sure if this is feasible !
I'm glad you got it to work
What do you mean by Shared Memory? What is the exact use case you want to address with that? Maybe start a different thread ;-)