Seems to be a bug. We also encountered this behavior in the past and disabled farming within the production environment. With farming - although convenient - you 'loose' much control during deployment, which is essential for a production plattform (especially if there are some unexpected problems during the deployment of a new component)
Could you download JBoss 4.0.3rc1 from http://www.jboss.org/products/jbossas/downloads and try to recreate the problem?
If the problem is solved with the farm deployment changes in 4.0.3, great! If not, write back and let me know. The next step would be to create a bug report (using JIRA Issue Tracking) and supply a test case so we can reproduce it. If we move fast enough, perhaps we can have a fix in 4.0.3 (will lock down soon).
Thanks. Will try 4.0.3rc1. Test case is pretty simple, since - if you repeat it long enough - you can reproduce this bug with ordinary datasource xml files in farm/ directory.
Sometimes xml ds file is removed on second server instead of redeployed - so it's probably a different case than fixed one (Farm deployment shouldn't read entire archive file into memory).
Will try 4.0.3rc1 and report a bug if it's not fixed.