GIAC
GSSP-JAVA · Question #140
Which of the following statements about ServletContext attributes is true?
The correct answer is B. They are not thread-safe but can be made thread-safe by applying a lock on the context. See the full explanation below for the reasoning.
Question
Which of the following statements about ServletContext attributes is true?
Options
- AThey are not thread-safe but can be made thread-safe by synchronizing the service()
- BThey are not thread-safe but can be made thread-safe by applying a lock on the context.
- CThey are thread-safe.
- DThey are not thread-safe but can be made thread-safe by applying a lock on the servlet.
How the community answered
(34 responses)- A6% (2)
- B79% (27)
- C12% (4)
- D3% (1)
Community Discussion
No community discussion yet for this question.