users@glassfish.java.net

Re: JPA Cache evict all instances of a given class

From: Mitesh Meswani <Mitesh.Meswani_at_Sun.COM>
Date: Thu, 22 May 2008 17:08:21 -0700
Another approach is to use query hint toplink.refresh to refresh data. See here  for more info

glassfish@javadesktop.org wrote:
Is there a method of evicting all instances of a given Class from the EntityManager cache without performing a lot of queries?

We have a number of entities that are generated from scheduled process that writes directly to the database. I would like to be able to flush the database of all instances of the Class that is updated so that they entity manager will recreate the instance in its cache the next time a query is created.

Thanks,
-- Chad
[Message sent by forum member 'chadws' (chadws)]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net