1. javax.persistence.OptimisticLockException + org.hibernate.StaleObjectStateException stackoverflow.comI'm catching |
2. OptimisticLockException and StaleObjectStateException forum.hibernate.orgHi all, I have a problem with OptimisticLockException and StaleObjectStateException in my application. Only happens recently. Below is the flow of entity manager usage during the transaction. Need your help to point out the mistake. Kinda stuck here.. ublic A print(A a) { B b = a.getB(); update (a); em.merge(b); em.flush(); a.setB(b); if (...) { a = issue(a); } return a; ... |