Application configuration file

You create an application configuration file to provide the Genero Application Server (GAS) with the information needed to run an application.

Typically, the name of the configuration file matches the name of the application and has an xcf extension. For example, if the application name was "app1", create a configuration file named app1.xcf.

The configuration file defines an application environment, and starts with the Application element. Within this element, you can:
  • define local resources
  • specify the execution environment
  • specify the timeout, resources, and output settings
  • refer to previously defined components by using the attribute Using

The organization of the elements within the application configuration file depend on the type of application. See Configuration for Web and service applications.

Save the file in a defined GROUP directory. By default, the directory where the GAS searches for external application configuration files is defined in the GAS configuration file (default as.xcf) by the element:
<GROUP Id="_default">directory</GROUP>
You can specify alternate directories; see GROUP (for an application) or GROUP (for a service).

The application configuration file becomes available once added to the GAS. It is re-read at each application launch. There is no need to restart the GAS after modifying an application configuration file.

This examples shows a well-formed external application configuration files.

Example - A simple application configuration file

The simplest application configuration file specifies a parent application and the path to the compiled application files. The application inherits the configuration of the parent application.

Things to note in this example:
  1. The Id attribute of <APPLICATION> element is omitted; even if included, its value is not read.
  2. The Parent application is defaultwa. See Abstract applications.
  3. The path to the application executables is defined by the PATH component. See PATH (under EXECUTION).
  4. The MODULE element can specify the name of the .42r module to run. In this example the module name is the same as the configuration file name, therefore the element is not necessary. See MODULE.
<APPLICATION Parent="defaultwa"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.10cfextwa.xsd">
  <EXECUTION>
    <PATH>$(res.path.fgldir.demo)/Widgets</PATH>
  </EXECUTION>
</APPLICATION>