Retain the entityState and postState of entities even after calling commit

Dear all,
I am using view objects based on programmatic entity objects in my application for which data is populated from an array using populateRow().
I need to update the newly created/updated/deleted rows in this EO into the database using a stored procedure.
The stored procedure needs the input as an array of only those records that are created/updated/deleted with indicators of whether each row in the array is inserted/updated/deleted.
I have exposed a client interface method in the view object Impl class that calls the dbTransaction().commit() first and then calls the stored procedure.
In the doDML(), I am constructing the array and keeping the values in a page flow scope which is then accessed in the voImpl method.
In case if an exception occurs in the business logic inside the stored procedure, the data will not get posted in the database and the exception is displayed to the user in the UI.
After calling the stored procedure, I am clearing the page flow scope irrespective of whether the data has been posted to DB or not.
Consider the scenario,
I have updated 2 records. Of these, I've updated one of the records with wrong values. As per my logic, on calling the save method, doDML() will construct the data array for these two records.
Inside the stored procedure, the wrongly updated row is identified and exception is raised and the data will not get posted in the database.
Now, on getting the exception, I update the worngly updated record with proper value.
On calling the save method again, my doDML() is constucting the array with the currently updated record alone. But actually I need all the records (2 records in this case) that were modified.
My understanding is, since I've called the commit() action, all the records that make my transaction dirty gets updated as status_unmodified subsequently.
Hence, on calling commit the second time, only one record will be in modified state and that record alone is getting constructed in the array.
If I am correct,
1. Is there any way to make all those records with their status as they were before calling the commit.
2. Should I construct my array in some other method instead of doing it in doDML().
Thanks in advance.

You may want to try calling setClearCacheOnRollback(false) and rollback instead when you get the exception from the stored procedure. I still haven't understood where the commit is done...
You may want to consider using an Application Module variable to store your list if this helps.
Cheers,
Nick

Similar Messages

Maybe you are looking for

  • File Saved Size is Twice Normal Size -  Photoshop CS3 OS 10.6.7

    I don't know what happened to make a couple of Photoshop files about double normal size on disk. I've been using Photoshop for a long time so I know how big the files should be - they're multilayered files which are normally about 250MB but are aroun

  • Invoice still not paid as of 6/24/08?"

    We are still having problems getting invoices paid.  In the FBL1N screen of SAP invoice B22818 for example the document date was 6/1/08.  The posting date was 6/2/08.  However, for some reason there is another date of 6/12/08 for the entry.  What I n

  • Oracle XE 11g R2 - Cannot Reach Homepage

    Hello Everyone, Try as I might, I cannot get the Oracle XE 11g Release 2 homepage to come up. This is a fresh install. I've read numerous forum and blog posts and still cannot find a solution. Here's the following pertinent information from what I ca

  • HELP me TO DOWNLOAD My MAC OS X Lion

    hey there, I bought mac os X lion last day , but I didnt noticed to this things that my internet conecction is not well done high speed one, so I cant download mac os X lion at the same time with app store OS X lion installer app, So I need a direct

  • Spam from my ipad ?

    A few days back I received a mail from one of my contacts with the subject " confidential document" , I don't know what I was thinking but I opened it on my ipad mini. I immediately realized that it was a spam mail , I closed it and sent a note to th