On Mon, Dec 20, 2004 at 09:33:11AM -0500, Kurt Overberg wrote:
: I have a situation in my webapp where the user (administrator) can 
: 'Publish' items.  I need to make it so only one person can 'publish' at a 
: time.  Would this be a valid use of 'isThreadSafe'?  Would it make user #2 
: wait until the page had finished processing for user #1?  It would save me 
: from writing a bunch of messy locking code.  Thanks!

What sort of "messy" code would that be?

I've seen people use a database as a sort of distributed semaphore.
This not only spares you from using isThreadSafe (which, IIRC, died in
servlet spec 2.4/JSP 2.0 along with SingleThreadModel); it means your
app can scale to multiple app servers without you touching additional
code.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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

Reply via email to