aspose file tools*
The moose likes JDBC and the fly likes Inconsistant Data Updation problem in WEB application(Multiuser Application) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Inconsistant Data Updation problem in WEB application(Multiuser Application)" Watch "Inconsistant Data Updation problem in WEB application(Multiuser Application)" New topic
Author

Inconsistant Data Updation problem in WEB application(Multiuser Application)

jagrutkumar dalwadi
Ranch Hand

Joined: Mar 26, 2009
Posts: 83

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

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.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inconsistant Data Updation problem in WEB application(Multiuser Application)