Commit option A can be used with the Cache Invalidation Framework to keep entities in all the containers of the cluster up-to-date.
But how do I prevent a bean in server 1 from getting updated after it is modified in server 2 and before server 1 can get the invalidation message. Below are the steps to make it clear :
1) Server 1 and 2 have cached copies of Custome "222" with name "ABC"
2) Server 2 changes the name to "DEF" which causes a invalidation message to be sent to server 1
3) Server 1 changes the name to "GHI" before it can get the invalidation message and hence ends up overwriting the changes made by server 2
Can this happen and if so how do I prevent it ?
Thanks for the help.