title: How hot deployment works internally?
body: <p>I am using eclipse server capability for hot code deployment. Using tomcat as web server. But i am not sure how it works. I have my own understanding how it must
  be working internally. </p>
  
  <p><strong>My understanding :-</strong> When developer make the changes in code(say class Employee), Eclipse will place/publish the modified compiled class  at right location(must be specific web/app server. lets call it hot deploy directory(HDD)) under webserver. Now web server specific class loader will come in to picture. It finds the new entry under HDD. Now, it finds if class has been already loaded by classloader in perm gen space, webserver will unload it from permgen space and load the new the one internally without server restart so that new changes(byte code) is reflected . As part of reload, webserver will also link the existing Epmloyee objects with
  new class definition in perm gen space so that new changes are reflected. </p>
  
  <p><strong>Is my understanding correct ?</strong></p>
  
  <p>Some links like <a href="https://stackoverflow.com/questions/12393509/what-are-the-benefits-of-jrebel">this</a> says  Eclipse hot deployment is just automation of redeployment. what i believe it means is that eclipse automatically stop the server , republish and restart it without developer intervention. <strong>Buti i think its not true as  this process is really quick as compared to start/publish/restart.
  Also if it would have been true, how session and other live objects will remain live after restart ?</strong> May be this link was true in past but not now as I find hot deployment works for classes in jar also</p>