The Newsgroup Web Interface is deprecated, and can no longer be used to post. Please use the Community Forums.

Eclipse NewsPortal - eclipse.rt.eclipselink

Re: Eclipselink not picking up database changes on refresh

Subject: Re: Eclipselink not picking up database changes on refresh
From: james.sutherland@xxxxxxxxxxxx (James)
Newsgroups: eclipse.rt.eclipselink
Organization: Eclipse
Date: Dec 08 2008 09:11:15
How are you refreshing the object?  Are you using EntityManager.refresh()?

EclipseLink caches by default.  To disable the shared cache use the persistence.xml property,
"eclipselink.cache.shared.default"="false"

Although disabling the shared cache is not normally the best idea.  You can refresh an object using EntityManager.refresh() or the Query hint "eclipselink.refresh"="true".  EclipseLink also has cache invalidation, several different caching types, clustered cache coordination, and other options.

Are you using the same EntityManager?  An EntityManager normally represents a transaction context, and will cache all objects locally read through it.  You should normal get a new EntityManager per transaction or per request.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html

Date Subject  Author
31.12. o 


"News-Portal" was written by Florian Amrhein.


Search this group