You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Karim D. Saloojee" <kd...@yahoo.com> on 2002/03/26 09:16:12 UTC

ActionServlet - thread safe instance variables

Hi

As a newbie to Struts (coming from a Turbine background) I was hoping
someone would clarify the design issues with having instance variables in
the controller servlet.

Does this not pose thread safety issues? If so, how does one deal with them?

Turbine took the easy way out and declared only local (method) variables,
thus ensuring a thread safe controller servlet.

Is the reason why ActionServlet uses instance variables because in theory
one could have two ActionServlet instances with different url patterns in
the same webapp? Is this a common practice or is it not recommended?

I have not had any luck finding answers to this question in the mailing list
archives.

Could someone point me to a resource where I could find the information I
need or even give me a brief explanation.

Thanks in advance
Karim


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>