On 09/04/2008, Vannel <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a performance issue i'm not sure how to solve effectively. Here's my > situation.. > I'm trying to run INSERT/UPDATE/DELETE statements and using their return > values as confirmation that the statement has been duly completed by my db > (Oracle). > > --- > > e.g. > <update ...>UPDATE table1 SET field = #value# WHERE idfield = > #idvalue#</update> > > int confirmation = update(...) > //upon getting confirmation, send out an alert to the user > if (confirmation > 0) {...send out alert...} > > --- > > the problem lies here. if the user (for example) refreshes his UI > immediately after sending the UPDATE, a small fraction of the time, the > change will not be reflected yet. unfortunately, my program requires me to > have 100% assurance that the user will be able to notice the change. > > does anyone have any suggestions? i suspect it might be an issue with how > Oracle handles SQL since i am able to get a positive return from it. could > it be an issue with how iBATIS works? > > -- > View this message in context: > http://www.nabble.com/Transaction-Performance-Issue-tp16583884p16583884.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > >
I'm not sure exactly what you mean by "sending out an alert" - but maybe you could get around your problem by setting the text to be displayed to "CONFIRMATION PENDING" or somesuch before the update is executed, so that if the user refreshes his UI (a browser, I'm guessing) before you're ready, at least they will get some indication that what they can see isn't the whole story. Unless you've got some server-push capabilities, I guess there's always a risk that a page will be rerendered before you're ready. I doubt it's an iBATIS issue. Sounds more like "annoying users doing things in the wrong order to me" :). Alistair.