Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink not picking up database changes on refresh
Eclipselink not picking up database changes on refresh [message #384232] Mon, 08 December 2008 02:40 Go to next message
matthew simcox is currently offline matthew simcoxFriend
Messages: 1
Registered: July 2009
Junior Member
I have a entity association from parent->child, where a parent can have
many children (as always). I'm using eclipselink for the first time and
I'm finding that when I add/remove a new child via my RCP front end and
refresh the parent entity it doesn't pick up the changes. I can see that
the updates are occurring correctly in the oracle back end.

I've set up some manualy sysout calls that loop tell me exactly whats
being picked up from the tables when I refresh the list and i can see that
its only picking up the data from the last restart. If I restart the
changes are picked up.

This has led me to think that perhaps there is some caching going on but
I'm not sure how to change this. Any ideas?
Re: Eclipselink not picking up database changes on refresh [message #384234 is a reply to message #384232] Mon, 08 December 2008 14:11 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

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


James : Wiki : Book : Blog : Twitter
Previous Topic:Entity must be managed to call remove
Next Topic:Why should I upgrade?
Goto Forum:
  


Current Time: Tue Apr 23 12:11:16 GMT 2024

Powered by FUDForum. Page generated in 0.02815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top