Deploying resources to an integration node by using a custom integration application

Deploy BAR files to the integration nodes in your integration node network by using the IBM® Integration API Exerciser, or a custom integration application.

About this task

You can also check the result of a deployment by using the IBM Integration API.

To use the IBM Integration API to deploy files and check the results:

Procedure

  1. Connect to the integration node by clicking File > Connect to Local Integration node or File > Connect to Remote Integration node.
    This action opens the Connect to Integration node dialog.
  2. Enter the relevant connection parameters in the dialog.
    A hierarchical representation of the integration node and its resources is displayed.
  3. Complete one or more of the following operations:
    • Click an object in the tree to display the attributes of that object.
    • Right-click an object in the tree to call IBM Integration API methods that manipulate that object. For example, right-clicking an integration node opens a menu that includes the items Start user trace.
    • Use the log pane at the bottom of the screen to view useful information that relates to the operation in progress.

Example

The following example custom integration application connects to an integration node that is running on the local computer. The integration node is listening for webadmin requests on the web administration port (the default is 4414). The code deploys a BAR file that is called MyBAR.bar to an integration server called default that is running on the integration node, and displays the result.

import com.ibm.broker.config.proxy.*;
public class DeployBAR {

  public static void main(String[] args) {
    BrokerConnectionParameters bcp =
       new IntegrationNodeConnectionParameters("localhost", 4414);
    try {
      BrokerProxy b = BrokerProxy.getInstance(bcp);
      ExecutionGroupProxy eg = b.getExecutionGroupByName("default");
      DeployResult dr = eg.deploy("MyBAR.bar", true, 30000);
      System.out.println("Result = "+dr.getCompletionCode());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}