How do I sync Toplink Cache with my Database?

Hey guys,
We are running macro's through an excel sheet that connects to the database and performs Updates and Inserts.
Since this database update is NOT taking place through TopLink (in a Unit of Work) - we do not see the database changes through the web app on the front end unless we bounce our webserver. Presumably the Toplink cache is re-built on start up...so then we can see the changes.
My question is, what can I do to make sure the TopLink cache is aware of the database changes we have made through the macro without having to bounce the server? Is there a re-fresh or sync command that can be run?
This task is sort of a one time thing, so I don't want a solution that involves the cache going to sync itself on a schedule or anything like that. Maybe bouncing is the best solution?
Thoughts?
We are using Toplink 9.0.4
Thanks.

Hello,
Because it is a one time thing, if you can make sure no other TopLink process are going on, you can probably get away with initializeAllIdentityMaps() or the intitializeIdentityMap(Class) methods on the session. These will clear the identity maps, having the obvious draw back of removing all object identity which will cause problems with running processes though. It might be better than bouncing the server - it depends on the application. Logging out of the session and logging back in has the same effect of clearing the cache, but with a bit more overhead. Benifit is that running processes will get errors if they continue to use the session, rather than strange behaviior if they continue to use objects after identity is lost.
Another alternative is to run refresh queries on the data you know might be in the cache or that might have been affected. Drawbacks are that this brings them into the cache if they are not already there.
TopLink 9.0.4 is a quire a few versions back, and in newer versions there is cache invalidation. An object marked as invalid is not removed, so object identity is maintained, but on the next query the data will be refreshed - ensuring subsequent queries will get results from the database without having to be told explicietly to refresh or being set to always refresh. Invalidation can be triggered on particular objects, classes or the entire cache or different policies can be set to set a time to live etc.
Except for bouncing the server or logging out of the session, all of the above leave some possibility that a concurrent user will still have a reference to stale data and continue to use it after the process has run on the database. So I hope you use optimistic locking and that your batch process updates the version to avoid other process from overwriting with stale data.
Best Regards,
Chris

Similar Messages

  • How do i Sync the outlines with other databases

    Hi,
    I have got two databases and there is a transparent partition between both these databases with MYACT being the source database and MY06W being the target databse. whenever there is any addition of members to my source database how do i sync my target database using maxl script. Can anyone of you help me out in this regard....
    Regards,
    Krishna

    You could also look into the partitioning synchronisation seeing as you have already developed the partitions.
    You can set outline changes to pass the same way as the data or vice versa and it keeps track of changes in .chg files.
    Have a review of this functionality, it may be the simpler way to complete.
    Hope this helps
    Andy King
    http://www.analitica.co.uk

  • I have lost my itunes and had to download a new one. how do i sync my iphone with out losing any thing

    I have lost my itunes and had to download a new one. how do i sync my iphone with out losing any thing, pics music contacts things like that

    I have lost my itunes and had to download a new one. how do i sync my iphone with out losing any thing, pics music contacts things like that

  • How do I sync my iphone with itunes without losing everything on my phone?

    How do I sync my iphone with itunes without losing everything on my phone?

    Normally, you should be able to sync your iPhone with iTunes without losing anything
    What can happen is that you might have emptied your iTunes library for any reason such as a system restore
    If this is the case, you first need to Import iPhone library to iTunes and then, you'll be able to sync your iPhone with iTunes with no problem

  • How do i sync my iphone with itunes

    how do i sync my iphone with itunes?

    Connect your iPhone to your computer, launch iTunes. Make sure you see the iPhone under Devices on the left side of the iTunes window.
    Then select from the menu what you want to sync.. Music / Apps / Video / Podcasts etc.
    Tunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software
    If iTunes does not recognize your iPhone under Devices, click here.

  • HT4623 how do i sync my iphone with new itunes? I cant find the sync button

    how do i sync my iphone with new itunes? I cant find the sync button

    The same way you would sync with any other version of iTunes.
    Connect the device. 
    Select the device.
    Select Sync.
    In the new version of iTunes, the sidebar is disabled by default.  With a device connected, it will be listed in the upper right hand corner.
    If you want the side bar back, type Cntrl + S.

  • HT1386 When I connect my iPod Touch to a new laptop (Macbook Air) the "Info" tab won't appear and therefore I cannot sync it with my new iTunes. How can I sync this iPod with the iTunes on my new laptop?

    When I connect my iPod Touch to a new laptop (Macbook Air) the "Info" tab won't appear and therefore I cannot sync it with my new iTunes. How can I sync this iPod with the iTunes on my new laptop?

    There is no Info tab in Mavericks
    if you use OS X v.10.8.5 or earlier. If you use OS X Mavericks v.10.9 or later, your contacts, calendars, and other info are updated on your computers and iOS devices via iCloud. For more information, see iCloud Help at icloud.com.
    iTunes 11 for Mac: Sync contacts, calendars, and other info with iPod, iPhone, or iPad

  • How do I sync two ipods with two different IDs on the same computer?

    How do I sync two ipods with two different IDs on the same computer?

    Simply connect them.  One computer with one iTunes can manage multiple devices.  They're tracked by S/N but you might wish to assign them unique names so that you can track them yourself.
    The only minor issue is app updating and purchases while on the computer.  It's necessary to log out and back in to the "correct" ID.  Much easier to do these things from the iPods.

  • How do I sync my iPad with a new iTunes library without erasing all the previously purchased apps & data on my iPad?

    I'm sure this is a common issue, and I've google-searched for solutions but I cannot find a straight forward answer anywhere. I really hope an expert here can help me out.
    I purchased an iPad last year and synced it with my iTunes library on my old PC laptop. Well, my PC laptop harddrive crashed last week and I cannot access anything on my laptop anymore. I did not make a back-up for my PC harddrive either. I know, next time I should make a back-up and I will. But that's irrelevant. The PC is gone now.
    I replaced my PC this week with a brand new Mac Book Pro. Excited about my new purchase, I quickly hooked up my iPad with the hopes of easily transferring and accessing my iPages, iNumbers, and other productivity iPad apps seamlessly to my new beautiful Mac Book Pro. But now I've run into the nightmarish dilemma of not being able to sync my beloved Ipad with my new MAC without getting the warning that basically says "your iPad is already synced with another iTunes Library. You may only sync to one iTunes Library at a time. You will lose all your data if you sync to this new computer."
    Can someone give me a straightfoward answer as to how I can sync my iPad with my new iTunes Library on my new Mac Book Pro without losing any of the apps that I previously purchased? I want to be able to access the apps I downloaded on my iPad on my Mac Book Pro.
    Thanks so much!!!!!!

    how to use iTunes to sync is in the
    http://www.apple.com/support/itunes
    For MacBook Pro community and OS X
    MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro 
    https://discussions.apple.com/community/mac_os?view=discussions
    http://www.apple.com/support/macbookpro
    While it isn't as easy to just use a Mac iDevice as media storage as Android and Windows, you can add documents and such like Word, PDF and others manually in iTunes to have them sync as well.
    http://support.apple.com/kb/HT1386
    http://support.apple.com/kb/HT1351
    They are all there searchable from Bing, Google or every Mac product has a support page.
    http://www.apple.com/support/

  • HT4527 how do i sync my ipod with itunes on a new computer, when i don't have access to my old computer?

    how do i sync my ipod with i tunes on a new computer when i don't have access to my old computer?

    Syncing to a new iTunes library or computer will erase your phone. Only if you back up your phone manually before syncing, you can restore your device from that backup again. A manual backup does not include the sync process.
    Do this:
    Disable autosync in iTunes, connect your phone to your new computer and right click on it in the device list and choose backup. iTunes will backup your device without syncing.
    Transfer your purchases the same way, choosing "transfer purchases" this time.
    When you connect your phone for the first time, all media content will be erased. But you can restore your settings and app data from your manual backup afterwards.
    Don't forget to set up at least one contact and event on your new computer to be able to merge calendars and contacts when you sync the iPhone for the first time.
    Music is one way only, from the computer to your device, unless you bought the songs in iTunes and transferred your purchases.
    There is 3rd party software out there, but not supported by Apple, see this thread: http://discussions.apple.com/thread.jspa?threadID=2013615&tstart=0
    About backups and what's saved:iTunes: About iOS backups
    How to back up and restore:http://support.apple.com/kb/HT1414
    How to download apps for free again:http://support.apple.com/kb/HT2519
    Saving other data is also described here. How to back up your data and set up as a new device
    You can also back up iTunes and restore it on your new computer How to back up your media in iTunes , but the iPhone will be erased anyway during the first sync.

  • How can I sync my calendar with outlook

    This question has a couple parts to it.<br><br>First, I am self employed and use Outlook as my primary calendar. With my BB7 device this syncing issue was easy but I find it so hard with my new Z30.<br><br>My email is a rogers.com email. I have 2 email accounts on my device (personal and business which are both rogers.com emails.<br><br>How can I sync my calendar with outlook and allow changes made in both outlook or the device appear updated on both outlook and my device?<br><br>When I make a calendar entry in my phone it prompts me to use either my groups, my work email, my personal email and then I see BLINK with the name of my office computer.<br><br>What should I be using as my default calendar? The one that says BBlink-Computer name or my business email address?<br><br>Secondly is there a way to sync all my calendar entries with outlook to avoid personal and business conflicts? That is my BBM group calendar entries, personal email calendar entries and my business calendar entries?<br><br>I'm really baffled by all this. I keep being told I need to set up an outlook.com email address. Do I really need to do this? I prefer not to.<br><br>Essentially, how can I make all my calendar entries show on my office outlook calendar so I can see everything to avoid scheduling conflicts and not need to check my device before booking an appointment in my desktop outlook?<br><br>Lastly I have my outlook set to show me Canadian Holidays. How can I get these to appear in my device calendar?<br><br>Please...<br>This has been baffling me since I for my device about a month ago. Any help would be greatly appreciated.<br><br>I have the latest link software on my PC and have the latest OS on my phone.<br><br>Thank you in advance to all that reply.<br><br>Regards,<br>Dan

    I think (and I'll double check) only the BBLink events will sync on a wired USB sync. I'm fairly certain of that.
    You'll need to use your calendar syncing via an EAS email account (outlook.com, for instance, is free) to sync wirelessly. It works great. I use it and was a former tied to the USB sync guy as well... and I thought I was gonna die a painful death without it. I found more freedom this way.
    This explains the process. But I don't think you'll get BBM Groups to sync.
    http://supportforums.blackberry.com/t5/BlackBerry-​Z10/How-To-OTA-Sync-BB10-and-non-BES-Outlook-Overv​...
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I have a new hard drive on my imac  I want to sync my ipad(which has the files I lost when my old hard drive died), which holds the files I lost when my old hard drive died.  How can I sync my ipad with my new hard drive?

    My hard drive on my IMac died, so I have a new hard drive.  I want to sync my Ipad(which has the files I lost when my old hard drive died) back with my IMac. How can I sync my Ipad with my new IMac hard drive without erasing my legacy files on the Ipad at the same time?

    Copy everything from your backup copy of your cpomputer to your new hard drive.

  • My Iphone was sync with Itunes on a computer then this computer broke down and i purchased another one. I was able to extract all the data from the old one. now how can i sync my phone with the new tunes without loosing any data?

    My Iphone was sync with Itunes on a computer then this computer broke down and i purchased another one. I was able to extract all the data from the old one. now how can i sync my phone with the new tunes without loosing any data?

    Yes, windows to Mac too.
    iTunes: How to move [or copy] your music [library] to a new computer [or another drive] - http://support.apple.com/kb/HT4527
    Quick answer if you use iTunes' default preferences settings:  Copy the entire iTunes folder (and in doing so all its subfolders and files) intact to the other drive.  Open iTunes and immediately hold down the Option (alt) key (shift on Windows), then guide it to the new location of the library.
    Windows users see tip at: https://discussions.apple.com/message/18879381

  • How can I sync my iPod with my computer without deleting the songs that are on my ipod

    how can I sync my iPod with my computer without deleting the songs that are on my ipod

    See this post by forum regular Zevoneer on transferring files from the iPod to your computer.
    tt2

  • My laptop died so I've installed itunes onto another PC and my music is all on an external hardive which is connected to the new PC. How can I sync my ipod with the new itunes and get all the music onto itunes?

    My laptop died so I've installed itunes onto another PC and my music is all on an external hardive which is connected to the new PC. How can I sync my ipod with the new itunes and get all the music onto itunes?

    You might consider itunes match for moving CDs you've copied into your itunes library if you dont have a way to use home sharing.
    iTunes match is an optional service offered by apple that costs about $25 a year.  It scans your music library and if it finds music that is already in apple's itunes catalog it'll automatically "unlock"/"store" these in the cloud for you.  Items that it does not find in the catalog it'll upload and store these in the cloud for you and you can download them on your devices.  See http://www.apple.com/itunes/itunes-match/

Maybe you are looking for

  • Runtime error in custom container

    hi experts, i have two custom containers in one screen.In one container i have tree structure and in another one  text editor . in tree structure i have two nodes if i  click on that nodes cursor should go to text area, but the problem is when i was

  • Mac Mini sound goes to zero on its own.

    I have had my mini since 2009. This issue has happened intermittantly since I got it but has happened several times in the last while. The sound output goes to zero. On it's own. I go into system preferences to sound and slide the bar back to my desi

  • Problem in processing internal table

    Hi All, Im facing some problem with an internal table with header. This is Xvbkd with heaer line. Header     100     0000000049     000010                         EXW     China 1     100     0000000049     000000                         CIF     HK 2 

  • Variables with upload()

    hello! like the help demonstrate ist, i've this code var variables:URLVariables = new URLVariables(); variables.date = new Date(); variables.ssid = "94103-1394-2345"; request.method = URLRequestMethod.POST; request.data = variables; referenzen[ladeza

  • BB-RCA (Review, Commenting, and Approval)

    Hi all, My problem is about paralel approval/reviews. I created a template that includes seria approval and then paralel (2 branches) approval. I also assigned demo users. When I initiate review, first user on serial approval gets RCA approval task.