Configuring FX Professional

This page describes two methods for overriding default configuration in FX Professional.

For information on individual configuration items, see FX Professional Configuration.

Overriding configuration at deployment

As of FX Professional version 3.38, customers have the option to use an external file to override the AppConfig configuration options packaged within the FX Professional WAR file. This provides you with the flexibility to enable features in some environments, but not in others. For example, you may want to test a new feature in a test environment before enabling it in production.

You can use this method to override configuration options that take boolean, integer, or string values. To override options that take a JavaScript object, see the Overriding configuration in source code section below.

To override the configuration options this way, follow the steps below:

  1. Create a file in which to store the external configuration. For example, <tomcat_root>/conf/fxpro/ExternalAppConfig.json.

  2. In the application context for FX Professional, set the JNDI environment variable CONFIG_FILE to an absolute or relative path to the file you created above. For example, in Tomcat 9, add the following environment entry to the file <tomcat_root>/conf/Catalina/localhost/<variant>trader.xml:

    <Environment name="CONFIG_FILE"
      type="java.lang.String" override="false" />

    For more information on setting JNDI environment entries for FX Professional, see FX Professional JNDI configuration and Deploying FX Professional.

  3. Set configuration options in the external configuration file as properties of a single JSON object literal. For example, if you’re licensed to use the block trade feature but it is disabled in your FX Professional WAR file, you can enable it in a deployment by overriding the value for FEATURE_BLOCK_TRADE_ENABLED. The external configuration file would look like this:


Overriding configuration in source code

This method requires the source code distribution of FX Professional. The benefits of overriding the configuration in the source code are that any changes are tracked, and any new configuration set is guaranteed to be present at deployment.

To override the configuration, assign new values to properties of the ExtendedAppConfig object in the file /fxtrader/src/customers/your_banks_name/ExtendedAppConfig.js. The default configuration is defined in the file /fxtrader/src/fxtrader-default-aspect/AppConfig.js, which should not be edited directly.

The contents of the file AppConfig.js changes in future releases of FX Professional. To avoid merging your configuration changes with future changes to AppConfig.js, add your configuration to the ExtendedAppConfig.js file.

In the example below, ExtendedAppConfig.js has been used to enable the Block Trades feature and adjust the maximum number of rows that may be uploaded to Block Trades in a spreadsheet:

Example use of ExtendedAppConfig.js
export default class ExtendedAppConfig extends AppConfig {
  constructor() {
    this.options.FEATURE_BLOCK_TRADE_ENABLED = true;
    this.options["BLOCK_TRADING.UPLOAD_ROW_LIMIT"] = 80; (1)
1 Note that the name of this option includes a period (.), and so JavaScript’s array syntax for referencing object properties must be used.

See also: