Reputation: 161
Everytimes, I change the java coding in java class under Eclipse. I click the run-as, it requires to restart the embedded Tomcat server in order to make the change effective. How can I test the change without the need to restart the Tomcat server. Because it is very time-consuming, if I need to restart the embedded Tomcat server whenever I change some coding. It will spend one minute for testing a little change.
Thanks
Upvotes: 2
Views: 377
Reputation: 9806
This process is called hot swap
or also hot deploy
. There are tools that do this process for you. One open source tool that you can check is HotSwapAgent. One paid alternative would be JRebel.
Obviously goes without saying that these two are far from comparable in terms of features and efficiency. But if it is just for testing purposes the open source alternative is just fine. In industry, not that much(we have tried it in my company and didn't fit our expectations).
Upvotes: 2
Reputation: 921
If i am not wrong there is a option to do that. I am pretty sure that you have seen that.
Upvotes: 1
Reputation: 2608
What you need is a hot deploy:
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.
And good news there is a hot deploy in Eclipse. Just Follow the Eclipse tutorial for this
Upvotes: 3