Allow auto deploy to make its work (http://docs.jboss.org/jbossweb/2.1.x/deployer-howto.html), 10 tries with 2 seconds delay is working very well on my tests and looks like a reasonable waiting. The same numbers have been used before, and recently, on sonicwall_gms_upload, so I guess would be good enough. More testing is welcome of course!