A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Oct 13, 2010
Nov 12, 2010 08:46:12
please some one clear my following doubt in concurrent transactions situation
1. 2 users open same database row to update ,say user 1 update a field RED and after a moment other user updates it to GREEN. user 1 changes will be lost .how to handle it in simple
i have read isolation levels dirty reads and all therotically but coldnot find some practical soultion.
i read that hibernatea appends some uid with each row to handle this but never saw this happening.
whats the solutions guys in jdbc and hibernate ??
Joined: Apr 14, 2004
Nov 12, 2010 08:59:51
Lost updates can be prevented by implementing optimistic locking. If its Hibernate you are using, I'd first google the term, then check out its documentation on versioning.
I agree. Here's the link:
subject: concurrent transactions
Dirty Read / Dirty Write scenarios
Please comment on the application design
How to Update an Entity in the concurrent transactions?
How to update string to Oracle Clob
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013