Contact across sessions
Posted on 2003-10-31
I am designing (and soon implementing) a web-application (mysql-tomcat-jsp-struts).
The application deals with shift-planning, and there is two kinds of users: "regular" and "boss". The users are working in teams, and a typical team counts approx. 10 regular users and one boss.
The boss-users can alter some settings (restrictions and other rules) that apply for all the regular users on his team.
The way the application is designed right now, an object "SystemVariables" is loaded from MySQL with the relevant settings for the team (as mentioned, these settings are made by boss-users), and is stored in Session when the user logs in. This way it is not neccesary to consult the DB each time you need a setting in fx an ActionClass.
My problem is, that I am not sure if this is good approach! If a boss-user changes some settings, all the users that are logged in at that time will NOT be affected before they log in next time.
1) Is there a way that one session (the boss-session) can "contact" the other active sessions, and tell them to reload their settings?
2) Alternatively I COULD of course reload system-settings in the beginning of each Action-class, but this seems a bit clumsy. What do you think about that?