users@glassfish.java.net

Re: Inconsistency between the persistence context and the database

From: <glassfish_at_javadesktop.org>
Date: Wed, 07 May 2008 03:12:59 PDT

Hm, difficult question. I will try to give you some hints as to what can be done.

You can try the following:

- Deactivate the toplink cache in your persistence.xml. You find documentation here:

http://www.oracle.com/technology/products/ias/toplink/JPA/essentials/toplink-jpa-extensions.html#TopLinkCaching

- Maybe using em.flush can also help you. Try to always flush after you set the status flag.

- Third possible solution: Use bean-managed transactions and be sure to commit your transaction after changing the status flags.
[Message sent by forum member 'batzee' (batzee)]

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