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.integration.admin.proxy.*;

public class AddIntegrationServer {

  public static void main(String[] args) {

    IntegrationNodeProxy node = new IntegrationNodeProxy("localhost",4414,"","",false);
    try {
      IntegrationServerProxy server = node.createIntegrationServer("EG2");
    } catch (IntegrationAdminException e) {
      System.out.println("Error connecting: "+e);
    }
  }
}

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.