Deploying message maps

By default, message map files are deployed in BAR files as a part of an application, integration service, or library that provides an integration solution. You can also deploy a map as an independent resource if you are managing your message flows that way. If you change a message map, you must redeploy your integration solution, or independent message flows.

About this task

IBM® Integration Bus prepares message maps for execution on deployment instead of when the first message is flowed through the Mapping node.

This behavior has the following advantages:
  • There is no drop in performance from initializing a message map when the first message is flowed through the node.
  • The message map and its dependencies, such as any referenced message models, are resolved and validated during deployment to ensure that the message map runs successfully on first message.
  • The message map syntax is validated during deployment to ensure that the message map runs successfully on first message.
  • When IBM Integration Bus is restarted, the message map syntax and its dependencies are validated before the message flow can be restored.
Note: To avoid a deployment failure, you must include all the message map dependencies, referenced schemas, ESQL modules, Java™ classes, and other resources in your BAR file. You must resolve any message map static errors such as an invalid XPath expression. If these requirements are not met, you receive a BIP message that reports the map generation failure.
Note: Any map that is in the BAR file but is not used (either because the map is in a branch of the message flow that is not executed or because the map is not referenced by a Mapping node), is now validated upon deployment. For the deployment to complete without error, you might need to remove any .map files (from your application, library, or integration project) if the .map files are not intended for use by a Mapping node that is in the BAR file.

Procedure

When you deploy message maps, the behavior of IBM Integration Bus is as follows:

  • Behavior when you deploy or redeploy a BAR file:
    1. All message maps are validated to ensure that all the map dependencies can be resolved at run time. This validation step checks that the referenced message models such as XML schema files, DFDL schema files, and message set files, and the referenced submaps can be resolved.
    2. The message maps and their dependencies are generated to an executable form. This step also checks that the contents of the map and submaps are valid, and that they have no errors such as an invalid XPath expression.
    3. If the message maps and their dependencies are valid and can be successfully generated, they are persisted in both the deployed and generated forms to the configuration store. Otherwise, the deployment is stopped and you receive a BIP message that reports the map generation failure.
  • Behavior after deployment:
    1. Background processing is started to compile the generated message maps to Java byte code so that they can benefit from JIT optimization. The Java byte code for each map is persisted on completion of the compilation.
  • Behavior when the first message flows runs after deployment or redeployment:
    1. If the background compilation processing is complete, the Mapping node runs the java byte code and the JIT optimization starts.
    2. If the background compilation processing is not complete, the Mapping node runs the map initially in the generated form until the compilation is complete. Then, JIT optimization starts.
  • Behavior for any subsequent messages that flow after deployment or redeployment:
    1. The prepared message map runs. If the background processing is completed, the JIT optimization starts.
  • Behavior when you restart IBM Integration Bus, that is, when you restart an integration node, an integration server, an integration solution, or a message flow:
    1. If the compiled Java byte code for the map is available, it is loaded and the Mapping node runs this code as soon as the first message is processed. Then, JIT optimization starts.
    2. If the generated form for the map is available and loaded, background processing is started to compile the generated map to Java byte code so that they can benefit from JIT optimization. The Java byte code for each map is persisted on completion of the compilation.
    3. If neither the generated or the compiled map code are available, the map is processed in the same way as when you deploy or redeploy a BAR file.