This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 30138
    
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)
 
Similar Threads
How to handle this scenario.
Call Java web application from VB
JBoss CMP caching problem
Reliable web hosting company recommendation needed
Can not access Glassfish from machine's IP