-->
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.  [ 8 posts ] 
Author Message
 Post subject: Deadlock Issues with MSSQL when Multithreading, Hibernate3.0
PostPosted: Mon Apr 11, 2005 8:31 am 
Newbie

Joined: Mon Apr 11, 2005 8:23 am
Posts: 4
Hi

I am facing an issue when I run my application in a multithreaded environment. Specifically I am facing deadlock problems even with as few as 5 threads. The same application when run seems to run fine on a MySQL with as many as 60 threads. Any pointers on how to resolve this in MSSQL?

The scenario is something like this:
I am trying to add an object called 'subscriber' with all the relevant details. The relationships are as follows.

There is a subscriber object(table) with many properties, subID being the primary key.
This object has a one-to-one mapping with another object 'individual', foreign key relationships with two other tables 'AdBook' and 'SubRole' with 'subID' property being the binding property.

The 'individual' object has an 'indID' to be the primary key. This object has a many-to-one relationship with the 'subscriber' object (subID). Also has a many-to-one relationship with a 'contact' object with 'contactID' property being the binding one.

The 'SubRole' has a composite key.... key-many-to-one with 'subscriber' object (subID) and key-many-to-one with yet another object called 'role'

The 'AdBook' object has a many-to-one relationship with 'subscriber' object (subID) and a foreign key with respect to the object 'contact' with 'adID' as binding property.

The 'contact' object has a many-to-one with 'AdBook' with 'adID' property, a 'contactID' as primary key, and a one-to-one relation with the 'individual' object

When I try to add a subscriber with multiple threads, I'm facing deadlock issues.

I'm using HibernateTemplate (Hibernate 3.0final version and Spring 1.2RC1)


Thanks

_________________
What is NOT is not indicative of what IS.
-muro


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 3:47 pm 
Regular
Regular

Joined: Thu Nov 13, 2003 2:55 am
Posts: 71
Location: Sweden
Are you using the same isolation level on both RDBMSs?
(Are you at all using InnoDB with MySQL?)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2005 2:29 am 
Newbie

Joined: Mon Apr 11, 2005 8:23 am
Posts: 4
Yes. Am using the InnoDB with MySQL.

_________________
What is NOT is not indicative of what IS.
-muro


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2005 2:34 am 
Regular
Regular

Joined: Thu Nov 13, 2003 2:55 am
Posts: 71
Location: Sweden
Was the "Yes" = "Yes, I am using the same isolation level on both MySQL and MS SQL"?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 14, 2005 7:48 am 
Newbie

Joined: Mon Apr 11, 2005 8:23 am
Posts: 4
Yes mate. I'm using the same Isolation level :)

_________________
What is NOT is not indicative of what IS.
-muro


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 14, 2005 8:21 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Doe's it deadlock on "insert" ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 9:51 am 
Newbie

Joined: Mon Apr 11, 2005 8:23 am
Posts: 4
It locks on insert, delete, update...
well...just about :)

_________________
What is NOT is not indicative of what IS.
-muro


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 4:16 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
See system tables to find it, it looks like "syslockinfo" is used on MSSQL


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