jsp - How to clean session attribute from all active session in java? -
Currently I'm working on a web project which uses JSP / Sarlet and Strat Framework. We are using the cache mechanism. I want to clear some session attributes from all active sessions on special sessions (for example, in case of fresh cache). So what is the best way to apply the same?
You must provide a class that applies (part of the server API) interface and it's web Register in .xml
Then you can track active sessions and use that information to gain access to the session and update the attribute. Effectively the implementation class will be a singleton, so you have to deal with synchronization problems carefully during session tracking
Of course if you have a cluster environment with multiple nodes, the promotion of feature changes is quite complex Could.
Comments
Post a Comment