Do not use a browser for such testing. You have no way of knowing when the
browser releases connections.
Use perl's LWP or wget in different processes to similuate multiple requests.
-Tim
Brij Naald wrote:
Hi,
i'm trying to test a locking system for servlets. I've made a chain of
servlets which include each other:
Servlet1 --> Servlet2 --> Servlet3
When Thread1 is in Servlet2, it puts a lock on Servlet1. That way if
there is a new Request, this request (on thread2) wants to start with
servlet1. Since there is a lock on it, it has to wait.
When Thread1 gets into servlet3 it releases the lock, and Tread2 can
start with Servlet1.
This is what i've made already. (if there are any questions about this
already, please ask!)
Now I wanted to test it like this:
To test the lock, a thread in servlet2 sleeps for 20 seconds. So thread1
first executes servlet1, then goes to servlet2, waits for 20 seconds and
then goes on to servlet3. While thread1 is in servlet2 i have the time
to start a new request.
Now what do I see: The first request starts with servlet1, then goes to
servlet2 and starts waiting 20 seconds. Now I push on the
'previous'-button of my browser, and make a new request. This second
thread must wait since servlet1 is locked. This works. But now the
problem: when the first thread has waited 20 seconds, it doesn't go to
servlet3 anymore.
--> Is there somekind of functionality that only one request per session
is allowed or something like that?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]