This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes threadsafe objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "threadsafe objects" Watch "threadsafe objects" New topic
Author

threadsafe objects

geeta vemula
Ranch Hand

Joined: Jul 18, 2008
Posts: 208
If we declare servletcontext and session objects inside the mothod(like doGet or doPost) then are they threadsafe for being local variables?

Thanks,
Geeta
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
They are not thread safe.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: threadsafe objects