The problem occurs because the process is running in parallel (with unique entity managers per thread) for performance reasons and may encounter the same row because of interrelated data.
The reason i'm marking the fields as dirty is because the jpa object is a wrapper around another object which contains the actual data. When that wrappee is assigned then in order for the wrapper to know that the fields have to be marked dirty Where can you catch the PersistenceException? The exception occurs in the commit where many interactions with the database are occurring. I don't want to catch the exception around the commit. I want to catch it around the individual statement. -- View this message in context: http://openjpa.208410.n2.nabble.com/Duplicate-entry-issue-with-multithreaded-application-tp7580917p7581193.html Sent from the OpenJPA Users mailing list archive at Nabble.com.