Try to give thread priority.

Are u using?
Wait and notify ?

Try using wait () and notifyAll

Can you send me the code?
Why are u doing it  ? What is real need to do such thing?

Vaneet

-----Original Message-----
From: Brij Naald [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 22, 2005 1:39 PM
To: [email protected]
Subject: One request per session


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]



Vaneet Sharma
executive manager       
iDeasTank Limited       
an iwg business
dolphins' court po 388
valletta, m-malta/europe
mobile:  +356 9943 8263
skype:   CALLVANEET
fax:     +356 9952 8888
phone:   +356 9942 8888

[EMAIL PROTECTED]
call me on www.skype.com - my ID is CALLVANEET

Want a signature like this? - www.plaxo.com\signature

iwg is a global e-mobile company creating, building and growing new businesses. 
 iwg founders are pioneers in creating multi-billion dollar mobile and Internet 
businesses in Europe, Asia and the US.

www.iWG.info
www.countryprofiler.com/iWG
www.visitmalta.com
www.mfc.com.mt


Privileged/Confidential Information may be contained in this message.  If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message and kindly notify the 
sender by reply email.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to