I doubt it could be achieved with hibernate. Atleast haven't seen anyone doing it in hibernate.
~Rajesh.B
Main Topics
Browse All TopicsHere there are 4 different weblogic servers and trying to select and update one row in oracle 9i database..Here I want to do a row level lock using Hibernate.so that if one jvm has picked others cant update that
This is an urgent requirement please help and guide
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
row level locking is the default locking mechanism of the database. It doesn't matter how you access it.
session1 - update my_table set my_column = 'abcd' where my_id = 1;
session2 - update my_table set my_column = 'xyz' where my_id < 10;
session 1 will have a lock on id=1 , session 2 will have a lock on id's 2-9 and will have to wait on session 1.
if you're doing a select with locks, then the "for update" clause as described by sujith80 above is correct and "no wait" could be applied to the update as well
hi cakurien,
please see this reference.
http://www.hibernate.org/h
hope this help,
sompol.
Business Accounts
Answer for Membership
by: sujith80Posted on 2008-12-17 at 00:15:42ID: 23191488
Row level locking is done in oracle using a FOR UPDATE clause.
See the example, where SESSION1 locks the row and SESSION2 attempts a lock, which fails.
Select allOpen in new window