> From: Marziou, Gael [mailto:[EMAIL PROTECTED] 
> Subject: RE: Multi processor issue
> 
> I propose to implement a bug catcher in Tomcat ParameterMap by storing
> the thread that called the constructor amd then check its invariance
> when calling other methods (e.g. isLocked) of this class, if the
> invariance is violated we will throw an exception.

>From a purely theoretical perspective, it is valid for two threads to
call getParameterMap() (and therefore isLocked()), once the ParameterMap
has been established.  Probably not a concern in the real world.

Since the only call to ParameterMap.isLocked() comes from
Request.getParameterMap(), I'd put the saving of the calling Thread
object in a synchronized block there, along with a check to insure no
other thread had been there.  In addition, I would also save the array
returned by getStackTrace() (assuming you're running on SE 5) to provide
some context for the call.  This would also help to widen the window and
hopefully cause the problem to occur sooner.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
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