users@glassfish.java.net

Re: exception inserted a deleted entity

From: <glassfish_at_javadesktop.org>
Date: Thu, 17 May 2007 14:50:34 PDT

I'm not sure what you mean by "refresh your data explicitly"

Looking at it my original description may not have been clear...

In pass one i call em.clear(), create some records and persist them into the database.

I then delete them using a bulk delete operation instead of calling em.remove.

Then in the second pass i perform the same action as the first, but this time when it comes to persist the records i get an exception that they already exist. Which isn't true, they are deleted from the db, but obviously still exist in the cache.

I would have thought that em.clear() would have removed them from the cache.

Thanks
[Message sent by forum member 'jsl123' (jsl123)]

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