Process definition file

The process definition file is an XML file used to configure the JVMs that are started by the build daemon. Both the personal daemon and the shared daemon require the location of a process definition file to be passed in as a parameter when starting the daemon.

DBB provides a sample process_definitions.xml file that can be used by both the shared daemon and the personal daemon with minimal additional configuration. The sample includes the groovyz process definition, which executes a Groovy script and is optionally used by the groovyz shell script. Additionally, as of DBB version 3.0.1, this sample includes the dbb process definition, which can be used to run the DBB CLI and therefore, the zBuilder. For more information on process definition execution, see Using the shared daemon.

Some XML elements and attributes are ignored by the personal daemon, as it is explained in the table of the "Simple process definition".
Note: Starting from version 2.0.2, the personal daemon is deprecated and will be removed in a future release. You should use the shared daemon, which has been enhanced with additional security mechanisms.

Update considerations

  • RACF permission support in DBB 2.0.2 and later process definitions require that :/usr/lib be added to the -Djava.library.path entry in the <options> element.
  • Java 21 daemon support in DBB 3.0.2 and later requires the following options to be added to the <options> element of the process definitions file:
    • -Dfile.encoding=COMPAT: Maintain the same JVM encoding handling as Java 17.
    • -Djava.security.manager=allow: Allow the usage of the Java Security Manager, used to intercept System.exit calls.

Simple process definition

The following code represents a simple process definition.

<ProcessManager>
   <ProcessDefinition>
      <name>groovyz</name>
      <process>com.ibm.dbb.build.ext.buildprocess.GroovyBuildProcess</process>
      <classpath>$DBB_HOME/lib/*:$DBB_HOME/groovy/lib/*:/usr/include/java_classes/isfjcall.jar</classpath>
      <options>-Djava.library.path=$DBB_HOME/lib/:/usr/lib/java_runtime64/:/usr/lib</options>
      <count>1</count>
   </ProcessDefinition>
</ProcessManager>

The following table explains the options that you can see in the code.

Element Definition
<name> The alias that you use when referring to the process with the client program (no change is needed).
Note: The groovyz shell script calls the groovyz process definition automatically.
<process> The DBB provided class to launch the JVMs (no change is needed).
<classpath> The Java classpath used to launch the daemon JVMs (change it depending on your installation).
Note: Classpath arguments that are passed to the groovyz shell script are ignored when the daemon is used.
<options> Any options that you want to pass to the build process (such as debug).
Note: Java options passed to the groovyz shell script are ignored when the daemon is used.
<count> The number of JVM processes that you want to start when the daemon launches.
Additional JVMs can be started by using the daemon client. (The personal daemon only starts 1 process.)

For the most part, no changes are needed with the sample process definition file unless your directories are different than above. The value for count depends on how many builds you are running concurrently using the shared daemon. In general no more than 1 or 2 JVMs are needed.

Additional process definition configuration for the shared daemon

Starting from 2.0.2 the shared daemon supports additional process definition settings.

All of the following additional configurations are optional.

Advanced shared daemon process definition

The following code represents an advanced process definition.

<ProcessManager>
   <ProcessDefinition>
      <name>groovyz</name>
      <process>com.ibm.dbb.build.ext.buildprocess.GroovyBuildProcess</process>
      <classpath>$DBB_HOME/lib/*:$DBB_HOME/groovy/lib/*:/usr/include/java_classes/isfjcall.jar</classpath>
      <options>-Djava.library.path=$DBB_HOME/lib/:/usr/lib/java_runtime64/:/usr/lib</options>
      <count>1</count>
      <max_requests>20</max_requests>
      <max_requests_per_user>1</max_requests_per_user>
   </ProcessDefinition>
   <LoggingConfiguration>
     <output>/etc/dbb/daemon/logs</output>
     <kb_max_log_size>5120</kb_max_log_size>
     <max_log_files>3</max_log_files>
     <log_file_permissions>700</log_file_permissions>
   </LoggingConfiguration>
</ProcessManager>

The following table explains the advanced ProcessDefinition element that you can see in the code.

Element Definition
<max_requests> The maximum number of build requests by all users allowed in the queue. If additional build requests are received in the queue, an error message is returned to the user. Default is unlimited.
<max_requests_per_user> The maximum number of build requests per user allowed in the queue. If additional build requests are received in the queue by the same user, an error message is returned to the user. Default is unlimited.

The following table explains the advanced LoggingConfiguration element that you can see in the code.

Element Definition
<output> The location to write the shared daemon logs. Default location is /var/dbb/logs/.
<kb_max_log_size> The maximum size of each log file created. Default is 5120KB.
<max_log_files> The maximum number of log files created. When the maximum size is reached, the older log files are overwritten. Default is 3.
<log_file_permissions> The z/OS UNIX file system permissions used when the log files are created. Default is 700.