Payara Server NetBeans Plugin
Adding Payara Server to NetBeans
-
Go to Tools - Servers.
-
Click Add Server.
-
Select Payara Server and choose a name for the server.
-
Select the location of the
payara
directory of your Payara Server installation. If the DAS is on another machine then check the Remote Domain box, otherwise select Local Domain. Read and accept the license agreement. -
Enter the following details for the domain:
-
Domain → This is the name of the domain you want to use. By default this is
domain1
. -
Host → This is the hostname that the server will be listening on. By default this is
localhost
. -
DAS Port → This is the port that the
admin-listener
listens on. By default this is4848
. -
HTTP Port → This is the port that the application will be hosted on. By default this is
8080
. -
Target → This is the name of the node that the application will be getting deployed to. This can be left blank if it is a local installation.
-
Username → This is the admin username for Payara Server. By default this is
admin
. -
Password → This is the admin password for Payara Server. By default this is blank.
-
That’s how to add Payara Server to NetBeans. You’ll see a window where the final configuration settings can be changed.
The previous options are all repeated here, with a few new options. You can click the help button in the bottom right to see what they all do in detail.
Disabling the registered Derby server will speed up server start time. |
Managing Payara Server from NetBeans
All of the management of Payara Server from NetBeans is done through the Services tab which can be found next to the Projects and Files tabs.
Once Payara Server is added to NetBeans it can be found under Servers with the configured name. Right clicking on the server let’s you do the following actions:
-
Start or stop the server.
-
Start debugging the server.
-
Open admin console.
-
Open server log.
Exploding the server dropdown will list Applications, Resources and Web Services. From here you can view as well as manage some of these things
from the NetBeans interface. For example, under Resources → JDBC → Connection Pools → DerbyPool (right click) → Properties
you can change details like the port number.
Deploying Applications to Payara Server
An application can be deployed and undeployed easily from within NetBeans. First, the application run settings need to be configured to use Payara Server. Go to Properties on a project and then the Run section of this window. This menu lists the configuration for deploying the application.
Select the Payara Server you have configured. You can also select a context path for the application to be deployed to, as well as NetBeans behaviour when deploying.
Deploying to Payara Server now only requires running the application like any other NetBeans project. Once it’s deployed, the Services view will then display the application under Payara Server, where you can un-deploy, enable, disable and view the application in the browser.
Hot Deploy Applications
Payara Server provides a Hot Deployment feature capable of boosting the performance of the application redeployment operation and dynamically replaces the classloader of the application on each redeployment in the hot deploy mode.
The Hot Deploy mode can be enabled in the Apache NetBeans IDE from the Properties panel of the Payara Server.
Also, make sure to enable the Compile on Save and Deploy on Save option from the Properties panel of the Project.
The Hot Deploy feature is in technical preview and only supported by Maven Web Applications from the Apache NetBeans IDE v11.3. |
After enabling the Hot Deploy settings as mentioned above, Simply deploy the Maven Web Applications to Payara Server and modify any Java class of the application to perform the auto redeploy of application on save and observer the fast redeployment of the application in Payara Server console log in compare to a vanilla redeployment.