Attach a Java Class Loader policy to one or more JavaCompute nodes in a message flow to define the behavior of the class loaders that are used by the node.
You use a JavaCompute node in a message flow to work with messages by using the Java™ language. The JavaCompute node loads and runs a Java class that is defined as the Java class property on the node. Typically, this class is deployed, along with any other required classes, in a Java archive (JAR) file that is contained in a BAR file. Any Java classes that are deployed in this way are loaded by an integration server-wide class loader. You can override this behavior by using a Java Class Loader policy.
To attach a Java Class Loader policy to a JavaCompute node, set the Java classloader service property of the JavaCompute node to the name of the policy, in the format {policyProjectName}:policyName. You must deploy this policy before the associated message flow is started.
Property | Property name in .policyxml file | Value |
---|---|---|
JAR files to be loaded | includedDeployedJars | This property identifies the JAR files that are loaded by the class loader. The JAR files
must have been deployed to the integration server. Set this property to one
of the following values:
Java classes in the JAR files that are specified by the JAR files to be loaded property are searched and loaded before classes in the JAR files that are specified by the Shared JAR file path property. Note: Inside applications or shared libraries that have
Java isolation enabled, you can use a Java Class Loader policy
only if the JAR files to be loaded property is set to
none. Deployed JAR files inside applications or shared libraries with Java isolation enabled are not visible to Java Class Loader
policies (see Java isolation).
Value type: String |
Shared JAR file path | sharedJarPath | This property specifies the fully qualified file path of a single additional directory to be
searched by the class loader. The directory must not be in the work path, as defined by the
MQSI_FILEPATH and MQSI_WORKPATH environment variables. If the directory is specified, it is used to resolve additional classes. If the directory is not specified, the integration server shared-classes directories are used to resolve additional classes. Java classes in the JAR files that are specified by the JAR files to be loaded property are searched and loaded before classes in the JAR files that are specified by the Shared JAR file path property. This property has a default value of automatic.Value type: String |