Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » TopLink Essentials Caching Options(What is the difference between )
icon5.gif  TopLink Essentials Caching Options [message #686556] Wed, 22 June 2011 13:46 Go to next message
Markus KARG is currently offline Markus KARGFriend
Messages: 28
Registered: June 2011
Junior Member
We have to live with TopLink Essentials for another while so we have to ask a question for this outdated software. Sorry...

As we have to access our database with a third party software parallel to the TopLink Essentials access, we have to tell TopLink Essentials to always reload the cache content from the DB.

We did this using this code:
public class AlwaysRefreshCacheDescriptorCustomizer implements DescriptorCustomizer {
    public void customize(ClassDescriptor cd) throws Exception {
        cd.setShouldAlwaysRefreshCache(true);
        cd.setShouldDisableCacheHits(true);
    }
}

This works in the most cases, but we noticed that there are some situations where the cache still is not getting refreshed. So we changed to use this code instead, which is working very well always:
<property name="toplink.cache.type.MyEntity" value="NONE" />

Reading the description of both we are uncertain what the difference between both methods is, and what we shall do now: Stay with the new code (which is not what the TopLink Essentials documentation wants us to do), or change the old code in some way (which way?)?

Thanks!
Markus
Re: TopLink Essentials Caching Options [message #687971 is a reply to message #686556] Thu, 23 June 2011 15:30 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

I would not recommend either. You should just disable the shared cache.

http://wiki.eclipse.org/EclipseLink/FAQ/How_to_disable_the_shared_cache%3F


James : Wiki : Book : Blog : Twitter
Re: TopLink Essentials Caching Options [message #690764 is a reply to message #687971] Thu, 30 June 2011 07:35 Go to previous messageGo to next message
Markus KARG is currently offline Markus KARGFriend
Messages: 28
Registered: June 2011
Junior Member
James wrote on Thu, 23 June 2011 11:30
I would not recommend either. You should just disable the shared cache.


Great idea, but how to selectively (i. e. for single entities) disable the shared cache in TopLink Essentials?
Re: TopLink Essentials Caching Options [message #691016 is a reply to message #690764] Thu, 30 June 2011 15:01 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

<property name="eclipselink.cache.shared.Employee" value="false"/>

James : Wiki : Book : Blog : Twitter
Re: TopLink Essentials Caching Options [message #691024 is a reply to message #691016] Thu, 30 June 2011 15:06 Go to previous message
Markus KARG is currently offline Markus KARGFriend
Messages: 28
Registered: June 2011
Junior Member
James wrote on Thu, 30 June 2011 11:01
<property name="eclipselink.cache.shared.Employee" value="false"/>


I assume you meant toplink.cache.shared instead of eclipselink.cache.shared? Strange, couldn't find that in the TopLink Essentials manual actually...!
Previous Topic:eclipselink.join-fetch not work at all
Next Topic:(no subject)
Goto Forum:
  


Current Time: Tue Apr 23 07:22:15 GMT 2024

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

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

Back to the top