On Thu, 2003-10-16 at 06:31, Vikram Goyal wrote: > No. It is not thread safe. It delegates it to the super class FileUploadBase > which uses the sizeMax variable, access to which is not synchronized.
Ok, thanks for pointing that out. After peeking a bit into the code myself, it looks like it would be pretty safe to call parseRequest() from multiple threads in parallel. As long as one doesn't call any setters. > Probably the best bet is to keep in the ServletContext. After checking the code, I concluded that creating a DiskFileUpload instance for each request wouldn't be much work or overhead. All the action takes place in the parseRequest() method anyway. So I've reverted back to the "normal" way of doing things. > Also, > > what would happen if the setX() methods were to be > > called while parsing a request? (I guess it would be > > better to create a new object in that case, but I'm > > curious.) > > What do you mean by while parsing a request? Parsing request in one thread, calling setX() in another. But you already answered that above. They are not synchronized, so results wouldn't be predictable. Thanks for helping me out! Cheers, /Per --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
