A couple of points:

It sounds like you would be changing a "transport" level function that would need to be handled on the app level. If you need to write javascript then it should correspond to servlet code. If you need to write browser software it should correspond to HTTPServlet.

I have handled what you need a few times. Search the list, I think that there was an 'easier' way to do this then what I will suggest.

At the start of the operation spawn a thread into the background and pass the application and sessionID.

When the the new thread finishes you can set a flag in the session.

Use whatever mechanism you like to call a "result" page. In that result page check the session variable. If its set then show the result, if not then send the command to wait or refresh in 5 sec....

Thanks,
-Aaron Held

James R. Phillips wrote:
I need to extend ThreadedAppServer.RequestHandler.handleRequest(),
and would like to discuss doing so before embarking on the work.

As Webware is currently written a browser or XML-RPC request must
wait until all application-side processing of that request has
completed before receiving a finished result, due to the 		strmOut.close(), conn.shutdown(1), and conn.close() method calls
at the end of handleRequest.

At http://zunzun.com, I have processes that can possibly take a
couple of minutes to complete.  What I would like to do when
handling some of the browser requests is to immediately send
the user a status page, call the methods above, and continue
processing.  The status page would either refresh itself
every 5 seconds or so, or using Javascript and the vcXMLRPC
library make XML-RPC calls every so often - in both cases,
a different thread would make a status page.  I have the user's
IP address for use in distinguishing different users on different
threads.

My thinking is that I'll need to add a new method call to the
ThreadedAppServer to encapsulate strmOut.close(), conn.shutdown(1),
and conn.close() so I can call them at will, and a flag in
RequestHandler I can set so when the transaction completes it
will not call these.

Any comments, ideas, suggestions, or questions?

     James Phillips
     [EMAIL PROTECTED]



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to