Alex Rivera | Logout

How to restart transactions on deadlock/lock-timeout in Spring?

Asked 2009-11-19T12:11:38.547
26

What is the best practice on implementing a transaction restart upon deadlock or lock timeout exceptions when using Spring (specifically the Spring recommended approach: declarative transactions) ?

Thanks,

Asaf

Edit
Report

1 Answer

4

There is no universal answer because it depends on application specifics. For example you may want to perform automatic transacted operation restart or notify the user about operation failure and ask for explicit retry confirmation etc.

I'd use AOP in case of automatic restart scenario.

answered 2009-11-20T05:29:10.887

Your Answer