> From: Maurice Yarrow [mailto:[EMAIL PROTECTED] 
> Subject: Synchronize wrapper for session obj attrib get/set
> 
> For those not wishing to migrate at this time to 5.5.12
> (in our case, from 5.0.28 and jdk 1.4) would the following
> be sufficient for preventing deadlock access of the session
> objects ?

No.  As Wade C and others have pointed out, there are numerous
unsynchronized get/set invocations within Tomcat itself, and these have
the potential for unexpected behavior.  (Note that the problem is not
deadlock, but infinite loops and erroneous results.)

Possibly the easiest thing to do is edit the StandardSession.java file
and change the type of the attributes field to HashTable rather than
HashMap, then rebuild the associated jar.  The places that already
synchronize on attributes can be left alone, since redundant synchs are
allowed and have minimal performance impact.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to