my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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
 
Similar Threads
ThreadSafe Collection
true or false......implicit obj's threadsafe?
which data is ThreadSafe ?
Using same object for multiple uses
are stateless beans thread safe