-->
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.  [ 1 post ] 
Author Message
 Post subject: CascadeType.SAVE_UPDATE and potential deadlock problm
PostPosted: Sun Dec 02, 2007 4:28 pm 
Newbie

Joined: Tue Jun 05, 2007 1:18 pm
Posts: 1
Location: Toronto
I am a toplink user and as you may know one of the features of toplink is it accesses a collection of entities always in a same way (for example when saving updated entities to database it starts saving the entity with lowest primary key and goes on in an ascending manner). This prevents many potential deadlock situation when concurrent users run the same usecase in separate transactions.

I've read the grate "Java Persistence with Hibernate" book carefully cover to cover, however I didn't see any evidence that Hibernate supports such feature.
I even scared particularly when I want to use CascadeType.SAVE_UPDATE to save an entity who has a collection of entities in a transaction. To be precise, if two users want to update the same collection in two transactions and each access collection entities in different order, then we will have a dead lock.

I will be highly appreciated if some one addresses my concerns.


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

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.