MountainClimb / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

EntityExistsException does not cause current transaction marked as rollbackOnly #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
SVN trunk uses DataNucleus 3.x and don't see this problem

Original comment by googleco...@yahoo.co.uk on 12 Jul 2011 at 6:36