I'm developing an application using Java & MySQL Database, the application is a Desktop Application working in network environment. The Application has some static content that is loaded from the database when starting the application. if the super user made some change for some variables, i need to enforce the network users to restart the application so they can load the new variables.
What idea or code do I need to use?
You could implement something like this.
Or maybe you can have a "ConfigTable" in your database, with property, value, expiration time.
So, when the admin updates some value, the other applications in the network can pool the new value.
Regarding the pooling approach, (We don't have enough information to give you the best solution) you could try something like this.
A notification_table with ID, Event (Event is something that you know, maybe load new images, etc)
Workflow
1) The clients pool from this table every X seconds, filtering with ID > lastNotificationId (that needs to be saved in local file) 2) The client applies the new events. 3) The client updates the local file with new notificationId.