7.4. Changing JVM Definitions

Managing the JVM settings for instances can help improve performance and better allocate system resources. Because of the nature of the EAP 6 domain structure, JVM settings work in a kind of cascade: the host controller JVM settings apply to the server group and all servers; any server group JVM settings override the host controller settings and apply to all their managed servers. Then, a JVM definition can be created for a managed resource, and that definition trumps any higher-level JVM settings.

7.4.1. JVM Definitions as Resources

In the EAP 6 management console, the JVM settings are treated as configuration options for server entries. Each server has a configuration tab for JVM configuration, and then there is a separate JVM Configurations under the Server page for the host controller.
JVM Definitions in the EAP 6 Console

Figure 7.2. JVM Definitions in the EAP 6 Console

As with the managed server configuration, the server group configuration has a tab for JVM settings.
In JBoss ON , JVMs have historically been separate resource types, with their own configuration and monitoring. For EAP 6, JVM definitions are also treated as separate resource types, children of the server or server group they apply to, even though in a structure sense the JVM definition is a collection of configuration properties; the JVM itself is the parent resource.

7.4.2. Creating a JVM Definition

A default JVM definition is already defined for the host controller, and that JVM definition is applied to every server group and, subsequently, every managed server associated with that group.
New JVM definitions can be created for server groups or managed servers to override those default settings. The managed server and server group definitions are based on the host controller JVM definition. Additional JVMs can be added to the host controller to provide a different base to use for new server group and server JVMs.


A host controller can have multiple JVM definitions; the default one is used for all managed servers and server groups, while any additional JVM definitions are available as the base definition for custom JVM definitions at the managed server and server group levels.
However, a managed server and a server group can have only one JVM definition. The UI will allow multiple JVM definitions to be created for a managed server and a server group, but the final creation step fails if a JVM definition already exists.
  1. Click the Inventory tab in the top menu.
  2. Select Servers - Top Level Imports in the Resources menu table on the left.
  3. Right-click the entry to which to add the JVM definition.
  4. In the Create New menu, select the item for JVM Definition.
  5. Enter the name for the definition.


    The name of JVM definition can be anything for a host controller. For a managed server or server group, the name of the JVM definition must be the same as the host controller JVM definition which is the base of the definition.
  6. Enter the settings for the JVM. Any settings which are left blank use the values defined in the parent JVM definition.
    Most of the configuration for the JVM relates to memory and resource usage, along with options to pass environment variables or other settings to the JVM. The values of these settings can have a positive impact on both the resource performance and the overall system performance.
    The configuration settings are listed in Table 7.1, “JVM Definition Properties”.
  7. Click Finish.

Table 7.1. JVM Definition Properties

Property Description
JVM Options Sets any other Java option. Many of these are documented with the Java provider, such as Sun's documentation at http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html.
Environment variables Sets environments variables to use with the JVM.
Heap Size Sets the initial heap size for the JVM.
Max Heap Size Sets the maximum allowed heap size for the JVM. Setting this too low can cause out of memory errors.
Permgen Size Sets the initial size of the permanent generation.
Max Permgen Size Sets the maximum size of the permanent generation.
Type The type of JVM. This can be Sun or IBM, the two supported Java types for JBoss ON.

7.4.3. Editing a JVM Definition

The JVM definition is edited by editing the configuration properties for the JVM definition resource.
  1. Click the Inventory tab in the top menu.
  2. Select Servers - Top Level Imports in the Resources menu table on the left.
  3. Select the EAP server and navigate to the appropriate JVM definition entry.
  4. Open the Configuration tab.
  5. Change any of the JVM settings. These are listed in Table 7.1, “JVM Definition Properties”.
  6. Click the Save button at the top of the page.