users@glassfish.java.net

Re: Persistence / JPA / TopLink: lost updates

From: <glassfish_at_javadesktop.org>
Date: Fri, 01 Feb 2008 12:32:24 PST

What you are reporting is very strange. There should be no difference between user transactions and container transactions with respect to what you are doing. TopLink will still receive a callback from the container during the commit of the transaction for both types of transactions and the same TopLink code will be executed. The container will have no impact on if merge is called or not. Is it possible that with the container managed transaction there isn't a transaction and your merge call is failing or is it possible that you are merging into a different persistence context from the one you are deleting from? Are you seeing any exceptions? What happens in both cases if you remove the 'remove' call? Do the updates succeed?
--Gordon
[Message sent by forum member 'gyorke' (gyorke)]

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