RE: Showing a result after a long running query
out of curiosity, how are you doing the server side transaction asynchronously? you can't block on the request thread, so obviously you hurl a prosessing page and close the socket.. but in the back end, how is the request processed? i just finished a credit card processor application where i used meta-refresh in the web page with a timestamp to handle a timeout. but in the initial request i use JMS (java message service) to queue a request to a destinination and that request is handled my a JMS message listener. JMS processes the request and stores/commits the response in the target payment record. -Original Message- From: Jim Tyrrell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 11:25 AM To: '[EMAIL PROTECTED]' Subject: Showing a result after a long running query Hello all, I have looked at the struts docs and all over the net and I have posted to forums at java.sun.com. I want to show a user a page that says I am working on your problem and then when the processing is done I will send to them/display for them the output of the long running database query/process whatever. Note I do not want the working in progress page to be shown again if I hit the back button of the browser. I should just get to the form that I inputted my parameters into to get the process rolling. Does struts support this? Does anyone know how to do this with some other technology? This seems like a common problem and there should be an easy solution or at least you would think so. Thank You Jim Tyrrell -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Showing a result after a long running query
Ahhh, the long running query problem. Yes its a classic. I agree with Michael though. The answer to your dilemma has nothing to do with struts, java, or anything else on the server side of the application at all. This is a limit of web technology in general. I've written a few applications that handle similar opportunities (my friendly name for problems). In one case, the user created downloadable files that were extracted from a DRP system (KBM on AS/400 DB2). The challenge was how to create the file and let the user download it all from the web. What I ended up with was a Crystal Reports-like web application, where the user used a wizard to create the initial parameters that were passed to an asynchronous process that ran in the background and updated the db when it was finished. The user just had to sit back and wait for the extract to finish. They could refresh the page of processing jobs all they wanted, but it wouldn't let them download it until it was finished. You might try creating some summary tables for common long running queries, if you are reporting summary analysis. This technique has helped me eliminate the need for my Crystal Reports-like app on my current project. James Mitchell Software Engineer Open-Tools.org Home Phone (770) 822-3359 Cell Phone: (678) 910-8017 -Original Message- From: Michael [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 16, 2002 2:09 PM To: Struts Users Mailing List Subject: RE: Showing a result after a long running query out of curiosity, how are you doing the server side transaction asynchronously? you can't block on the request thread, so obviously you hurl a prosessing page and close the socket.. but in the back end, how is the request processed? i just finished a credit card processor application where i used meta-refresh in the web page with a timestamp to handle a timeout. but in the initial request i use JMS (java message service) to queue a request to a destinination and that request is handled my a JMS message listener. JMS processes the request and stores/commits the response in the target payment record. -Original Message- From: Jim Tyrrell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 11:25 AM To: '[EMAIL PROTECTED]' Subject: Showing a result after a long running query Hello all, I have looked at the struts docs and all over the net and I have posted to forums at java.sun.com. I want to show a user a page that says I am working on your problem and then when the processing is done I will send to them/display for them the output of the long running database query/process whatever. Note I do not want the working in progress page to be shown again if I hit the back button of the browser. I should just get to the form that I inputted my parameters into to get the process rolling. Does struts support this? Does anyone know how to do this with some other technology? This seems like a common problem and there should be an easy solution or at least you would think so. Thank You Jim Tyrrell -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Showing a result after a long running query
Jim, These comments are really guesses about how to do this rather than knowledge... None of it relies on Struts in particular. You have three pages: Form, Working and Results. On the form page, you submit the data to the Working page which will store the query request somewhere (possibly in the session scope but preferably in the DB) and return a page with an animated 'working' gif. This page then uses a meta http-equiv=refresh to call the Results page. The animated gif of the Working page just keeps on animating until your long query / process returns some output to the browser. In IE 5.5 + Netscape 6 on NT, when pressing the back button it ignores the Working page so you should be fine. HTH, Chris. -Original Message- From: Jim Tyrrell [mailto:[EMAIL PROTECTED]] Sent: 13 February 2002 19:25 To: '[EMAIL PROTECTED]' Subject: Showing a result after a long running query Hello all, I have looked at the struts docs and all over the net and I have posted to forums at java.sun.com. I want to show a user a page that says I am working on your problem and then when the processing is done I will send to them/display for them the output of the long running database query/process whatever. Note I do not want the working in progress page to be shown again if I hit the back button of the browser. I should just get to the form that I inputted my parameters into to get the process rolling. Does struts support this? Does anyone know how to do this with some other technology? This seems like a common problem and there should be an easy solution or at least you would think so. Thank You Jim Tyrrell -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Showing a result after a long running query
Chris's idea seems good. But I think users might find such a screen rather irritating. Some thoughts:- 1 - I've heard of something called 'push' technology. Servers push data out to the client when it suits them. Search web for that. 2 - Alternative. Store on your DB that a request for this user has started but not finished. Start request display the request status enquiry... Request Status enquiry. Using good old struts (so we aren't off topic here) write a page that lists the users uncompleted requests. At the top is a big message Press F5 To Update The Status list This has the advantage that your request the status of the request are using the same data store so are in the same transaction. So when things foul up your list of requests always tells the truth. K/ --- Chris Birch [EMAIL PROTECTED] wrote: Jim, These comments are really guesses about how to do this rather than knowledge... None of it relies on Struts in particular. You have three pages: Form, Working and Results. On the form page, you submit the data to the Working page which will store the query request somewhere (possibly in the session scope but preferably in the DB) and return a page with an animated 'working' gif. This page then uses a meta http-equiv=refresh to call the Results page. The animated gif of the Working page just keeps on animating until your long query / process returns some output to the browser. In IE 5.5 + Netscape 6 on NT, when pressing the back button it ignores the Working page so you should be fine. HTH, Chris. -Original Message- From: Jim Tyrrell [mailto:[EMAIL PROTECTED]] Sent: 13 February 2002 19:25 To: '[EMAIL PROTECTED]' Subject: Showing a result after a long running query Hello all, I have looked at the struts docs and all over the net and I have posted to forums at java.sun.com. I want to show a user a page that says I am working on your problem and then when the processing is done I will send to them/display for them the output of the long running database query/process whatever. Note I do not want the working in progress page to be shown again if I hit the back button of the browser. I should just get to the form that I inputted my parameters into to get the process rolling. Does struts support this? Does anyone know how to do this with some other technology? This seems like a common problem and there should be an easy solution or at least you would think so. Thank You Jim Tyrrell -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Showing a result after a long running query
A solution that was written before we used Struts, but it works for us. We have a process that generates some figures for bank loans. It takes interest rate and loan amount, and works out repayments etc, taking into account lots of other variables. This process can take minutes to complete. In order to speed up our web site, rather than do this online for each person applying for a loan, we pre-generate a deals.xml file containing the figures for various loan amounts and numbers of repayments. This process has been known to take up to six hours to complete. What we've done is to have a bean implement Observable, and then have an Observer bean that is notifed each time one of the calculations completes. We have a web page that keeps refreshing itself, and that gets information from the Observer and prints out progress to date each time. We also have a cancel link, that tells the Observable object to stop calculating. Hope that's of interest... Tim. -Original Message- From: Chris Birch [mailto:[EMAIL PROTECTED]] Sent: 14 February 2002 15:56 To: Struts Users Mailing List Subject: RE: Showing a result after a long running query Jim, These comments are really guesses about how to do this rather than knowledge... None of it relies on Struts in particular. You have three pages: Form, Working and Results. On the form page, you submit the data to the Working page which will store the query request somewhere (possibly in the session scope but preferably in the DB) and return a page with an animated 'working' gif. This page then uses a meta http-equiv=refresh to call the Results page. The animated gif of the Working page just keeps on animating until your long query / process returns some output to the browser. In IE 5.5 + Netscape 6 on NT, when pressing the back button it ignores the Working page so you should be fine. HTH, Chris. -Original Message- From: Jim Tyrrell [mailto:[EMAIL PROTECTED]] Sent: 13 February 2002 19:25 To: '[EMAIL PROTECTED]' Subject: Showing a result after a long running query Hello all, I have looked at the struts docs and all over the net and I have posted to forums at java.sun.com. I want to show a user a page that says I am working on your problem and then when the processing is done I will send to them/display for them the output of the long running database query/process whatever. Note I do not want the working in progress page to be shown again if I hit the back button of the browser. I should just get to the form that I inputted my parameters into to get the process rolling. Does struts support this? Does anyone know how to do this with some other technology? This seems like a common problem and there should be an easy solution or at least you would think so. Thank You Jim Tyrrell -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This e-mail and its attachments are for the use of the addressee only. It may contain information that is legally privileged, confidential and exempt from disclosure. It is not a contract, and prices, data and other information are not warranted as to completeness or accuracy. Any comments or statements made herein do not necessarily reflect those of PanCredit Systems Limited. If you are not the intended recipient you must not copy, distribute or disseminate this e-mail or attachments to anyone other than the addressee. If you receive this communication in error please advise us by telephone at once. PanCredit Systems Limited Tel:+44 113 250 0260 Fax:+44 113 250 0621 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]