Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts 1 ActionClass Instance Variables - Threadsafe?  RSS feed

Harish Verma
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, what happens to instance-level non-static variables declared in a Struts 1 actionclass? For example:

In this case, will the non-static object instances s and someList also be visible to all requests that simultaneously hit someAction? Because someAction is a singleton, my guess is even s and someList should also behave exactly like class-level (static) variables, and therefore should be accessible from simultaneous threads, causing concurrency issues.

Anybody can confirm or refute this? Thanks.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!