This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
While we don't specifically talk about migrating from App Server X to App Server Y, we do take great pains to make our application as server-neutral as possible. We sidebar areas that are JBoss specific in each chapter.
The good news is the code tends to be container-neutral. It is the deployment descriptors that tend to be container-specific. You can mitigate much of this through the use of XDoclet.