JBoss.orgCommunity Documentation

Chapter 3. JBoss Server Editor

3.1. Server Editor - Overview Page
3.1.1. General Information
3.1.2. Management Login Credentials
3.1.3. Server Behavior
3.1.4. Publishing
3.1.5. Server Timeouts
3.1.6. Application Reload Behavior
3.1.7. Server State Detectors
3.1.8. Ports
3.1.9. Local Server Launch Configuration
3.1.10. Remote Server Launch Configuration
3.2. Server Editor - Deployment Page

This chapter describes how to manage and change the settings and behaviour of an existing JBoss AS-Tools Server Adapter. The server editor is the primary vehicle for users to modify the behavior and settings for their server, including what launch arguments to use, how to discover if the server is started, and many others.

By double-clicking on any server, an window will appear allowing you to edit the servers settings.


The Overview page is an important entry-point to modify settings for your server. This page has the following sections.

  • General Information

  • Management Login Credentials

  • Server Behavior

  • Publishing

  • Timeouts

  • Application Reload Behavior

  • Server State Detector

  • Server Ports


The server adapter tries to automatically detect the ports it needs for integrating with a JBoss Server by default. It does this typically by parsing through configuration files, searching for some XPath, and using the values found as the chosen port. The Server Ports section in the Server editor provides fields to customize the ports that the tooling will use to communicate with the server. Above, you see a name, a text box with an integer value representing the port, a checkbox toggling automatic detection, and a hyperlink to dive deeper into the discovery details. Sometimes, it is necessary to override this automatic detection if you are using a custom configuration. As shown above, the tools need to know how to accurately discover the web port and the management port. Recent servers allow for more accurate detection by also discovering the port offset setting.

A Note on Port Offsets

The JBoss Application Servers allow for a port offset to be declared. Essentially, a port offset is an integer to be added to all ports on startup. So if your server is set to have a web port 8080, but you provide a port offset of 200, the web port (and all other ports) will be 200 higher. This allows you to start multiple servers on the same machine without port conflicts.

The simplest way to ensure that the tooling is pinging or communicating on the correct port is to uncheck Detect Automatically. This sets the text field as editable, and you can simply type the correct port. To look deeper at the actual settings of how the port is discovered, or to modify this behavior, click the Configure... link to bring up the wizard for adjusting the settings for the ports.


Click the Edit XPath button for the chosen port to configure its XPath's values.


In this dialog, you can customize the XPath and an optional attribute name to discover the proper port string. The dialog provides a preview button to see the results that match the XPath. Ideally, you'll want to craft an XPath that matches only one result. You can limit the files to be searched by use of a fileset pattern. This will help limit other files from matching the result set, and ensuring an accurate detection of the proper port.

The Server editor window also allows you to modify the server's launch configuration. The settings are available by clicking the the Open launch configuration link in the General Information section of the editor. The resulting window provides tabs for setting command line arguments, main, classpaths and other things that are relevant to launching the server.


The first tab shows the JBoss server arguments

Note:

Please note that some of the values in the Launch Configurations for JBoss Servers are strictly enforced in order to avoid inconsistencies between server's and their configured runtime.

For example, if you change the launch configuration program arguments to "-c myConfig" but do not change the targeted runtime configuration, then your program arguments will be ignored. The configuration of the server runtime "wins" so to speak. This ensures consistency. Therefore, if you change the location of the runtime, your launch configurations will automatically pick that up.

Non-critical or custom arguments can be passed in or overridden with no problem at all. It is only arguments that otherwise conflict with the data in the runtime that will not be respected.

On the second tab you find the main class used for launching JBoss AS (the default is org.jboss.Main). This value can be changed if necessary.

Until JBoss Tools 3.0.0.GA the servers classpath was read only, but that caused problems for users wanting to add their own JARs in the startup classpath. That is relevant if you need to patch the server, add a custom charset or other tweaks that require early access to the classpath.

Now all servers have a custom 'server runtime classpath container', which is there by default and point to the default JARs in JBoss. You can now adjust the classpath. Then just make sure this container is there if you want the classpath to be picked up.


If for some reason you have a launch configuration without this container, the Restore Default Entries button should add it properly. Also, the Restore Default Entries button will remove any extra entries you added yourself.

Using Deployment tab you configure local deployment settings.


Using the group of radio buttons in the Default Settings section a user can set where the application will be deployed to. By default it is deployed to a folder inside the user's workspace metadata, located inside [workspaceDirecotry]\.metadata\.plugins. If you would like the application to be deployed to your JBoss server's deploy folder, select the Use the JBoss deploy folder option. The option to specify a custom deploy folder is also available.

You should also see a checkbox available labeled Deploy projects as compressed archives. This option forces all of your publish operations to result in a zipped archive output file. Rather than an exploded directory war, for example, you would end up with a zipped .war file.


As shown above, the bottom section of this editor page allows customizations on a per-module basis. For example, if you want one of your modules to be published to a custom directory, while the rest live happily inside the server's deploy folder, you can now override this setting here. If you'd like to change the output file name from the assumed MyProject.war to the OtherName.war, this is also possible.

To begin editing these values, simply click on the cell you wish to edit. All paths should be absolute, or, relative to the default deploy directory as chosen in the top section of the editor page. Be aware that when publishing, we require the temporary folder to be on the same filesystem as the final deploy location. If this constraint is not satisfied, publish will often fail. Do not forget to save the editor before these results can take effect.