Code review

Transaction propagation or 100% deadlock with JPA/Hibernate.

Transaction propagation deadlock

In continuation of the topic about¬†deadlocks I want to tell you about another case of getting deadlock with JPA/Hibernate. This deadlock I’ve already met two times and it is related to transaction propagation.

How often do you manipulate transaction propagation except using default one – REQUIRED (luckily same name for Hibernate and JPA)?

If you ask me, not much. So when I see propagation=REQUIRES_NEW in code I always suspect that something might smell.
(more…)