Forums Register Login
optimistic locking for every object is necessary over?
Hi every member of the forum ,

I have gone through the optimistic locking through version checking facility in hibernate which is better than pessimistic locking for scalability and performance.
My question is : is it applicable to all the entities we create in our application? In my view, whatever little I have known is that this is a good facility and all the entities should support this by using the <version> element in the mapping file and an extra field private int version in the corresponding class.
Please correct me if I am wrong.

Thanks everybody
Yes, versioning is a good technique to use - whether you use Hibernate or not. Without optimistic locking you run the risk of lost updates.
Thanks Paul.
You are welcome.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 599 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 25, 2018 03:02:49.