Atomikos Forum |
|
Whenever I get a deadlock exception in a MySQL transaction
participating in an XA-transaction, the corresponding connection is never returned or freed from the connection pool. This eventually leads to a starvation of the pool. I have tried to figure out why this happens but I'm not really comfortable reading the Atomikos source code. I did however find the following: When a deadlock occurs in MySQL an exception is thrown. So far so good. Later on when the deadlocked victims connection is closed, Atomikos submits an XA_END command to what MySQL responds with another exception (XA_RBDEADLOCK). See http://bugs.mysql.com/bug.php?id=64202. This behaviour differs from other all other errors that could occur so I guess it could have something to do with it. Is this a known problem and are there any good workarounds? I'm using the Atomikos 3.8.0 with Spring 3.0 and the JtaTransactionManager if that matters. Regards Lars Gråmark |