Java Transformer Module configuration

The Java Transformer Module (JTM) is Transformer’s in-built support for running custom modules that you’ve developed in Java using Transformer’s Java Module API. The following configuration items can be used to set up some standard features of a custom Java module that runs under the JTM.

In the Caplin Platform Deployment Framework, add the configuration items described here to the configuration file <Framework-root>/global-config/overrides/<Java-module-name>/Transformer/etc/jtm.conf where: <Framework-root> is the Deployment Framework’s topmost directory and <Java-module-name> is the name of the Java module you’ve developed.
When developing a Java-based module, you also need to configure Transformer to recognise it. This is explained in detail in How can I…​ Create a Java-based Transformer Service blade.

ignore-wildcards

ignore-wildcards specifies that when this custom Java module subscribes to a subject that has regular expression wildcard characters in the subject name, the wildcards are treated as normal characters by the listener that receives updates for the subscription.

When a Java module subscribes to a subject, it can supply the subject as a wildcard pattern, containing regular expression wildcard characters such as * (match any number of characters) and ? (match a single character). For example, it could subscribe to the subject /A/B/X*Y?

The listener that’s set up for the subscription accepts incoming updates according to whether or not their subjects match the wildcards. For example, if the subscription is for /A/B/X*Y?, updates for the subjects /A/B/XZZZY1 and /A/B/XZY2 are accepted for processing by the module, but not updates for /A/B/CZZZY23.

When you set ignore-wildcards to TRUE, you turn off the update listener’s wildcard feature and the listener therefore treats the wildcard characters in the subject name as normal characters. So for the subscription to /A/B/X*Y?, the listener would only accept updates to the subject /A/B/X*Y?

Syntax: ignore-wildcards <boolean>

Type: boolean

Default value: FALSE (wildcard characters in the subscribed subject are treated as such when listening for updates)

module-classid

module-classid specifies the class ID of the Java module. This must be the same as the class-id option of the add-javaclass configuration item for this Java module in the Transformer’s java.conf configuration file.

Syntax: module-classid <java-class-id>

Type: string

Default value: jtm

Example:

In java.conf:

add-javaclass
   ...
  class-id ExampleJavaModule
   ...
end-javaclass

In the Java module’s configuration file:

module-classid ExampleJavaModule

module-logfile

module-logfile specifies the name, and optionally the directory path, of the log file to which this Java module’s events are logged.

The filename can contain the %h parameter, which is replaced at run time by the host name of the machine on which the Transformer is running.

The directory path can contain the %r and %a parameters. At run time, %r is replaced by the root directory (application-root) under which the Transformer runs, and %a is replaced by the Transformer’s DataSource application-name.

Also see log-level.

Syntax: module-logfile <directory-path-and-filename>

Type: string

Default value: <Java-module-name>.log For example, jtm.log

module-multi-request

module-multi-request specifies when TRUE that the request and discard callbacks implemented by registered data providers can be called multiple times. A Java module can register multiple DataProviders for different subjects using an implementation of the DataProviderRegistrar interface.The provider callbacks are the request() and discard() methods of the module’s implementation of the DataProvider interface. For more about this, see the Transformer Java Module API Documentation.

Syntax: module-multi-request <boolean>

Type: boolean

Default value: FALSE (the module’s provider callbacks are only called once for each request or discard)

log-level

log-level specifies the severity of the errors and events that this Transformer reports to the Java module’s log file (see module-logfile).

Syntax: log-level <log-level-name>

Type: string

Default value: INFO

Values accepted:

log-level-name Description

DEBUG

Reports all errors and events.

INFO

Reports events and information regarding normal operation of the Java module, and all errors included in the WARN, NOTIFY, ERROR and CRIT log levels.

WARN

Reports minor errors and all errors included in the NOTIFY, ERROR and CRIT log levels.

NOTIFY

Reports errors regarding data corruptions and all errors included in the ERROR and CRIT log levels.

ERROR

Reports serious errors and all errors included in the CRIT log level.

CRIT

Reports critical errors that prevent the Java module from running.


See also: