What is Hot Deployment ?
Hot-deployable services are those which can be added to or removed from the running server. It is the ability to change ON-THE-FLY what’s currently deployed without redeploying it.
Hot deployment is VERY hot for development. The time savings realized when your developers can simply run their build and have the new code auto-deploy instead of build, shutdown, startup is massive.
What is cold Deployment ?
Cold deployment are defined as tasks that require one or more instances of the server to restart to reflect the changes.
Cold deployment is slow but stable:
Stop JBoss AS
Optionally delete data/, log/, tmp/, work/
Redeploy your application(s)
Start JBoss AS
Pros and cons :
Hot Deployment -
1) It prevents you from manual restart of production server if you made any changes to the contents of the war file being deployed.
2) Business never stopped .
1) Hot deployment deploys simultaneously to all the nodes, resulting in down time.
2) Hot (re)deployment of my application sometimes results in OutOfMemory errors.
Cold deployment -
No caching + also no out of memory issues after subsequent deploys during testing.
Outage cost is more being lengthy process .
Problem: large files (such as libraries) end up as 0 bytes in size after hot-deployment
Solution: increase the permgen space for Eclipse to 256mb. You can do this in the eclipse.ini file (XXMaxPermSize). If that doesn’t help, you probably removed a file and forgot to refresh the project view.
Problem: ‘module does not exist’ error during startup
Solution: check the application.xml file that maven generated; the name of the EJB and WAR modules must be the same as the directories you created in the JBoss deploy directory.
Problem: library, class or resource is not hot-deployed while it exists
Solution: filesync only sees what Eclipse sees; did you refresh your project view?
Problem: files in the resources directories aren’t synced
Solution: for some reason, sometimes Eclipse wants to exclude all files in the resources directories by default. Check this in the build path of your project settings.
Problem: JBoss doesn’t see the changes I made
Solution: I don’t really have a solution, but I’m pretty sure there are ways to specifically configure JBoss to not scan for resource changes. That will of course defeat the purpose of hot-deployment. A JBoss instance you download directly from the JBoss website should work flawlessly.