Christopher Schultz-2 wrote:
> 
> I assume you mean that you want to cancel an already-running thread /for a
> given user/ if a
> second one comes in.
> 
 
Yes, that is correct - I'd like to process a single request at a time per
session. The reason for that is that I have to maintain some state
information in the session. This state information is then used to
recieve/send dynamic updates to the client via ajax requests.

If I let two requests run together then I might have a situation where the
second request finishes and sends a response, then the first request
processing finishes and updates the session state. In this case the user
will see data on screen for the second request, but the server will have
state for the first request.  

So this "single request at a time per session" scenario will only apply to
the requests that modify the session state. 

Your reply has some valueable pointers, could you recommend any references
for the subject of threading and perhaps the way it relates to tomcat? 

The way I understand is that I should not be touching the container provided
thread(request thread), but instead spawn a new thread once the request
comes in and manage it with Filter that you proposed.

Thank you for a quick reply,

keif.


-- 
View this message in context: 
http://www.nabble.com/Interrupting-tomcat-threads.-tf4113604.html#a11698350
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to