Hello struts users,

The issue of thread safety bugs me. It seems as though it is
standard practice to write servlets thread-*unsafely*. The
odds of it ever being a problem are slim, but still.

It seems to me that form bean setters (and probably getters)
should be synchronized. I found the following two quotes
from Craig McClanahan. To me, they seem contradictory.
However, even if we use the "that's going to be real
unusual" standard, shouldn't we synchronize setters, since,
in theory, it's the only thread-safe thing to do?

http://archive.covalent.net/jakarta/struts-dev/2000/06/0117.xml

Craig:
 "For the form beans, you are creating them in a particular
 user's session. If the user does two submits to the same
 form at the same time you might have overlapping setXxx
 method calls going on, but that's going to be real
 unusual."

http://archive.covalent.net/jakarta/struts-user/2001/03/0013.xml

Craig:
 "It is surprisingly easy to have multiple requests active
 at the same time for the same session."


Noah


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

Reply via email to