Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DeadLock or Timeout

 
Kumar Godugu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am performing around 30 transactions, My requirement is that either I need to commit all Transactions or I need to roll back all if any of them fails. All Transactions are executing properly but before just committing it throwing the following exception.

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0911N The current transaction has been rolled back because of a deadlock or timeout. Reason code "68". SQLSTATE=40001

If I use Connection.setAutoCommit(true) before starting of Transactions, then I can able to executing all the transactions success fully.I am using servltes and Tomcat server.

Please help me to solve this.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try frequent commits.

Webopedia Definition of Deadloack
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic