This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes DeadLock or Timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DeadLock or Timeout" Watch "DeadLock or Timeout" New topic

DeadLock or Timeout

Kumar Godugu

Joined: Jul 18, 2005
Posts: 1
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. [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

Joined: Aug 15, 2004
Posts: 2874
Try frequent commits.

Webopedia Definition of Deadloack
I agree. Here's the link:
subject: DeadLock or Timeout
Similar Threads
explicitly sending http 200ok message from servlet
is it a DeadLock Condition?
WebSphere DB2 Deadlock Exception. Reason code "2"
Bad locking solution !
Resolving Rollback, Deadlock exception