Re: openjms and sql server

"Hemant Gaur" <[email protected]> 24 Apr 2007 04:09:18 -0000
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
Hi,
SqlServer runs into the deadlocks for more than one publisher/subscribers. I have got this reproduced with the 2000 and 2005 sqlservers and OpenJMS release version. This happens due to the oppertunistic locking model of the DB.
There is a simple and nice workaround for this problem.
Rename the old tables and create the views with no lock.

Run the following script to do this on sql server (not valid for any other DB)
===============================================
-- WorkAround for SqlServer Trasactional Deadlocks under load
exec sp_rename @objname='messages',
@newname='messages_table', @objtype =  'OBJECT'
exec sp_rename @objname='message_handles',
@newname='message_handles_table', @objtype='OBJECT'
 
exec ('create view messages as select * from messages_table with(nolock)')
exec ('create view message_handles as select * from message_handles_table with(nolock)')

===============================================

I have verified the correct no-problem functionality using the stress tests for the 5 publisher, 5 subscriber, 5 topic based durable persistent load.

Here's the link for the OpenJMS bug filed for this.
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=934627&group_id=54559

Thanks,
Hemant Gaur 

On Mon, 23 Apr 2007 Stephens,Robert wrote :
>can't seem to get it to work...
>openjms 0.7.7beta1 and sql server 2005 with ms jdbc driver...
>openjms keeps deadlocking sql when acknowleging messages (auto or client
>acks)...
>
>anyone have any luck with ms sql and open jms?
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>openjms-user mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/openjms-user

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user