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


Creating objects by using a custom integration application

Create new objects associated with an integration node.

About this task

The following example adds an integration server called EG2 to the connected integration node.

import com.ibm.broker.config.proxy.*;

public class AddExecutionGroup {

  public static void main(String[] args) {
        
    BrokerProxy b = null;
    try {
      BrokerConnectionParameters bcp =
         new IntegrationNodeConnectionParameters(
           "localhost",
           4414);
      b = BrokerProxy.getInstance(bcp);
      ExecutionGroupProxy e = b.createExecutionGroup("EG2");
      b.disconnect();
    } catch (ConfigManagerProxyException cmpex) {
      System.out.println("Error connecting: "+cmpex);
    }
  }
}

Because requests are processed asynchronously by the integration node, the ExecutionGroupProxy object that is returned from the createExecutionGroup() method is a skeleton object when it is returned to your application, because it refers to an object that might not yet exist in the integration node. The application can manipulate the object as if it existed on the integration node, although the actual creation of the underlying object might not happen for some time.

If the request to create the object described by the skeleton fails, all requests that use the skeleton also fail. Therefore, if integration server EG2 cannot be created, all subsequent requests that concern the skeleton object fail. However, unless the application explicitly checks for errors, it works in the same way as it does in the successful case, because no exception is thrown unless, because of a communication problem, a message cannot be sent to the integration node.

See Checking the results of integration node management by using a custom integration application for further information about how to detect problems such as these.


be43100_.htm | Last updated 2015-09-24 12:54:08