How to refresh cache in TopLink, turn off cache

How does one refresh TopLink's cache resulting from an event change? As an example, if a stored procedure is triggered by a process independent of TopLink, how do I tell TopLink to refresh its cache.
Also, how does one turn off TopLink cache altogether. Thanks.

I do not typically recommend turning the TopLink cache off all together. The cache is also key for managing object identity. If you have data that changes outside of your Java applications knowledge then there are several strategies to handling the stale data situation in the cache.
1. Make sure you setup a locking strategy so that you can prevent or at least identify when values have already changed on an object you are modifying. Typically this is done using optimistic locking. There are several options (numeric version field, timestamp version field, some or all fields). Full details available in the docs.
2. Configure that cache appropriately per class. If the data is being modified by other applications then use a weaker style of cache for the class. SoftCacheWeakIdentityMap or WeakIdentityMap will minimize how long de-referenced objects are held in the cache.
3. Force a refresh if needed. On any query a flag can be set to force the query's execution to refresh the cache. (http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/toplink.903/tl_flapi/oracle/toplink/queryframework/ObjectLevelReadQuery.html#refreshIdentityMapResult())
4. If the application is primarily read based and the changes are all being performed by the same Java application operating in a cluster you may want to look at TopLink's cache-sync feature. Although this won't prevent stale data it should greatly minimize it.
5. One less frequently used option is to build infrastructure that can notify TopLink's cache when something changes on the database. This involves building your own call-out mechanism from a trigger into the Java application hosting the TopLink session and cache. In the Java space you can make use of the cache API to force refresh, update the object yourself, or mark it as dirty. I would discourage removing it from the cache at the object may still be in use.
I hope this explains stale-data management at a high level. More details can be found throughout the TopLink documentation.
Doug Clarke
Product Manager
Oracle9iAS TopLink

Similar Messages

  • Turn off Cache in OBIEE

    Hi,
    I am seeing some issue with cache -
    Is it possible to turn off cache for all reports in OBIEE.
    Or
    Is it possible to purge cache automatically from RPD and from answer?
    Thanks,
    Poojak

    Hi ,
    You can diable the cache in NQSCONFIG.INI file.
    You can purge the cache from the answer
    http://bintelligencegroup.wordpress.com/2011/01/06/how-to-purge-the-cache-from-dashboard/
    and also from rpd manage -->cache you purge
    or using the event polling
    http://bintelligencegroup.wordpress.com/2011/07/27/event-polling-table-to-purge-the-cache-in-obiee/
    Hope this will help you.
    Thanks,
    Ananth

  • CE - Turning off caching

    I have a CE510 and I also run SmartFilter. To a degree the caching has been more problems than what it is worth. I am constantly plagued by users having problems with forms, search sites, redirects, etc....
    I would like to turn off caching! I will be content with the CE's handling NTML authentication and SmartFilter content filtering.
    How do I turn off caching where all requests are treated as a unique request just as if we did not have a the cache engine.
    Thanks!

    I do not believe there is a way to turn off the caching. You could remove the CFS partition on the CE thereby eliminating the CE from being able to cache as it needs the CFS partition to perform this task.
    You may also be able to do a "http reval-each-request all" thereby making the CE go get the content every time.
    Regards
    Pete..

  • My Outlook/iCloud calendar invites to others appear to work on my end and sync with my PC and mobile, but when other people "accept" the invite, it will not populate/add in to their calendar. How can i fix this without turning off iCloud?

    My Outlook/iCloud calendar invites to others appear to work on my end and sync with my PC and mobile, but when other people "accept" the invite, it will not populate/add in to their calendar. How can I fix this without turning off iCloud?
    I am at a new office that uses Outlook (not Outlook Exchange) which does not sync with my mobile... I just got iCloud set up on my PC to sync my contacts, calendar, reminders, etc... The sync worked (not without flaws, but the other issues seem solvable... I think), so that i can now see all my appointments on both my phone and on my PC. The problem I am having is that iCloud moved all of my calendar items from Outlook into iCloud calendar and now when I send out meeting/calendar invites the recipients may accept them, but the meeting does not get added to their calendar. This is a huge problem and may mean that i need to turn off iCloud.
    Does anyone know how to fix this?
    Thanks!

    I am replying to my own post here as I seem to have fixed the problem.
    I do have some calendars that are shared. Some of those are shared with users who have time zone support turned on. So i activated time zone support on my iphone, then deleted my icloud subscription. I then signed in to icloud again and voila... problem solved.
    It is a weird one as the other calendar views were always fine and when you opened an event that appeared in the wrong day (on list view), the correct date of the event was shown in the information...
    one more bug in a complicated system I guess

  • I can only text through ordinary message when not connected to the internet to someone, but when I am connected, it is automatically assumed as iMessage. How will I text ordinarily without turning off the net? Thank you!

    I am from the Philippines btw. What I meant is, I cannot text someone ordinarily when the net is turned on, and it assumes to be texting through iMessage. How will I text someone without turning off the internet in an ordinary way, not in iMessage? Thank you.

    I Tried that already, but if i turned it off, I cannot send an imessage to people I want to text through imessage. There are people in my contacts that when I text, it is automatically as text message, while there are some that when I text, it is through iMessage automatically, and I just want through text message also. And for the latter, I still need to turn off the wifi in my phone for them to be texted through iMessage, which is more hassle.

  • On a 5s how do you make the light turn off when phone rings or when you receive text, at work I would like to shut that off. Also seems like vibrate doesn't always work?

    On a 5s how do you make the light turn off when phone rings or when you receive text, at work I would like to shut that off. Also seems like vibrate doesn't always work? I had a 4s and didn't have these issues

    Thank you, I did find that. Still my phone does not always vibrate when ringer is off for texts and calls, only sometimes?

  • Document Level JavaScript to turn off caching for a PDF?

    I have been trying to find a way to ensure that a fillable PDF leaves no trace of itself on a computer that was used to open it. For example, if a user acceses a fillable PDF via browser or Reader, once they are done and have closed the browser or Reader, I want no trace of the information to remain in any cache on that machine. We don't want to require our users to try to control cache via settings in Reader, so I have been trying to find other ways to do this.
    I came across the following comment from GKaiseril in another thread - is this a way for a PDF to control its own caching? Any details or alternative approaches would be welcome!
    GKaiseril
    Re: Metadata - Can't remove
     You can also use document level JavaScirpts to turn off the auto complete and caching for a given PDF.

    Version 9 and 10 of Reader do not cache form data in a temporary FDF as previous version may have. The nocache document property it not even documented in the latest Acrobat JavaScript reference. If you're concerned about previous versions, you can use set the nocache document property at run-time, but users can disable JavaScript, so that approach is no guarantee.
    For information on controlling autocomplete, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.407.html

  • How do I make my iPad turn off when the screen is covered?

    My old iPad would turn off when I closed the cover but I cannot find how to make the iPad air turnoff in a similar fashion?

    dpna wrote:
    Yes it is a proper cover
    If it is an APPLE COVER, perhaps it's not the one for that model. But, if it's not an Apple cover, then maybe the manufacturer hasn't set up the magnets the way they are supposed to be.
    I'm going to quote from another post elsewhere ...
    Are you using a genuine Apple cover or another third party cover?
    It's the magnets in the cover which activate the lock/unlock feature to appear in your settings. In earlier iPads you could slide a magnet down the side of the iPad to find where the magnet activates and turn the feature on.....Apple have now changed how this works with the iPad Air. Whereas before there was only 1 magnet positioned in the cover for earlier iPads, it is now thought there are 2 with alternating polarity.
    So if you want this feature you will need to buy an Apple cover or wait for third party manufacturers to get their magnets in the correct position.
    If you do have a genuine Apple cover then there is something going wrong here....

  • How to make hard hard drive turn off?

    How do i turn off hard drives when they are not mounted?

    The program you're looking for is hdparm. Check the man page & read the section on the -S option. Do not set the timeout too low or your drive may die sooner than expected. A hard drive can only spin up/down so many times.

  • Activity Monitor:  How to know what processes to turn off?

    I cant seem to find something like a glossary for the processes that appear in Activity Monitor.
    I get the idea for using the AM - to find out what processes are running and how much memory they are using, however, I just don't know what processes are "suspicious", uneccary, good, bad or whatever. Anyone know of some resource to help me know what I should turn off?
    Many thanks!

    Ah, in that case, watch your CPU usage.
    When Activity Monitor starts, select either +All Processes+ or +Active Processes+ in the toolbar, and sort the list by the +% CPU+ column, so the highest numbers are on top, and select the CPU tab towards the bottom.
    For this purpose, also select +View > Update Frequency > Less Often+ from the Menubar.
    Various processes will "spike" up and down normally as they do things, then are idle, so you need to watch it for a while and get a feel for the processes that are using the most CPU, and the +% Idle+ at the bottom.
    When the slowdown occurs, see if something changes significantly, especially if the +% idle+ goes to near zero. If that happens, see what process(es) are using the most CPU.
    If the process(es) involved aren't familiar to you, post their names here (and/or check this out: http://triviaware.com/macprocess/all)
    You may also want to select the +System Memory+ tab towards the bottom. Keep an eye on the total of Free and Inactive memory (if they're near zero, you may need more), and the +Page outs+ (if that's high, it's another indication you may need more memory).

  • My printer keeps turning off, how do I stop it from turning off.

    My eprinter keeps turning off and therefore I get error messages that the printer is not ready.  How do I make sure the printer never turns off so that I can print from anywhere and not worry about it not printing. 
    Thanks
    Navyretired2306

    Stephanie...
    Try deleting iTunes Helper from Login Items...
    Instructions for Windows and Mac both >  http://osxdaily.com/2009/09/10/ituneshelper-what-does-itunes-helper-do/

  • How come occasionally my macbook air turns off suddenly when battery is not empty?

    It happens to me three or four times for the past few months. I pressed the power button lightly once to put my air into sleep mode but then it turns off without popping out the messsge of wheter to shut off or to restart.

    how the power button works has changed with Mavericks
    http://support.apple.com/kb/HT5869
    ...........if you are EVER letting your Macbook power off from starvation from power, by the way, youre doing damage to the battery and will cause its premature death (the battery) by doing that frequently

  • How can i fix my ipads turn off and on problem

    idk whats wrong with my ipad it was working fine but when i forgot to charge it and left it like that and when i was gonna check something it didnt had not battery life so i put it to charge and so i waited and when it turn on it turned off and kept doing that the whole entire day and is still keeps doing that i even left it charging but it kept turning off and on. can someone tell me or help me fix my ipad

    Hello, hsoriano20. 
    Thank you for visiting Apple Support Communities.
    You may find this article helpful in troubleshooting your issue.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Regards,
    Jason H.

  • How do you keep the toolbars turned off so you don't have to do it everytime you bootup?

    Cannot keep toolbars turned off. Have to turn off every time you power up. Old verison they would stay off

    If you are on phone and inputing phone number and then press left menu button you will see the Add Pause and Wait options to add to number and then you can save number..
    +
    +

  • How do I keep iphone from turning off when listening to a streaming radio broadcast

    When I listen to a local fm station from their web site, the iPhone keeps turning off and I have to push the middle button to start it again.  Is there any way I can prevent this?
    Thanks,
    --Kenoli

    Hmmm. Something is not right,  I don't have this problem.
    Very few Settings>Safari  that should affect this.
    Accept cookies?
    Cellular on,  wifi on
    MacBook Pro, Mac OS X (10.8.2) 2.4GHz IntelCore i5 320 HD 8GB RAM ParallelsDesktop8.0 iPhone5_iOS6.0.1

Maybe you are looking for