-->
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: shared lock in sqlserver
PostPosted: Wed Jul 06, 2011 5:16 pm 
Newbie

Joined: Wed Jul 06, 2011 5:04 pm
Posts: 4
I am running into a shared lock with sqlserver after a merge operation. It seems merge uses two different connections. One of them inserts an object into a table and the other one selects from it. This causes a lock since the insert doesnot close the session, and the later on select blocks on it because of the newly inserted row. The lock happens after the merge when transaction is committed. This object is a child object of the main merged object.

I am not too familiar with hibernate. First why would it use multiple connections on a single thread of execution ? Second is there any way to force these sql statements into the same connection. Third, Is there a good way to track hibernate to see which sql statement ties to which jdbc pool type of thing ?

I am using glassfish 2.1 with jndi data source. The hibernate version is 3.2.6 ga and sql server is 2008.

Thx for your help in advance.


Top
 Profile  
 
 Post subject: Re: shared lock in sqlserver
PostPosted: Thu Jul 07, 2011 7:44 pm 
Newbie

Joined: Wed Jul 06, 2011 5:04 pm
Posts: 4
Apparently u can :) Found the problem...


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.