Payara Server tools in Eclipse IDE
Adding Payara Server to Eclipse IDE
-
Open the Servers view (if not visible, it should be under menu Window → Show View → Servers).
-
Select Payara → Payara and set the Host name and some comprehensible Server name.
-
Then click Next to another window with server runtime configuration.
-
Then click Next again to window with the configuration of the domain. In this example we use domain without configured admin user and the server is not started in debug mode.
-
In the last step you can select resources which will be deployed on the server. Here we don’t have any deployable projects in the workspace yet, so both panels are empty.
Adding Resources to Server
-
First import or create some project, deployable to the Payara Server. Here we use one of the Java EE 7 Samples .
-
Right click the target server in the Servers view and click Add and Remove…
-
Select resources you want to be managed by the Payara Tools, add them to the right panel and click Finish.
-
Now you can watch the deployment of the application in the Console view.
-
If the deployment was successful, you can use the application. Here we simply opened the internal Eclipse’s browser and sent the HTTP GET request - and the application responded.
-
You can also access the administration console directly from the Eclipse Browser. Just right click the target server in the Servers view and click Payara → View Admin Console
Runtime Reconfiguration
-
In the Servers view double click the server you want to reconfigure. The Server Overview will open.
-
Click on Runtime Environment and you will see well known window.
Be careful, because changing the runtime may result in unusable state of the server because of incompatible configuration.
Auto Publish & Hot Deploy
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.
To enable the automatic publishing from the Eclipse IDE, open The Server panel, double click the server name and expand the Publishing section to reconfigure the setting.
+ image::eclipse-plugin/payara-server/auto-publish.png[Auto Publish applications]
-
The Hot Deploy mode can be enabled from the Payara Server properties page to boost the deployment performance which reuses the existing application instance relative to the modified source.