What steps will reproduce the problem?
1. tx.begin();
2. em.persist(obj);
3. tx.commit();
4. obj = em.merge(obj); // bring obj back to managed
5. tx.begin();
6. em.persist(obj); // this throws EntityExistsExcetion
// and tx should be marked as rollbackOnly
// however tx.getRollbackOnly() returns false
What is the expected output? What do you see instead?
tx.getRollbackOnly() should return true after try/catch
EntityExistsException. Got false instead.
What version of the product are you using? On what operating system?
All versions, tried 1.2.2 and 1.2.5 through. On linux, but does not matter.
Please provide any additional information below.
An IBM implementation with similar issue and a fix posted.
http://www.ibm.com/developerworks/wikis/display/objectgridprog/EntityManager+flu
sh+does+not+mark+transaction+to+roll+back
Original issue reported on code.google.com by lyan%goo...@gtempaccount.com on 17 Sep 2009 at 11:39
Original issue reported on code.google.com by
lyan%goo...@gtempaccount.com
on 17 Sep 2009 at 11:39