You have to be the owner of the object you are trying to wait and notify
using. If you are using wait() or notify() then you probably need to
synchronize the method that you are in when you call these. If you are
using an object (like myObj.wait() and myObj.notify()) then you need to use
synchronized(myObj) { myObj.wait();} and synchronized(myObj)
{myObj.notify();}.
(*Chris*)
----- Original Message -----
From: Srinivasan S (Systems Engineering Group) <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 15, 1999 6:02 AM
Subject: Threading problem
> Hi people,
>
> I am herewith attaching my connectionpool code and the code that
> implements it. I need to make the user to wait till he gets his
> connection from the pool and to notify if a connection is avaiable.
> Everything is updated perfectly but when i am notifying i am getting the
> following error for a single user itself i tried with 3 users accessing
> that stil i am getting that error.
>
> java.lang.IllegalMonitorStateException : current thread not owner
>
> Please help me to solve this error how shall a make user wait if he doesnt
> have his connection and to notify him if a connection is got.
>
> Thanks
> Srini
>
>
>
#-----------------------------------------------------------------------#
> #
#
> # "ARISE AWAKE and stop not till the GOAL is reached"
#
> #
#
> # [EMAIL PROTECTED]
#
>
#-----------------------------------------------------------------------#
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html