14 November 2008

WAR or EAR deployment versus exploded folder deployment

When should we go for an archive [war or ear] deployment rather than exploded folder deployment in production environment?
I believe the following factors are driving forces to go for archive deployment [though servers like JBoss, Tomcat ultimately explode them into tmp/work directory]
  • Deployment in managed servers is easier [when we have clustering]
  • When we want to enforce that production bug fixes should go through a well defined process [I have seen few applications (deployed in exploded format) where the patch is applied in the production environment but never merged with the version control system]
  • When we have to deploy on a remote server [like using remote deployment tasks using ANT, Maven etc]
The only reason to go for exploded folder deployment is that applying patches for high priority bugs in production environment is easier.