IBM Integration Bus, Version 10.0.0.0 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Adding files to a BAR file

To deploy a group of related files to an integration server, include them in a BAR file.

Before you begin

Create a BAR file for each configuration that you want to deploy. For more details, see Creating a BAR file.

About this task

You can add any deployable resources from your workspace to a BAR file. If you select Add workspace project source files, the source and project files for all message flows, message model schema files, message sets, or other deployable resources in the BAR file are included. For more information about the files that you can include in a BAR file, see BAR file.

Subflows that are defined in .msgflow files are not displayed in the BAR file as separate items, and are added automatically. To include these subflows, you have to add only the parent flow. Subflows that are defined in .subflow files are displayed in the BAR file as separate items and can be deployed as individual resources. If a parent flow is added that contains these subflows, the subflows are added to the BAR file automatically when the BAR file is built.

You can add the following files manually by following these steps:
  • message flow files
  • DLL files
  • ESQL files
  • Java™ JAR files
  • MAP files
  • XML files
  • XSLT files
  • Message sets
However, JAR files or .NET assemblies (DLL files) that are required by JavaCompute nodes or .NETCompute nodes in message flows are added automatically from your Java project or integration project when you add the message flow. XML and XSL files are also added automatically if they are required by the flow.
When you add a message flow (defined in a .msgflow file) to a BAR file, you can add the flow as a .msgflow file, or add it as a compiled message flow (defined in a .cmf file). Select Compile and in-line resources to add flows as .cmf files. You cannot add the same message flow to a BAR file as both a .cmf file and a .msgflow file. If your flow contains one of the following nodes, you cannot add the flow as a .msgflow file:
  • A user-defined node that is created from a subflow
  • A subflow node that represents a subflow that is defined in a .msgflow file
  • A WebSphere® Message Broker Version 7.0 Mapping node
  • An MQOptimizedFlow node

If you select Compile and in-line resources, ESQL code is embedded in the .cmf file that references it. If you do not select Compile and in-line resources, ESQL files are added to the BAR file as individual resources.

Be aware that if your BAR file contains a mixture of resources that are compiled and resources that are not compiled, you might see unexpected results. For example, if you select the Compile and in-line resources option to create a BAR file that contains an ESQL file and a message flow, the ESQL is embedded in the compiled message flow (.cmf) file. If you then update the ESQL and add it to the BAR file with the Compile and in-line resources option cleared, the ESQL file is added as an individual resource, but the .cmf file uses the original ESQL because the original ESQL remains embedded in the .cmf file. To ensure that all your resources are either compiled or not compiled, when you change the Compile and in-line resources option, also select Remove contents of BAR before building, and rebuild the BAR file.

Try to avoid a mixed deployment case that has message flows deployed as CMF and subflows (.subflow) deployed as source files, along with the ESQL modules that are referenced by these subflows. For more information about this behavior, and examples of the recommended deployment options, see Deploying solutions.

You do not have to redeploy JAR files unless you have updated them. If one or more JAR files in your BAR file are present on the computer where the integration node is running, you can safely remove them from your BAR file before you deploy again. JAR files that are available to the integration node include JAR files that you have deployed and JAR files that exist in the shared-classes directories or the classes subdirectory of the installation directory. For example, the files com.ibm.mq.jar, IntegrationAPI.jar, jplugin2.jar, and javacompute.jar are always visible to the integration node, and do not have to be deployed separately.

You cannot read deployed files back from integration node integration servers. Therefore, keep a copy of the deployed BAR file, or of the individual files in it.

To add files to a BAR file by using the IBM® Integration Toolkit, complete the following steps.

Procedure

  1. Open the BAR file by double-clicking it. The contents of the BAR file are shown in the BAR File editor. (If the BAR file is new, this view is empty.)
  2. On the Prepare tab of the BAR File editor, select deployable workspace resources to add to the BAR file.

    Select Applications, shared libraries, services, and REST APIs to see a list of these resources that can be deployed. If you select an application, shared library, or service, all the contained resources are deployed with that container. Resources that are deployed in an application are isolated from the resources in other applications. Resources that are deployed in a shared library can be used by multiple applications or other shared libraries. If an application refers to a shared library, you must select the shared library to be deployed on the Prepare tab. A shared library can be deployed in the same BAR file as an application that refers to it, or the application and referenced shared library can be deployed in separate BAR files.

    To deploy resources directly to the integration server, click Message flows, static libraries, and other message flow dependencies. After these resources are deployed, they are visible to all other deployed resources in the same integration server. If these resources are used by an application, they are added to the BAR file automatically when you select the application for deployment.

    You can select an individual resource (such as an application, library,.NET application domain, or project resource) to add to the BAR file, or you can add all applications, libraries, .NET application domains, or project resources in the workspace by selecting the appropriate root element. If the application that you select refers to one or more static libraries, those libraries are added to the application .appzip file as nested .libzip files. These referenced static libraries are private and are not accessible to resources outside the application. Therefore, those static libraries are not selected on the Prepare tab by default. The best way to share resources between multiple applications or libraries is to use a shared library. However, if you want to deploy a static library as an integration server-level library, which is accessible to other resources, select the static library to deploy it separately. A .libzip file is created for that static library and added to the BAR file at root level.

    If you select a static library that refers to other static libraries, those referenced libraries are also added to the BAR file as .libzip files.

    If the application that you select refers to one or more .NET application domains, those application domains are added to the BAR file at root level as a .appdomainzip file.

  3. Optional: To include source files, select Add workspace project source files.

    If you select Add workspace project source files, source projects for all applications, libraries, and other compiled resources are added to the src folder of the BAR file.

  4. Optional: To remove existing content from the BAR file before building the new BAR file, select Remove contents of BAR before building.
  5. Optional: If you are adding a message flow to a BAR for a second time, and have used the Manage tab to change flow parameters, select Override configurable property values to reset configuration settings. If this control is cleared, existing settings are left in place when a flow is replaced.
  6. Optional: To include message flows as compiled message flow .cmf files, and to include ESQL code directly in the .cmf file of each message flow that references an ESQL file, select Compile and in-line resources. By default, when you add a message flow to a BAR file, it is added as a .msgflow file. By default, each ESQL file that is referenced by one or more of your message flows is deployed as an individual resource, and can be accessed by multiple .msgflow files. If any of the flows that you add to your BAR file contain a subflow that is defined in a .msgflow file, you must select Compile and in-line resources.
  7. Click Build and Save.

Results

The Manage tab lists the files that are now in your BAR file. Expand your applications and libraries to view their contents. Compiled resources in the BAR file are shown in alphabetical order in the tree. You can edit only root elements. For example, if you have added an application to the BAR file, you can rename the .appzip file or add comments to it. You cannot edit the resources inside the .appzip file, but you can edit the configurable properties for those resources.

You cannot remove individual resources from .appzip, .appdomainzip, .libzip, or .shlibzip files. To remove these resources, you must remove the application, .NET application domain, or library.

You can choose not to display your source files by selecting Built resources or Configurable properties from the list in the Filter by menu.

What to do next

If you use configurable properties, see Editing configurable properties.

If you want to have multiple instances of a flow with different values for the configurable properties, see Adding multiple instances of a message flow to a BAR file.

To make further changes to your BAR file, see Editing a BAR file manually.

When your BAR file is complete, deploy it by following the instructions in Deploying a BAR file.


af03880_.htm | Last updated 2015-03-27 19:26:43