Thread Safety of ServletContext objects

后端 未结 5 1486
余生分开走
余生分开走 2020-12-06 13:15

I am storing a HashMap object in my ServletContext. But Multiple Request thread are reading and Modifying this HashMap.

As i belive the ServletContext objects are sh

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 13:35

    Yeah, make sure that when you modifying the HashMap; it is synchronized or thread safe.

提交回复
热议问题