Hot Deploy Feature in Payara Platform 5.201
Originally published on 23 Mar 2020
Last updated on 26 May 2020
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 boost the developers productivity. It will undeploy the existing application and redeploy 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 sources 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 IDEs 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. This can lead to significant savings of time when an application is redeployed and boost developer productivity even more.
How to Configure the Hot Deploy Feature
If you don't have a project in Netbeans set up yet, first follow the steps in theAdding Payara Server to NetBeansblog to learn about setting up Payara Server and a project in the Apache NetBeans IDE for running your web apps. Make sure that you use Netbeans 11.3 or newer to use the Hot Deploy functionality.
If you already have a project in Netbeans 11.3 or newer set up and ready to deploy to the Payara Server, you can continue with adjusting the configuration of the Auto Deploy and Hot Deploy mode.
Go to Properties on your project and then the Compile section of this window to enable the Compile On Save feature.
and the Run section of this window to enable the Deploy On Save feature.
Once Auto Deploy mode is configured in the project, go to Services tab > Servers > Payara Server > Properties > enable the Hot Deploy option.
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:
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:
Download and Try the Payara Platform:
Related Posts
The Payara Monthly Catch - October 2024
Published on 30 Oct 2024
by Chiara Civardi
0 Comments
What’s New in the October 2024 Payara Platform Release?
Published on 09 Oct 2024
by Luqman Saeed
0 Comments
We're happy to announce the latest release of the Payara Platform, bringing significant improvements and updates across our Community and Enterprise editions (download Payara Enterprise trial here). This release focuses on enhancing security, ...