tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Knauf" <>
Subject RE: One user -> 2 parallel threads
Date Tue, 21 Nov 2000 06:14:45 GMT
Well, that's not entirely true.

'isSingleThreaded'  sets the generated servlet to implement 
SingleThreadModel.  This does not actually cause subsequent requests to be 
queued.  It causes another instance of the servlet to be instantiated for 
each simultaneous request.

This is generally considered to be 'a bad thing' (tm).

The only thing that is singly threaded in this is the servlet class 
itself.  All other objects accessed  (e.g. session/context objects) are 
accessed in a multithreaded manner.

I suggest that your client side fix might involve using the onDblClick 
javascript event handler (possibly configured to simply do nothing).

Aaron Knauf
Systems Integrator
Genie Systems Ltd
Auckland, New Zealand
Ph. +64-9-573 3310 x812

Steve Toth <>
21/11/2000 06:06
Please respond to tomcat-user

        To:     "''" <>
        Subject:        RE: One user -> 2 parallel threads

You could also make the jsp singlethreaded.

<%@ page isSingleThreaded="false" %>

This will tell tomcat that the jsp should only be in one thread, multiple
requests will be queued up. thus the jsp should be FAST (no IO/DB access).
Same as implementing the servlet Interface SingltThreadModel.

 -----Original Message-----
From: Till Gartner []
Sent: Saturday, November 18, 2000 7:32 AM
To: ''
Subject: AW: One user -> 2 parallel threads

You're right: We checked the Apache log and the user just double clicked.

But Netscape seems to have a bug that cannot be handled with the 
If you have your security settings in a way that he comes up with a
messagebox before sending out POSTs, he sometimes "overhears" the first
click in that box and only reacts on the second click. Strangely he then
also sends out 2 requests.

How does the JavaScript to catch this kind of doble clicks look like?

Thanks for your help ona rainy saturday,
-- Till.

-----Urspr√ľngliche Nachricht-----
Von: []
Gesendet: Samstag, 18. November 2000 16:21
Betreff: Re: One user -> 2 parallel threads

So, in those cases, I've built JavaScript logic running in the browser (in
the HTML file) that will set a boolean flag to block the second (and
subsequent) click(s).  Is there a simple way to handle this server-side (I
can imagine the hard ways!), or does anyone know that the client side 
has holes I have not witnessed?


<< Undoubtedly the user clicked twice on the button or link and
 actually created two requests.>>

 > Hi mail list,
 > we encounter the following problem with Tomcat. From time to time a
 > request seems to be handled by two threads from tomcat in parallel. Our
 > log from java servlets shows entries of different threads doing the 
 > task for the same user, wich are just some milli secs apart. >>

View raw message