-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chuck,
On 3/2/2009 5:11 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: session.isNew() not thread safe? >> >> You can't even throw an object into the session to be >> used as a monitor > > Actually you can - you just need to do it with an HttpSessionListener > when the HttpSession is first created, before any additional threads can > get their paws on it. That's a good point. I hadn't really thought of that for some reason. You could put something in there like SYNCHRONIZATION_MONITOR and then use it all the time. If you needed another object for distinct synchronization (say, some other process that shouldn't be synchronized with the rest of your stuff), you could use that monitor to safely create another monitor. Thanks for the suggestion. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAkmsXYIACgkQ9CaO5/Lv0PCLTgCY7MHB6PWOMuM/fg3Ly2YmCJaS mACgji3UBfSeJQsTsENSUMwCB0P2IHQ= =itdt -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org