0

My application has locked the database table because JTA haven`t complete your operation with the commands of rollback or commit.

The application is running over weblogic 10.3 in cluster with two managed servers.

The method with access on database is syncronized where the first part inside of method execute a query and the second one call another method to execute the merge. This method has the annotation @Transaction(read-only=false).

The JTA transaction is executed by weblogic.

My question is, based on scenario described, what could be generating a lock in database?

esej
  • 3,059
  • 1
  • 18
  • 22
jux
  • 79
  • 11
  • are you accessing the database within an EJB over JPA? What exactly do you mean by "The method with access on database is syncronized" so the method is sth. like "public synchronized void myMethod()"? – Korgen May 16 '12 at 06:54

1 Answers1

0

Looks to me a threading issue, where lock is not getting acquired.

The method with access on database is syncronized where the first part inside of method execute a query and the second one call another method to execute the merge.

Check if two methods require two different locks, if yes then it can lead to deadlock, if thread in method1 keeps on waiting for lock to access method2.

mprabhat
  • 20,107
  • 7
  • 46
  • 63
  • The methods call only one method and inside of this method I have the call for dao method where I have the anotation @Transacition(readOnly=false). The questions here is if I have the possibility to get a dead lock, why the JTA didn't the rollback after 30s (time set). another question: my application has a method synchronized, how weblogic managed the node to use only one managed server for this case? – jux May 24 '12 at 19:09
  • The main point here is, Is It possible weblogic lost the JTA control and for few moment It let some conection locked on database? Another point is: Is It possible that weblogic lost the application control and doesn't throw time out exceptions? – jux May 24 '12 at 19:36