Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - Hot deployment

Recently, I was reading book about Erlang which has hot deployment feature. The deployment can be done without bringing the system down. All the existing requests will be handled by old version of code and all the new request after deployment will be served by the new code. In these case, both the versions of code available in runtime for sometime till all the old requests are served. Is there any approach in Java where we can keep 2 versions of jar files? Is there any app/web servers support this?

like image 411
Sivasubramaniam Arunachalam Avatar asked Jan 17 '23 04:01

Sivasubramaniam Arunachalam


1 Answers

If your intention is to speed up development then JRebel is a tool for just this purpose. I wouldn't however recommend to use it to patch a production system.

JRebel detects whenever a class file has changed and reloads it into the running appserver without throwing any old state away. This is much faster compared to what most appservers do when redeploying a whole war/ear where the whole initialization process must rerun.

like image 122
mihannus Avatar answered Jan 26 '23 02:01

mihannus