I was reading Struts2 In Action, and it says for each request an ActionContext
, a ValueStack
and an Action
instance are created, so they are thread safe. I was wondering how does the framework manages session, because it can't be stored in these locations, where does the actual Map gets stored, and how concurrent access to that Map is managed by the framework?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
The http session is stored in the
SessionMap
which is among the other context maps is stored in the action context by the dispatcher when serving a request. The session map is a wrapper for http session object and operations such asget
/put
are synchronized using a http session object monitor. It simply synchronizes the access to http session attributes, however providing aMap
implementation.