Monday, April 11, 2011

Should the context attributes in web application being made thread-safe?

Hi,

I am creating a context (e.g. TestContext.java) as a singleton in the web application. Multi struts actions will access the context. Should I create the context attributes as thread-safe?

Thanks.

From stackoverflow
  • Yes, you should: several theads may access it simultaneously.

0 comments:

Post a Comment