Hot Deploy Feature in Payara Platform 5.201

Photo of Gaurav Gupta by Gaurav Gupta

Being productive gives developers a sense of satisfaction and fulfillment. That's why increasing developer productivity is always our priority and we are consistently working towards improving the Payara Platform developer tools and the developer experience.


In this blog, we will show you how to configure a Project in the Apache NetBeans IDE to enable Auto Deploy and Hot Deploy mode.

The Auto Deploy and Hot Deploy mode are helpful for developers to run and test an application immediately after making changes to its sources without restarting the Server or manual redeployment to maximize your productivity where Auto Deploy is the feature of Apache NetBeans IDE and Hot Deploy is the feature of Payara Server. Hot Deploy mode is currently only supported in Apache NetBeans IDE as an experimental feature.

Auto Deploy

By enabling the Auto Deploy feature of Apache NetBeans IDE, you may automate the manual deployment processes to boosts the developers productivity which undeploys the existing application and redeploys the new application on every save action so developers can focus on the key development task.

Compile on Save:

The NetBeans IDE instantly compiles modified source when you save them. 

Deploy on Save:

The NetBeans IDE instantly redeploys running application when a change is made to the project.  

Hot Deploy

Payara Server allows IDE to deploy the application in Hot Deploy mode by reusing the existing application instance and updating its classloader & internal components relative to the modified source which can lead to significant savings of time in redeployment task.

How to Configure the Hot Deploy Feature

If you already have a project setup and ready to deploy to the Payara Server, you may continue otherwise follow the steps from https://blog.payara.fish/adding-payara-server-to-netbeans blog to learn about the setup of Payara Server and project in the Apache NetBeans IDE for running your web apps. So let’s start the configuration of the Auto Deploy and Hot Deploy mode after you’ve got your project ready to deploy.

Go to Properties on your project and then the Compile section of this window to enable the Compile On Save feature.

Compile-on-saveand the Run section of this window to enable the Deploy On Save feature.

Deploy-on-save

Once Auto Deploy mode is configured in the project, go to Services tab > Servers > Payara Server > Properties > enable the Hot Deploy option.

Hot-deploy

That's it! Now the Hot Deploy mode is enabled, and you don't have to restart or redeploy manually after each and every change. 

Hot Deploy in Action

See the following screencast to compare the application redeployment time in the both Vanilla and Hot deploy mode:Payara-Server-HotDeploy

After enabling the Hot Deploy mode, redeployment process is optimized except the first redeploy task which saves the application state.

What’s Next?

Hot Deploy mode is the technical preview feature and currently optimizes the core deployment components and web components of the Payara Platform. In the future release, other components of the Payara Platform will be forged to support Hot Deploy mode which will lead to tremendous improvement and saving of time in redeployment tasks.

Increasing developer productivity and development speed is definitely a worthwhile investment. If you are more productive, you can achieve more in less time and make the best possible use of your time.

Learn More:

Dev Tools in Payara Platform

Download and Try the Payara Platform:

 Payara Platform  Download Here 

Comments