users@glassfish.java.net

Re: exception inserted a deleted entity

From: <glassfish_at_javadesktop.org>
Date: Fri, 18 May 2007 13:32:48 PDT

> What would happen if i called em.refresh on a detached entity?

See javadoc:
* @throws IllegalArgumentException if not an entity
* or entity is not managed

>
> I don't explicitly commit the transaction, i leave
> that to the container when my function quits.

Do all steps happen in the same method? If yes, and it's the same EM, then the spec explicitly say: "The persistence context is not synchronized with the result of the bulk update or delete."

Otherwise please provide the pseudo-code of your test.
[Message sent by forum member 'mvatkina' (mvatkina)]

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