Reading the changes with in the Transaction from Toplink

Typically when we work on a transaction in a SQL Session ( say from SQL*Plus), the DML changes made with in that transaction are visible to the subsequent statements in the same transaction.
How can we acheive the above functionality with a UnitOfWork? Using a query.ConformResultsInUnitOfWork helps, but only when the Toplink Cache is enabled. Can we achieve the same functionality in Toplink when the Toplink Cache is disabled.
Many Thanks in advance for any information on this.

Thanks for the update.
Below is the sample code. It works fine when the Toplink Cache is enabled on the object. But when it is disabled the executeQuery below fires a query to the database and a null object is returned. I disable the cache at the descriptor level using the statements
descriptor.alwaysRefreshCache();
descriptor.disableCacheHits();
myServerSession =(ServerSession) SessionManager.getManager().getSession("test100");
myServerSession.login();
myServerSession.initializeIdentityMaps();
ClientSession clientSession = myServerSession.acquireClientSession();
UnitOfWork unitOfWork = clientSession.acquireUnitOfWork();
// transaction started
unitOfWork.beginEarlyTransaction();
Case t = new Case();
t.setId("Case1");
t.setClaimNumber("ClaimNo1");
// object registered with uow, but not yet committed and not in the database
unitOfWork.registerObject(t);
Case t1 = new Case();
t1.setId("Case1");
//t1 = (Case)unitOfWork.readObject(t1);
//get the same object using the conformResultsinUnitOfwork
ReadObjectQuery roq = new ReadObjectQuery(t1.getClass());
roq.conformResultsInUnitOfWork();
roq.setSelectionCriteria(roq.getExpressionBuilder().get("id").equal("Case1"));
t1 = (Case)unitOfWork.executeQuery(roq); //returns null
//Update some attributes..
t1.setClaimNumber("ClaimNo2");
//Commit all changes
unitOfWork.commit();
The above sequence of statements works from a SQL prompt, but not from Toplink.

Similar Messages

  • Creation of Idocs from the change pointers by the program RBDMIDOC

    Hello,
    I'm Creating Idocs from the change pointers by the program RBDMIDOC.
    The IDOCS Created using the message type HRMD_A are Correct but when i try to RUN RBDMIDOC for message type HRMD_B no Data is selected for distribution.
    All the customizing are similar and i presume that all the change pointers are active (BD50 and IMG->Personnel Management -> Organizational Management  -> Basic Settings -> Activate change documents).
    Can anyone help me with the necessary steps to create this IDOC types.
    Do anyone know if the RBDMIDOC report is the Same for messages HRMD_A and HRMD_B.
    Thanks in Advance,
    Pedro Ferreira

    If the setting is fine, there may be some code in exit or badi for program RBMIDOC. Check the Exit and BADI.
    check the exit EXIT_SAPLBD11_001 and
    check the badi IDOC_CREATION_CHECK.
    Probably there may be some code on these exits which are stoping your code from getting generated.These are the two trigger happen once u execute the RBMIDOC program.for HR, we use RHALEINI program to generate the idoc. but even RBDMIDOC works. These 2 triggere will come with RHALEINI also.
    If there is no code here, Then there is problem in the setting only.

  • I have an apple certified refurbished iPod touch 3rd generatio.  When playing the music with headphones, the music moves from song to song.  When it is on a docking station, it repeats the song.  Any ideas why or how to fix it?

    I have an apple certified refurbished iPod touch 3rd generatio.  When playing the music with headphones, the music moves from song to song.  When it is on a docking station, it repeats the song.  Any ideas why or how to fix it?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             

  • I bought a iphone 4 from a guy on craigslist, I knew about ios 7.0 having the lock thing, but when I met him, his simcard was in the phone, I tested the phone with his simcard in from of him. The phone looked great with no problems and I even got the box

    I bought a iphone 4 from a guy on craigslist, I knew about ios 7.0 having the lock thing, but when I met him, his simcard was in the phone, I tested the phone with his simcard in from of him. The phone looked great with no problems and I even got the box with the accesories, so I knew it was his... I then did the reset on the phone (erase all data... from settings) and it went through and activated and everything was good... I used the phone for about a month with no problems at all, even had my apple ID in the icloud and everything... well ios 7.0.6 came out and I used my computer to restore the phone, because I feel that the cord and computer gives it a better restore, it did great no problems, and when it went to the part where I went to activate the phone, I get a enter your apple id and password to complete activation... Wait... why is this up i thought, I thought I did everything like I suppose to to succesfully switch it to me, the new owner... but now its asking for some C******@yahoo.com.... I only have @gmail.com emails and none start with a C... The guy sold me the phone because he was switching to Verizon, and I tried to call him, and now the number is disconnected... I guess he switched to Verizon with a new number... Now im stuck with a paperweight that costed me $200.00... What can I do at this point... Please help me... I restored it to give it to my Step Son as I just got me the iphone 5... Thank you for ANY HELP in advance... Thank you again.

    I bought a iphone 4 from a guy on craigslist, I knew about ios 7.0 having the lock thing, but when I met him, his simcard was in the phone, I tested the phone with his simcard in from of him. The phone looked great with no problems and I even got the box with the accesories, so I knew it was his... I then did the reset on the phone (erase all data... from settings) and it went through and activated and everything was good... I used the phone for about a month with no problems at all, even had my apple ID in the icloud and everything... well ios 7.0.6 came out and I used my computer to restore the phone, because I feel that the cord and computer gives it a better restore, it did great no problems, and when it went to the part where I went to activate the phone, I get a enter your apple id and password to complete activation... Wait... why is this up i thought, I thought I did everything like I suppose to to succesfully switch it to me, the new owner... but now its asking for some C******@yahoo.com.... I only have @gmail.com emails and none start with a C... The guy sold me the phone because he was switching to Verizon, and I tried to call him, and now the number is disconnected... I guess he switched to Verizon with a new number... Now im stuck with a paperweight that costed me $200.00... What can I do at this point... Please help me... I restored it to give it to my Step Son as I just got me the iphone 5... Thank you for ANY HELP in advance... Thank you again.

  • My macbook air was stolen from checked baggage. I have the box with all the information. Is there a way to disable this device?  Block it from my Yahoo email? Locate it? Any ideas?

    HI, My Macbook Air was stolen this week from my checked baggage.
    I have the box with all the information SN etc.. Is there a way to disable this device?  Block it from my Yahoo email? Locate it? Any ideas?

    If you activated "Find My Mac" in iCloud before the loss, maybe. Otherwise no.

  • Although I set the on/off switch to ON with "change with buttons," the alerts will not change individually.  Any suggestions?

    I'm having issues with the alerts volume control.
    Although I set the on/off switch in settings to ON with "change with buttons", the alerts volume will not change individually.  Any suggestions?

    I don't mean to be rude or anything but did you check to see if it's on hold? I had the same problem, I nearly worked myself to tears trying to figure out why it wouldn't turn off! hope you fix you're problem.
    P.S.-Maybe you should just let the batery run out till it goes dead, hey, then it will be off right?

  • I have a 1st gen ipad. Want to play Candy Crush. Installed app from app store. I hit play now, I see the board then the pad goes back to the start screen (the one with all the apps displayed). Do I need additional apps to run? Thanks.

    I have a 1st generation iPad. Want to play Candy Crush Saga. Installed app from Apple Store. When I tap on the app, I wait a long time while it reads "loading" then I hit "play", I see the board then the ipad goes back to the ipad start screen (the one with all the apps displayed). Is there some additional program I need to play this type of game. I know that space is not an issue as I have very little stored. Thanks.
    Just found my answer. Worked perfectly. Instructions very clear.

    try uninstalling the app and reinstalling it. u shouldnt need to install anything else but the app itself to get it running. if that doesnt work then update ur software and see if that works.

  • HT1267 I have been unable to sync my address book on my IPHONE, trying to sync the changes, I erased address book from my phone. I seem unable to re-establish the address book from my Mac on my phone! Please help!! thanks

    I have been unable to sync my address book on my IPHONE, trying to sync the changes, I erased address book from my phone. I seem unable to re-establish the address book from my Mac on my phone! Please help!! thanks

    Try the .Mac Sync forum - its probably more appropriate to your issue.
    http://discussions.apple.com/forum.jspa?forumID=957

  • The changes made in the WAD web template is not replicating on web browser

    Hi,
    We are using BI 7.0 WAD. Suppose if i create a one web template and if i run it ...it is working fine.
    If i change the present web template and if i do change anything on the present web template and if run this web template it is giving the previous result....it is not reflecting the present changes.
    The changes made in the WAD web template is not replicating on web browser result.
    I went to transaction SMICM, then choose "Goto" from the top menu. From there, go to HTTP Server Cache, then choose Invalidate, then choose Global in system. With this thing also it didnt slove.
    thanks

    Clear your browser cache also and see if the changes are visible.....
    Arun

  • How do the change management for the configuration of the adapters

    Hi all.
    How do the change management for the configuration of the adapters, when i transport the software version component from an development system to production system.
    For example, for to change the url parameters of adapters soap inside the production system. I will need type, the news values in this system?
    Thanks
    Best Regards.

    There is an option to pass all the paramters except those who changes from
    system to system.
    for example,
    if you are reading from a file from the directory: <SYS>\CREMAS_<TS>.XML
    when <SYS> is DEV or QAS or PROD, and <TS> is time stamp,
    you can create channel template that read file with file pattern CREMAS_*.XML,
    this can save you a lot of work, however, parameters that are diffrent in every system, (in this case the directory DEV,QAS,PROD) you must enter manually in every system.

  • Time delay on seeing the changed data onto the webi reports

    Hello,
    I'm new to BOBJ and was hoping someone can help me with adjusting the time delay the reflects the changed data to the Webi reports.
    I have a user that would update a form on our EP.  Afterward, she would have to wait a while before she can see the changed data on our Webi reports.
    can you please tell me the default time lag and show me where I can change it if required?
    thanks.

    Thanks for the reply.
    Our BO is 3.1 SP4.
    We just implemented PBF (Public Budget Formulation) and our forms are running on NWCE server.  It's being written to our backend BW 7.01 SP8 server.  I was told by our users that after she updates some new information on the form, it takes a while before she can see it on the reports.  My understanding was the universe should see the updated data from our BW immediately after they refresh.  Just as you both mentioned.  But according to the users, its not.  there's a time delay.
    I'm going to test this myself if there's a delay.  In the meantime and suggestion would be helpful.

  • How to Track the changes made to the custom table field value

    I want to track the changes made to the custom table field value in table maintenance generator.please help me it is very urgent
    Thanks & Regards,
    Kranti

    Hi Satya,
    These are the steps you've to do.
    1. Enable the change document flag in the data element level for the fields of the tables you want to monitor.
    2. Go to transaction SCDO. Create a new change object, and add your table to this object. After generation, you'll get a function module.
    3. Call this function module in the table maintainence generator screen, after the data is saved to the database table. This function module automaticallly writes the changes, with the old and new values, and the fields that were changed to the tables CDHDR and CDPOS.
    4. You can keep track of the changes made to the table by monitoring these tables.
    Regards
    Anil Madhavan

  • I keep getting a warnin that my pages document could not be auto saved. The file has been changed by another application. Click save anyway to keep your changes and save the changes made by the other application as a version, or click revert to keep the c

    I keep getting a warning stating that the document could not be auto saved in pages. The file has been changed by another application. Then it says click save any way to keep your changes and save the changes made by the other application as a version, or click revert to keep the changes from the other application and save your changes to a version.
    What in the heck does all that mean, and why are they trying to behave like a Windows product or a Microsoft office product. I just don't get it.
    Why is another application changing my documents? It's like they've created a virus within their own programs. It's a pain in the neck and makes no sense.

    I am also having the issue of a warning saying "could not be auto-saved in Pages. The file has been changed in another application. I then hit "save anyway", the warning will go away for a time, sometimes minutes, sometimes hourr, but then the warming reapprears saying the same thing. This is not the case with all Pages documents but it is the case with many.
    Working with a Retina Macbook Pro and current software
    These are newly created documents

  • How to retrive the records with in the range

    hi,
    I want to read the records from the table with in the date range.
    for example select empID,empName from EmpTable where stardat to lastdate
    please somebody help me...
    thanx in advance
    cinux

    hi,
    I want to read the records from the table with in the
    date range.
    for example select empID,empName from EmpTable where
    stardat to lastdate
    please somebody help me...
    thanx in advance
    cinuxhi ,
    Oracle provides BETWEEN ..AND.... operator for such requirement.
    SQL> select empno,ename,hiredate from emp where hiredate between to_date('03-dec-80','DD-MON-RR') and sysdate;
    EMPNO ENAME HIREDATE
    7369 SMITH 17-DEC-80
    7499 ALLEN 20-FEB-81
    7521 WARD 22-FEB-81
    7566 JONES 02-APR-81
    7654 MARTIN 28-SEP-81
    7698 BLAKE 01-MAY-81
    7782 CLARK 09-JUN-81
    7788 SCOTT 19-APR-87
    7839 KING 17-NOV-81
    7844 TURNER 08-SEP-81
    7876 ADAMS 23-MAY-87
    EMPNO ENAME HIREDATE
    7900 JAMES 03-DEC-81
    7902 FORD 03-DEC-81
    7934 MILLER 22-FEB-81
    124 johndoe 28-DEC-05
    15 rows selected.
    Hope this may help you.
    Trinath Somanchi,
    Hyderabad.

  • How do I remove the front housing (the area with all the little holes)?

    I need to remove the housing on the front of my Mac Pro (the area with all the little holes). Something has been spilt down it and I need to get it off so I can clean in all the little holes.

    Changing the Admin Username is WAY too hard.
    Create a new Admin User and password.
    Log out. Log in as the new Admin User you just created.
    Delete the old Admin user. The only way this works is if you created a good Admin user.

Maybe you are looking for

  • Data is not coming in internal table

    Hello Abapers, Data is not coming in my internal table. Plz tell me where I m wrong SELECTION-SCREEN BEGIN OF  BLOCK blk. PARAMETERS:       compcode LIKE vbrk-bukrs OBLIGATORY. PARAMETERS:       billtype LIKE vbrk-fkart OBLIGATORY. SELECT-OPTIONS:  

  • Edit Raw in extrernal editor, will it use the raw image or the JPEG?

    Does iPhoto 06 uses the RAW image when editing it in an external program (like Photoshop) of does it (like iPhoto 05) open a JPEG instead. Opening the RAW file and saving the edited picture back to iPhoto in JPEG would be really handy! But doe it do

  • Help!! Aperture corrupting my itunes XML file

    I am experiencing a weird problem with my itunes music library seemingly being corrupted by Aperture, Apple's image processing application. The file path to my music file is being overwritten in the itunes music library XML file with a file path to o

  • Populate business delegate

    Hi i studied a bit jsf reason is we need to convert an application. however, i have a question. in struts you have forms and actions. that actionClass populates a business-delegate with formbean data. i don't like this approach. (not that businessDel

  • Receiving message that serial number is invalid

    My computer crashed and I'm trying to reinstall CS6 Creative Suite Master collection on a new computer and when I type in the serial number I'm receiving a message that the serial number is invalid.  Could this error be because it is still authorized