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
-
I am unable to clear my recent call list. Both the 'missed' and 'all' numbers appear even after deleting. It was happening on ios 7.0.4 and is present on 7.0.5. Any help.
No.
You got 2 more basic troubleshooting steps left before you make an appointment with the Apple genius bar for an evaluation:
Restore from backup
Restore as new
http://support.apple.com/kb/HT1414 -
Hello, I have had to restore my iphone 4 to its factory setting as I had missed a number of updates and my computer was not recognising the device. I have now lost my contacts icon on the iphone and cannot find it even after syncing to my computer.
Would you know how to resolve this issue?
Many thanks.
NilouI have now lost my contacts icon on the iphone and cannot find it even after syncing to my computer.
Would you know how to resolve this issue?
It's a pre-installed app and therefore cannot be deleted so you may have inadvertently moved it onto a screen or into a folder, check the utilities folder as this is a common one for it to disappear into. Check all screens and folders and do a search in Spotlight, it will tell you if the app it still on your iPhone but unfortunately not where it is. If you find it on one or your screens or in a folder, press the icon until it wiggles and then drag it back to where you want it. Alternatively you can reset your home screen in Settings>General>Reset>Reset Home Screen Layout. -
My iTunes won't update, it starts to install then just says it can't. I decided to try uninstall it but it won't even uninstall anymore, there is some type of ERROR going on. I tried to just install iTunes from the website and that won't even work. I'm using a Windows Vista.
Hi there,
I've got a couple of articles that may help you out. This first one goes over how to properly remove and reinstall iTunes.
Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
http://support.apple.com/kb/HT1923
This next one goes over some of the troubleshooting steps if you are having issues reinstalling iTunes.
Trouble installing iTunes or QuickTime for Windows
http://support.apple.com/kb/HT1926
Hope that helps,
Griff W. -
Why are the apps on my IPad scattered across the whole thing and when I open them they turn to little rectangles in the corner of the screen and I can't even use them or tap on anything. Also when I turn my iPad it doesn't flip the screen over.
Hi The next thing to do is to Restore back to Factory Settings this will get rid of any bugs . After Restore use same Apple ID /Password then you should get all your Apps & data back If you still have this problem make an Appointment at Apple Store . Cheers Brian
-
When I started my iMac today, it started beeping like an alarm horn. I shut it down, and held the startup button a little longer to get it to start. Shortly after starting up, a dark 'film' slowly comes down over the screen and I get a message saying I have to shut down the computer. I've tried to start from the disk, and before I can even run a repair off utilities, it happens again. What's up? Am I screwed? HELP!!
What you are seeing is a kernel panic, often but not always connected with a hardware or peripheral issue, so, unplug everything except mouse and keyboard, reboot and hold the shift key as soon as your hear the chime, continue holding it until you see the Apple Icon and spinning progress indicator, then post back.
It will take noticeably longer than normal to start. -
only half of the body just below the camera and steel side of camera side is getting heated up just after 10 , 15 mins of usage i my iphone 4 is it normal...as earlier the body was not heating up even after 2 hours....the problem started after updating to 6.1.2
iPhone 4, iOS 6.1.2Hi, did you ever solve this problem?
My 1 year old -- ha! one month out of warranty -- iPhone 4 has been having a nearly identical problem over the past few days.
It started by dying completely so I had the battery replaced, thinking it was simply battery issue.
It then worked again for a moment but started doing exactly what you describe, going through a reset cycle (longer than 30 seconds but who's counting). And it felt quite warm.
Did hard reset, plugged into wall charger and MBP USB but the new battery wouldn't even get a full charge (a whopping 92% after nearly two days). It would even lose battery when plugged in if I opened an app. And all the while plugged in, if I left the phone on, it would cycle through these resets. So I turned it off to try to charge it.
Now suddenly, it's dead again. Totally black, and hard reset does nothing. Up until two days ago there was nothing wrong whatsoever with this phone! And I hadn't even installed a new app that could be the root of the issue. No idea whatsoever what caused this.
Any help would be much appreciated!! -
i want to turn my macbook air off. the shut down button already appeared but the mouse/cursor just hang and won't work. even after pressing the enter button to shut my mac off won't work. what will i do?
This is not a reply. I just want to elaborate on this problem.
My computer freezes occasionally when it is used after being sleep for a while. The spinning ball appears and everything is totally disabled. Nothing on the keyboard works.
The mouse moves, but does not work.
The only solution is to turn the power off and on (losing all data in open applications.)
I kept the System monitor running on the side to find out which program was running when the computer froze. The Monitor as well as all other applications froze, but the data showed:
Firefox 18.4%
Activity Monitor 0.9%
Firefox Plugin 0.2%
This is all the information I have. By the way, I am using iMac with OS 10.6. -
I got a new Ipad 2 and I am trying to get it work in vain. I have downloaded the iTunes on my PC, but even after executing the program nothing happens to the IPAD. I still get the image of the USB cable and the iTunes logo. What am I doing wrong?
You know that you have to connect the iPad to your PC with the cable that came with it - and then iTunes should start automatically and it will guide you through the set up process?
If you have already tried to connect the iPad - and you have launched iTunes - and you still have no luck - reboot your PC and then begin the process again. -
I'm getting the message "itunes cannot read the contents of the iphone" and asking me to restore to factory settings when attaching to PC. I have songs downloaded from itunes on my PC, and songs and apps downloaded to the iPhone from iTunes too. How do I restore to factory setting AND retain the tunes and apps on the phone or get them synched? The iPhone is working fine
iPhone4 v4.2.1 (8C148) (can't update this till above sorted)
iTunes 10.2.2.12
Basically, if there is some way of downloading a 2nd copy of tunes/apps already purchased I can resolve my issue, but I don't know if this can be done. Ican't find a FAQ on this. Thanks in advanceSee Erase your device Here > http://support.apple.com/kb/HT4137
Go to Settings > General > Reset > Erase all content and settings
Also... See the wjosten post here...
https://discussions.apple.com/message/20294697 -
When ever I customize the toolbar, the open new tab sign that is the + sign near the lastly opened tab in the tab bar disappears and it remains so even after restarting Firefox. This happens only after updating to the new version 4.0.1 it never happened in the older versions 3.x.xx- checked it thrice. Thought it could be a bug and i didn't know where to report also don't have time and patience to search for the appropriate page so i'm reporting here for improving my favorite browser.
You can find the New Tab button showing as a '+' on the Tab bar.<br />
You can open the Customize window and drag the New Tab button from the Tab bar on another toolbar and it will become a regular toolbar button like the New Tab button that you have in Firefox 3 versions.<br />
If you want the New Tab button at the far right end of the Tab bar then place a flexible to the left of it.<br />
*New tab toolbar button: https://addons.mozilla.org/firefox/addon/new-tab-toolbar-button/ -
my wireless mouse is not working at all. I have changed the batteries and still nothing, not even a flashing green light. I am using someone else's computer to ask these questions as I now can't use mine. Help!!!
I just had the same problem. And I found the solution, on Youtube.
The problem is that these ******** at apple designed the battery compartement, the distance between metal contacts too big.
That means the batteries plus or minus poles are not touching the corresponding contacts in the mouses battery compartement.
Most likely the battery doesn't get pushed up to touch the plus contacts.
I used a fingernail to push the battery up and tadaa, the green LED came on.
The guy in the Youtube video just put some folded aluminium foil under the minus poles for bridging the gap.
See here, "How to fix the Apple Magic Mouse!":
https://www.youtube.com/watch?v=7vlDEVfV45s
Hope this helps.
<Edited by Host> -
I cannot send emails with pics using the stock email app on my new Droid Turbo, it holds them in the Outbox and won't send even if I move to Inbox and resend
First check to make sure you have data turned on and not just Wi-Fi. From reading your question you seem to be saying e mail is working just not attached photos. What size are the photos as some HD photos can't be sent. Your camera may be set at a very high picture size and you can go to settings and lower the size and that may solve your mailing problem.
-
iCloud deletes the contacts and calendar entries from Outlook 2010 on my PC, when it syncs. with my iPad. How do I retain the contacts and calendar entries on my PC.
I should mention that i have NOT upgraded to iOS 5 on the 3GS and don't want to. Therefore, no iCloud on the phone.
-
I'm new to the iCloud and Mac in general. After experiencing a hard drive that went out of the blue, I lost everything. I wanted to use the icloud to back my documents up. I went into the iCloud under settings but it only shows my iPhone and daughter's iPod. How do I get my Mac to back up too? Is there something I need to use to have the documents back up?
You cannot back up your Mac to iCloud. Even backing the whole thing up to another online service would be dubious because it would take a very long time. You should buy an external hard disk and back up to that - even better, buy two and use one to make a Time Machine backup and the other to clone your Mac from time to time, thus giving you a backup from which you can boot in an emergency.
If you wanted to back up a suitably sized selection of data to an online service there are a number of third-party methods available, some of which are examined here:
http://rfwilmut.net/missing3
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
-
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