Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It should contain a bean entry for every action in your app and these beans should be defined as singletons. Since the beans are defined as singletons it is important to make sure the action is thread-safe (i.e., multiple users won't corrupt each other's data) which means the action class should not have any instance variables, non-local non-static variables (defined within class but outside of a method, conditional statement, loop etc). Note that some of our actions have a static variable defined as a Logger.  This is fine since static means everyone shares the same variable and the same value and we want everyone to share a single log file. Check out this page for a discussion of instance versus static variables.

...