[jboss-user] [EJB/JBoss] - Problem with the REQUIRED transaction attribute

warx do-not-reply at jboss.com
Wed Feb 14 05:26:49 EST 2007


Hello everybody,

i have a problem, the application I am working on.
The database access is managed by Session EJB.
So, if the user needs some data He/She calls a method of a Session EJB which calls some DAO and returns to the user a Collection of data.
The application worked well until some users started to use it a alot.
So, the situatio is :

    - An user A calls a method of the Session EJB which calls some DAO to 
      perform some SELECT queries on the table TEST

    - While the user A is doing its job an user B calls a method of the same 
      Session EJB to perform an INSERT query on the table TEST

The result is that the table TEST has a DEADLOCK, because it seems that the method which performs the SELECT queries LOCKS the table TEST.
We have this kind of behavoiur because every method of the Session EJB is marked as Transaction REQUIRED.
So, what is the right transaction attribute to specify on the methods of the Session EJB for not to generate the DEADLOCK problem ?
Any suggestion ?
Cheers.

                 Stefano




                    


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016279#4016279

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016279



More information about the jboss-user mailing list