• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inconsistant Data Updation problem in WEB application(Multiuser Application)

 
jagrutkumar dalwadi
Ranch Hand
Posts: 83
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the WEB appliaction. In this, two users are chnaging the same field of the same screen simultaneously.
So data inconsistancy is there. This may create problem in my application.
In data base, master as well as children data are changing.

I can't use Hibernate.




 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34856
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have two choices:
1) Optimistic - Keep track of when the field was last updated. Don't allow the second update once the last updated time doesn't match.
2) Pessimistic - Set a flag when the first user reads the field. Don't allow updates until the field is reset. (You need a timeout with this approach so it isn't locked forever if the user goes away.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic