What is the best way to deploy a WAR on JBoss AS 4.2.3 from a remote location. I don't want to mess something if e.g. my connection hangs while uploading the file.
+1
A:
I would suggest remotely copying the WAR file to a temporary holding area on the target server (using rsync, scp, ftp, whatever), and then executing a script on the target server (using rsh, ssh, etc) which moves the WAR file into the JBoss deploy directory.
As long as the temporary holding directory is on the same partition as JBoss, the move will be effectively atomic, so that even if the connection fails, it should still work.
Alternatively, you can invoke the JBoss JMX console to disable the deployment scanner, copy the WAR directly into the deploy directory, and then re-enable the scanner. That way it won't try and deploy until you're sure the WAR has been copied.
skaffman
2009-07-03 11:05:01