> From: "Christopher Molnar" <[EMAIL PROTECTED]> > Sent: Tuesday, August 09, 2005 4:56 PM
> We have a servlet that is run locally on about 20 laptops. I am > currently manually updating the application on each laptop about once > per month. Can anyone suggest a method of updating an application > running on both OS/X and Windows based machines that would check if a > new version was available and then grab it via FTP, Rsync, or > something? Or would it be easiest to put the application into a > database record? Any help or pointers appreciated. Since you're on a laptop, I'm guessing you can't easily automate the process using a cron job or the Window Scheduler, as most laptops aren't "up and about" in the middle of the night. But, even if it was a manually initiated sync process, it wouldn't be to problematic. You could simply have the user kick off an rsync process at some reasonably regular interval and compare the WAR on their system to the Mater WAR is on your server. If the app is small, your network fast, and you can mount where the Master WAR as a drive on the computer, then you can simply have an Ant task copy the file. It can simply compare timestamps (assuming the machines have compatible clocks), and just suck the whole thing over if the timestamps differ. Hmm, well, you'd need to blow away the old exploded webapp too. That's a bit of a nut. Then, once copied over, Tomcat fires up, explodes the WAR and you're on your merry way. The only hard part is if you perhaps change the DB schema or somesuch thing outside the scope of the application, that brings on a whole different set of problems. Another solution is to "embed" tomcat, and your app within it, and then use Java Webstart to run it like a "desktop" appliation. The Webstart handles synchronizing and keep the application up to date. It probably wouldn't be horribly difficult to do, but it's not clear that the effort is worth it just to get the Webstart functionality. Finally, you can add a bit of code to your app to see if it's out of sync, download it your self, then quit with a message saying "Updated -- please restart". All sorts of scary things you can do. Since you're talking OS/X and Windows, I'd keep the solutions to Java based ones, tho, rather relying on scripting and such. Luck! Regards, Will Hartung ([EMAIL PROTECTED]) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
