How to properly handle InnoDB deadlocks in Java/JDBC?
问题 I am working on a theory basis here, I want to make sure all my bases are covered. I have read quite a bit into InnoDB with Java and how deadlocks can occur no matter what query you are running. Although I am pretty clued in with the theory and best practices, I am pretty much clueless on how to implement the catch all mechanism of reissuing transactions when a deadlock occurs. Are there specific exceptions to listen out for? Is the exception only thrown after I call connection.commit() or