hi, i have a webapp with one WebButton
in this button i have a lot of code that change data in a database
suppose that this code employ 5 minutes for complete esecution.
i connetc to my webapp from browser at 10.00 am
i push webButton (and at 10.00,1 the code contained in this button is runned)
if my internet connection go down at 10.02, the execution of webButton code stop or not ??
sorry for my bad english.
I wouldn’t count on it. It depends a lot on what your app does, but if you have something that runs that long, I’d suggest putting it into a thread to isolate it from the session during processing, so if the Session goes away, it will definitely finish.
my webButton manipulate data on database; read , calculate, write, reread, remaniplate, rewrite, then show the result and close database.
but if my connection go down, and the code is not executed i can’t stay relaxed …
and i can’t use thread for every button’s code that manipulate data in database…
i can begin transaction when routine start but if routine stop (because the net go down), app can’t execute roolback…
If the process that the button executes doesn’t return almost immediately, the right course of action is to use a thread anyway. Otherwise you risk slowing down the app’s response time for all of the other users as well.