dcsimg
table locking instead of row locking
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Krivenko
Posted On:   Thursday, October 21, 2004 12:12 AM

I’ve got a big problem with row locking!! I have stateful session bean with bean-managed transactions, which works with some table. The bean opens a new transaction in ejbCreate() method and closes it in special close() method. I create an instance, update (or insert) one row in the table and then close it. The problem is that between update and close methods the table is locked entirely (not only the row I have just updated) for the bean. If I try to run another instance of it on another row, I’ll have timeout error. But, at the same time, I can insert or update other rows using other tools like MS SQL Query Analyzer. What am I doing wrong!? I’m using MS SQL 2000 with Microsoft JDBC na   More>>


I’ve got a big problem with row locking!! I have stateful session bean with bean-managed transactions, which works with some table. The bean opens a new transaction in ejbCreate() method and closes it in special close() method. I create an instance, update (or insert) one row in the table and then close it.



The problem is that between update and close methods the table is locked entirely (not only the row I have just updated) for the bean. If I try to run another instance of it on another row, I’ll have timeout error. But, at the same time, I can insert or update other rows using other tools like MS SQL Query Analyzer.



What am I doing wrong!?



I’m using MS SQL 2000 with Microsoft JDBC native drivers (but I have tested drivers from vendors) and Jboss 3.2.3 as application server.

   <<Less
About | Sitemap | Contact