This content has been marked as final.
Show 1 reply
-
1. Re: Mutable objects update by reference in Infinispan
sannegrinovero Jan 30, 2013 4:00 AM (in response to tomas11)Hi,
no you can't do that, especially with String instances ;-)
It won't work either with mutable objects, as Infinispan won't know if/when it has to propagate the change from the in-memory instance to the CacheStores or to other nodes.
If you need to "track" objects for changes and the Hibernate API suites you, you could use Hibernate OGM:
1- begin transaction
2- load some mutable entity A
3- pass A to other functions which optionally make some change
4- commit transaction -> At this point if any field changed on the mutable entity this is made visible to other threads on the same JVM and also other nodes on different JVMs.