users@glassfish.java.net

Re: Persistence / JPA / TopLink: lost updates

From: <glassfish_at_javadesktop.org>
Date: Mon, 04 Feb 2008 02:06:08 PST

Thanks everyone for the comments. To answer the questions:

1) My theory why the problem does not appear with user transactions is that my code in that case is a bit convoluted with several components involved. I guess that optimization simply fails because of that and the update is executed. In the other case with the container-managed transaction, the merge and remove are immediately next to each other.

2) If I remove the deletion, then the update is executed just fine.

3) Flushing after the update solves the problem.

Many thanks,

Ulrich
[Message sent by forum member 'ulim' (ulim)]

http://forums.java.net/jive/thread.jspa?messageID=257231