One solution is to use optimistic locking to detect if a user tries to edit 
data that has already been edited by a different user. What you do once you 
have detected that situation depends on your app and your requirements. You 
have to define your conflict solving strategy.

With optimistic locking nearly each table will have a column "version" and 
you increment the version whenever you edit a row. User A now has a 
specific version of the DB data and if User A tries to save changes then 
the database must still contain the same version for that row. If it does 
not then User B has already changed the row and User A has outdated data.

Alternatively you could provide a totally different workflow that 
circumvent such a situation. For example all your data could be read-only 
by default in your UI and you have to click an "Edit" button. Once User A 
clicks on "edit" the data will be locked and no one else can also "edit" 
that data until User A has saved that data again. 


But as said the strategy you choose greatly depends on your app and 
requirements.


-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to