The example is thread safe. Methods don't need to be synchronized if they
aren't manipulating a shared object such as an instance variable. If your
action class doesn't have any instance variables and it only deals with
local variables and parameters then there is a good bet that it is thread
safe. 

Hal

-----Original Message-----
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 5:09 PM
To: [EMAIL PROTECTED]
Subject: Is the struts example itself is multi-thread safe? 


Hi,

In "A Walking Tour of the Struts App", the author has mentioned that "There
is only one object for each action (URI), so your action objects must be
multi-thread safe". Is the example itself is multi-thread safe?
I am asking this, because are several actions here, but not one of them use
"synchronized" statement.

Maybe I am missing something...

THANKS in advance.

Maya

Reply via email to