-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Newbie question about how lock works (database works)
PostPosted: Wed Feb 02, 2005 9:34 am 
Beginner
Beginner

Joined: Thu Dec 23, 2004 8:47 am
Posts: 32
Location: Brazil State:Rio Grande do Sul City:Porto Alegre
When i use locks, it locks the row until transaction ends right?
Hibernate could lock reading and writing as said in documentation.

Example:

One reads the row and lock it , the transaction is still running.
Second in other transaction(internet session) tries to read or write in the row but it is locked,

1)some error is shown at this time ?!
2)The second "read or write" is kind queued ?!
3)Then when the first transaction commits , the second could "read or write"?

Thank you in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 02, 2005 2:16 pm 
Beginner
Beginner

Joined: Mon Jan 03, 2005 12:49 pm
Posts: 21
The second read is queued. I don't know if Hibernate rests over the lock implementation of the database, in that case you should be careful with locks because in some databases you could be locking more than one row (pages or the entire table even).

Bye


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 02, 2005 6:27 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hibernate delegate locks to the DB

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.