aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Thread Safe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Thread Safe" Watch "Thread Safe" New topic
Author

Thread Safe

Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
Following are thread Safe
request attributes
response Object
local variables

Following are not thread Safe
servletcontext attributes
session attributes
instance variables

What about ServletConfig parameters?
Are they access by multiple threads at a single time?
i know ServletConfig parameters are Read Only constants.

Thanks
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
ServletConfig Parameters are readonly then i think it doesn't matter
Elan Ram
Ranch Hand

Joined: Dec 14, 2006
Posts: 40
Hey, we can set only the attributes. Not parameters. There are no setter methods to set the same.
Hence, Thread safety is applied only to attributes and not a paramters.


Thanks and regards,
Elan
Manikandan Jayaraman
Ranch Hand

Joined: Sep 15, 2004
Posts: 230
More to note ...

As said, Parameters are thread-safe as there are no setters for the same.

Only in SingleThreadModel, instance variables are thread-safe.

Static Variables, Context Attributes and Session Attributes are never thread safe.


Regards,<br />Mani<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (94%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread Safe