Forums Register Login

Error in SCWCD Study Notes FAQs

+Pie Number of slices to send: Send
http://www.javacamp.org/scwcd/course/7_1.html

It says :

# Request attributes
Not thread-safe



It is wrong, request attributes ARE thread-safe.
+Pie Number of slices to send: Send
Read the quote farther down on that same page:


Thread-safe issue for Request & Response
Implementations of the request and response objects are not guaranteed to be thread safe. This means that they should only be used within the scope of the request handling thread. References to the request and response objects must not be given to objects executing in other threads as the resulting behavior may be nondeterministic.
-- SRV. 2.3.3.3.



So according to the servlet spec, the request object and it's attributes can be considered to be thread-safe so long as references to them are not passed to other threads. But there is no mechanism for stopping anyone from doing this. In the strictest sense, the request object and it's attributes are not guaranteed to be thread-safe.
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 611 times.
Similar Threads
Are request scope attributes thread-safe?
Completed SCWCD 5
Doubt in Thread Safe Servlet.
Are page scope attributes thread-safe?
MVC Pattern doubt
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:58:55.