RE: Weird thread/security problem

2001-07-26 Thread Michael Weissenbacher
that is a simple problem of understanding: there is only one servlet object that is used by multiple threads. by having this in mind, your object variables are also shared, as would be static variables... -Original Message- From: Sam Joseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, July

Re: Weird thread/security problem

2001-07-26 Thread Sam Joseph
Hi Michael Weissenbacher wrote: that is a simple problem of understanding: there is only one servlet object that is used by multiple threads. by having this in mind, your object variables are also shared, as would be static variables... Francis Pallini wrote: Application-wide data (within

Re: Weird thread/security problem

2001-07-26 Thread Dmitri Colebatch
Application wide content should be stored in the context, not as servlet variables. This is because if the servlets are load balanced across multiple jvms, or if servles implement the SingleThreadedModel then tomcat will need to ensure that all instances of servlets on all jvms share the one

Re: Weird thread/security problem

2001-07-26 Thread Craig R. McClanahan
Tomcat runs multiple individual threads per *request*, not per *user*. 99.9% of the time, this kind of thing is caused by application programming errors related to threading. For example, if you use an instance variable in a servlet to store information specific to a particular request, and

Re: Weird thread/security problem

2001-07-26 Thread Craig R. McClanahan
On Thu, 26 Jul 2001, Sam Joseph wrote: I guess I have two options, either make the servlet implement the SingleThreadModel interface, or create some new classes to encapsulate the appropriate data, and either store that in the session or in some instance variable like a hashtable ...