Resolving problems when developing custom integration applications

Your custom integration application hangs if the integration node is not available

Procedure

  • Scenario: When the integration node is unavailable, the custom integration application hangs.
  • Explanation: Communication between the IBM Integration API and the integration node is asynchronous, therefore the custom integration application hangs because it is waiting for a message from the integration node.
  • Solution: Configure the maximum amount of time that the custom integration application waits by using the following method:
    // Wait for a maximum of 10 seconds
    BrokerProxy.setRetryCharacteristics(10000);
    The value specified represents the time in milliseconds that the custom integration application will wait for information before throwing the BrokerProxyPropertyNotInitializedException exception.

    If you set this timeout value too low, an exception is thrown, even if the integration node is available.

You set a property of an object and query its value, but the value has not changed

Procedure

  • Scenario: You have set a property of an object, then queried its value; the value has not changed.
  • Explanation: Methods that change properties of integration node objects are not processed immediately. If you call a property change method on a custom integration application object, the IBM Integration API sends a message that requests the specified change to the integration node. The integration node processes the request asynchronously, and notifies all AdministeredObjectListeners of the affected object when the change has been attempted.
  • Solution: Methods that change state typically return to the calling program as soon as the request has been put to the queue manager of the integration node, or, following a call to BrokerProxy.beginUpdates(), as soon as the request has been added to the current batch. If the property has still not been updated after the action's response to the request has been returned to the application, consult the response message for more details.

You cannot connect to an integration node when using a .broker file

Procedure

  • Scenario: You cannot connect to an integration node when you use a .broker file.
  • Explanation: If your custom integration applications use the MQPropertyFileBrokerConnectionParameters class, they can connect to an integration node by using a connection file that has a .broker extension. However, this file can be parsed only if an XML parser is available.
  • Solution: Ensure that a supported parser is available on the CLASSPATH. A supported parser is shipped with IBM Integration Bus.

    Alternatively, your application can use the IntegrationNodeConnectionParameters class instead of the MQPropertyFileBrokerConnectionParameters class. This class connects to an integration node by specifying the host name, queue manager name, and web administration port of the target integration node directly. This method does not require an XML parser.