-->
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.  [ 2 posts ] 
Author Message
 Post subject: Does Hibernate support transaction or method locking?
PostPosted: Thu Nov 27, 2003 9:56 am 
Newbie

Joined: Thu Nov 27, 2003 9:43 am
Posts: 1
Hi, I'm a J2EE developer with experience using entity beans, but I'm new to Hibernate and have one question. With entity beans, I often rely on method locking and transaction locking to ensure "synchronized" behavior:

Method Locking

Method locking ensures that only one thread of execution at a time can invoke on a given Entity Bean.

Transaction Locking

Transaction locking ensures that only one transaction at a time has access to a given Entity Bean. This means that if any method at all is invoked on an Entity Bean within a transaction, no other transaction can have access to this bean until the holding transaction commits or is rolled back.

Does Hibernate support any similar behavior, without having to resort to synchronized code blocks that violate EJB programming restrictions?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 27, 2003 10:12 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hibernate implements the instance-per-transaction model (actually instance-per-session) which is similar to EJB commit option C, except that Hibernate also features a second-level cache which gives you the main advantages of commit option A.

This architecture is designed for extremely high scalability via minimal resource contention.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.