How can you solve deployment errors caused by large war/jar/ear files ?

One common problem that can arise if you are performing a lenghty deployment, is that the deployment scanner awakes in the middle of the I/O operation.

The first advice is of course to avoid copying large deployment units from remote hosts. Rather copy the file to a local temp folder and then to the deploy folder. This at least reduces network latency.

Second, stop the hot deployment scanner thread before copying the file. The scanner can be stopped by invoking the JMX stop() operation on the jboss.deployment:flavor=URL,type=DeploymentScanner MBean. This can be done via the jmx-console or via the twiddle utility in $JBOSS_HOME/bin.