Configure multiple dispatchers

If you need to configure multiple dispatchers, you must configure log, temporary and session directories in order to distinguish the entries for each dispatcher.

Multiple dispatchers are typically not needed; in fact they are rarely used. You would need to start multiple dispatchers if you needed to have different environments using the same version of the Genero Application Server on the same host. For example, you may wish to co-locate your production, training, and development environments.

To start multiple dispatchers on a single host, you create a copy of the application server configuration file (default as.xcf) for each dispatcher you will start. At a minimum, each dispatcher will have its own uniquely-named configuration file, and the file will have different values for the listening port.

It is important to also ensure that your log, temporary and session directories remain independent. In the default application server configuration file, these directories are located under the directory specified by the resource res.appdata.path. These examples are extracted from the default application server configuration file:
-- res.appdata.path specifies the directory for application data
-- for the dispatcher

<RESOURCE Id="res.appdata.path"
 Source="INTERNAL">C:\ProgramData\FourJs\gas\2.50.07-130789</RESOURCE>

-- res.log.output.path specifies the log directory,
-- as specified by the LOG element

<RESOURCE Id="res.log.output.path"
 Source="INTERNAL">$(res.appdata.path)/log</RESOURCE>
<LOG>
  <OUTPUT Type="$(res.log.output.type)">$(res.log.output.path)</OUTPUT>
  <FORMAT Type="TEXT">$(res.log.format)</FORMAT>
  <CATEGORIES_FILTER>$(res.log.categories_filter)</CATEGORIES_FILTER>
  <RAW_DATA MaxLength="$(res.log.raw_data.maxlength)" />
</LOG>

-- res.path.tmp specifies the temporary directory,
-- as specified by the TEMPORARY_DIRECTORY element

<RESOURCE Id="res.path.tmp"
 Source="INTERNAL">$(res.appdata.path)/tmp</RESOURCE>
<TEMPORARY_DIRECTORY>$(res.path.tmp)</TEMPORARY_DIRECTORY>

-- SESSION_DIRECTORY specifies the session directory,
-- as specified by the SESSION_DIRECTORY element

<SESSION_DIRECTORY>$(res.appdata.path)/session</SESSION_DIRECTORY>

The quickest (and recommended) way to ensure that a dispatcher's information is not mixing with other dispatcher information is to change the value of the res.appdata.path resource to a directory value unique for the dispatcher. This is the recommended approach.

Alternatively, you can change the values for the OUTPUT element of the LOG element, TEMPORARY_DIRECTORY and SESSION_DIRECTORY directly.