Skip to main content



      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 09:46 Go to next message
Eclipse UserFriend
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 11:30 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: TopLink Essentials Caching Options [message #690764 is a reply to message #687971] Thu, 30 June 2011 03:35 Go to previous messageGo to next message
Eclipse UserFriend
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 11:01 Go to previous messageGo to next message
Eclipse UserFriend
<property name="eclipselink.cache.shared.Employee" value="false"/>
Re: TopLink Essentials Caching Options [message #691024 is a reply to message #691016] Thu, 30 June 2011 11:06 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 22:51:57 EDT 2025

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

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

Back to the top