Running the IBM Integration API integration node management sample

Run the integration node management sample to display the complete run state of an integration node.

Before you begin

You must have an integration node and an integration server that are started.

About this task

Use the IBM Integration API integration node management sample to display the complete run state of the target integration node. The IBM Integration API integration node management sample consists of two files:
  • A Java™ class: iapi.BrokerInfo. This class is compiled into the IntegrationAPISamples.jar file that is used by the StartBrokerInfo script. If you want to edit and recompile the class, you can find the Java source at the following location:
    • Windows platformOn Windows: install_dir\server\sample\IntegrationAPI\iapi\BrokerInfo.java
    • Linux platformUNIX platformz/OS platformOn other platforms: install_dir/server/sample/IntegrationAPI/iapi/BrokerInfo.java
    .
  • A script file that you use to call the Java code and pass the parameters that match your environment:
    • Windows platformOn Windows: install_dir\server\sample\IntegrationAPI\StartBrokerInfo.bat
    • Linux platformUNIX platformz/OS platformOn other platforms: install_dir/server/sample/IntegrationAPI/StartBrokerInfo

Procedure

  • Run the IBM Integration API integration node management sample by running the command for your platform:
    • Windows platformOn Windows, open the IBM® Integration Console and run the following command:
      install_dir\server\sample\IntegrationAPI\StartBrokerInfo.bat integrationNodeName port_number
    • Linux platformUNIX platformz/OS platformOn other platforms:
      1. Start an integration node command environment by running mqsiprofile, or follow the guidance that is provided in the StartBrokerInfo shell script to configure the correct CLASSPATH for your environment.
      2. Run the shell script:
        install_dir/server/sample/IntegrationAPI/StartBrokerInfo integrationNodeName port_number
    where
    integrationNodeName
    Specifies the name of the integration node.
    port_number
    Specifies the port number of the integration node.
    Note: You can run the script with no parameters. The script then uses the name of the default node (TESTNODE_user_name) and the default port (4414).
    The IBM Integration API connects to the integration node by using the host name and port that are specified. Next, the IBM Integration API deploys the specified BAR file to the specified integration server.
  • Run the integration node management sample by entering the appropriate command for your platform:
    • Windows platformOn Windows, use the Command Console to run the following command:
      install_dir\server\sample\IntegrationAPI\StartBrokerInfo.bat 
    • Linux platformUNIX platformz/OS platformOn other platforms:
      1. Start an integration node command environment by running mqsiprofile, or follow the guidance provided in the StartBrokerInfo shell script to configure the correct CLASSPATH for your environment.
      2. Run the shell script:
        install_dir\server\sample\IntegrationAPI\StartBrokerInfo.bat
    The complete run state of the integration node is displayed. For example:
    (17/10/14 11:17:43) Connecting. Please wait...
    (17/10/14 11:17:44) Successfully connected to the integration node.
    (17/10/14 11:17:44) Successfully connected to the integration node.
    (17/10/14 11:17:44) Integration node 'integrationNodeName' is running.
    (17/10/14 11:17:44)   Integration server 'integrationServerName' on 'integrationNodeName' is running.
    (17/10/14 11:17:44)     Application 'myApp' on 'integrationServerName' on 'integrationNodeName' is running.
    (17/10/14 11:17:44)     Application 'myService' on 'integrationServerName' on 'integrationNodeName' is running.
    (17/10/14 11:17:44)     Message flow 'myMessageFlow' on 'integrationServerName' on 'integrationNodeName' is running.
    (17/10/14 11:17:44) Disconnected.
    
    where integrationServerName is the name of your integration server, and integrationNodeName is the name of your integration node.
  • If you prefer, you can run this sample in interactive mode, which causes the sample to listen for changes to the integration node.
    1. To run the sample in interactive mode, specify the -i option on the command.
      For example:
      install_dir\server\sample\IntegrationAPI\StartBrokerInfo.bat
      	c:\myBroker.broker  -i
      
      In interactive mode, you see the output shown earlier, and the additional response:
      (13/08/08 15:53:46) Listening for changes to the integration node...
    2. To stop the sample when it is running in interactive mode, force it to end by using CTRL+C.