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
|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 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
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/XZY2 are accepted for processing by the module, but not updates for
When you set
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
FALSE (wildcard characters in the subscribed subject are treated as such when listening for updates)
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.
add-javaclass ... class-id ExampleJavaModule ... end-javaclass
In the Java module’s configuration file:
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
%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
<Java-module-name>.log For example,
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
discard() methods of the module’s implementation of the
DataProvider interface. For more about this, see the Transformer Java Module API Documentation.
FALSE (the module’s provider callbacks are only called once for each request or discard)
log-level specifies the severity of the errors and events that this Transformer reports to the Java module’s log file (see
Reports all errors and events.
Reports events and information regarding normal operation of the Java module, and all errors included in the
Reports minor errors and all errors included in the
Reports errors regarding data corruptions and all errors included in the
Reports serious errors and all errors included in the
Reports critical errors that prevent the Java module from running.