-->
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: Using hibernate: Deadlock victim not releasing page locks
PostPosted: Thu Aug 04, 2005 6:10 pm 
Newbie

Joined: Thu Aug 04, 2005 5:52 pm
Posts: 3
We are using hibernate with weblogic. The JDBC connection pool is setup using weblogic's configuration. Every once in a while, a hibernate query gets chosen as deadlock victim by sybase and does not release the resources(page locks) it had. It does not happen every time it gets chosen as victim.
Does this have something to do with hibernate or it is purely a sybase issue.

I am also closing out the connection in a finally block
finally {
if (session != null)
session.close();
session = null;
}


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 05, 2005 1:43 am 
Beginner
Beginner

Joined: Mon Dec 15, 2003 5:25 am
Posts: 48
Location: Delhi, India
You need to provide detailed information, to get help from community.

_________________
Vinod K. Singh


Top
 Profile  
 
 Post subject: Re: Using hibernate: Deadlock victim not releasing page lock
PostPosted: Fri Aug 05, 2005 10:22 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Deadlock is a database concurrency contol limitation, you must access pages in the same order in all transactions to avoid deadlock. Try FlushMode.ALWAYS on READ_COMMITED isolation level it can help to avoid some deadlocks, but it can happen anyway. Deadlocks are almost random with page level locking (you can try to create table with page size = row size as workaround too). Retry transactions if possible or serialize transactions yourself (using table level locking) if you are sure it is a database fault and transactional code guidnes doe's not help (it must be documented, but probably it sounds like "keep transactions as short as possible", so commit as soon as possible too).


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.