What is the best practice on implementing a transaction restart upon deadlock or lock timeout exceptions when using Spring (specifically the Spring recommended approach: dec
I recommend using the class org.springframework.retry.interceptor.RetryOperationsInterceptor from the spring retry project, configured like this:
org.springframework.retry.interceptor.RetryOperationsInterceptor
But if you still want to implement it by yourself, the example of AOP from spring documentation is a good start.