Ajax response takes time and status is 503

Posted by Suresh S on Stack Overflow See other posts from Stack Overflow or by Suresh S
Published on 2010-06-16T15:23:48Z Indexed on 2010/06/16 15:52 UTC
Read the original article Hit count: 220

Filed under:
|
|

guys, i have a html page where onclick of a button a ajax request is sent to server , the request calls a jsp page which runs an oracle procedure.The procedure runs the logic and places it in a temp table . once procedure is completed , the values are returned to the client by selecting values from tmp table. as the response is too late . the data is not received at the client side.

solution: i tried to run the procedure in a separate thread using a ajax call. when the procedure is completed a global flag is set to indicate that the data is generated. if the response is 500 , a second ajax call invoked by timeout function after 10000 ms . the second call checks the global flag ,if true then reads from table and sends the response. if not again a timeout is set at the client side. this solution is not mature enough. , as the procedure may take long time to respond.

please let me know a good solution for this problenm?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about AJAX