Configure Runtime Java options

Java options are typically added to the runtime Java command with the -D<option-name>=<option-value> syntax. You can also set them in the runtime configuration file engineParameters.xml file, or in environment variables.

Add Java options

In environment variables

The xDI Runtime reads the XDI_RUNTIME_OPTS and XDI_COMMAND_OPTS environment variables, and adds their content as additional Java arguments.

Use your operating system tools to set these variables. They should contain a space separated list of Java arguments, in the same format as on the command line.

Example 1. Example list of arguments:
XDI_RUNTIME_OPTS='-Xmx3072m -Xms1024'
XDI_COMMAND_OPTS='-Xmx2048m -Xms1024'

In runtime configuration files (deprecated)

Semarchy xDI 2024.2.0 deprecates support for Java options in the runtime configuration file. If you are using this feature, switch to using command line options or the XDI_RUNTIME_OPTS environment variable instead.

To configure runtime java options:

  1. Open the engineParameters.xml file.

  2. Find the <javaConfiguration> node.

  3. Add and edit options in the node, as shown in the following example.

  4. Restart the runtime or reinstall the runtime service.

<parameters>
  <...>
  <javaConfiguration>
    <property name="myOption01" value="value01"/>
    <property name="myOption02" value="value02"/>
    <...>
  </javaConfiguration>
  <...>
</parameters>

Options specified in the runtime configuration load after the runtime starts. As a consequence, certain Java options such as memory settings do not work with this method.

System properties

The com.semarchy.xdi.graceful-shutdown-delay system property can be used to configure a graceful shutdown of the runtime.

Runtime graceful shutdown
-Dcom.semarchy.xdi.graceful-shutdown-delay=30s

Java Management Extensions (JMX) variable

Java Management Extensions (JMX) is a technology for managing and monitoring Java applications. It allows you to follow memory or class usage with utilities like jmap or external tools such as Visual VM. Java enables JMX features by default, but only on the local machine unless explicitly set otherwise. In this way, you can make use of JMX to monitor the xDI Runtime locally.

For more information about JMX, see the Oracle documentation.

If you want to prevent tools from monitoring the xDI Runtime, you can disable JMX in one of two ways.

  1. Stop the xDI Runtime.

  2. Edit or create the XDI_RUNTIME_OPTS environment variable for your machine or user session.

  3. Append the parameter -XX:+DisableAttachMechanism to this variable.

  4. Start the xDI Runtime

Block monitoring with startup files

  1. Stop the xDI Runtime.

  2. Edit the initvariable.bat (Windows) or initvariable.sh (Linux, macOS) file.

  3. Add the parameter -XX:+DisableAttachMechanism to the XDI_RUNTIME_VM_PROPERTIES variable in the file.

  4. Start the xDI Runtime