We will have several sites (around 100) which will all be running the same web application on their server. There is not a good way to centralize this application because of network connectivity issues. So the sites are just using a local Tomcat server to run the app. Sometimes we will need to be able to put an informational message on the login page of that application, just to tell users information that they need to know. These messages should be valid for a specified period of time and then expire. What is the best way to do this? I thought of a few ways that this could be done by 1) using Java Web Start to download a new version of a "informational message" that would then be displayed on the login page, 2) using JMX to set the properties of some MBean whose properties are then displayed on the login page, 3) call a webservice running in Tomcat that would be able to set some message that would be viewable on the login page. We need this to be easy to send that message to all 100 sites, so we need an easy way to do all 100 sites at once programmatically rather than manually. Has any one else done something similar in an application? What would be the best way to implement something like this? Thanks! Brian
Well, the most remedial way is to have the message read in from a file, and then just set up a batch script to ftp the newest and best version of it to each of the 100 servers when you want it changed. It sort of depends on how serious your network connectivity issues are.
"JavaRanch, where the deer and the Certified play" - David O'Meara
I think that, since Brian believes there's a solution, that all the 100 servers are reachable from some location, but not all the clients can reach the central location. In this case I think I like solution 3). The replicated web app would include a service that the central location could call to deposit the message at each server. The central server would need a list of the replicated servers, and it could just read the list, iterate over it, invoking the web service at each one. If the network connectivity doesn't allow this, I'd consider using email. You could mail the message to a dedicated address at each replicated server, which could just strip off the headers and use the message; you could use PKI to verify the sender.