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

See information about the latest product version

Debugging Java

When message flow processing has paused at a breakpoint that you have set in source code within a node that contains Java™ code, you can examine and modify the Java variables in the Flow Debugger.

If you notice that performance has degraded after following these steps, see Resolving problems with performance.

  1. To open the Command Console, click Start > All Programs > IBM Integration Bus 9.0.0.0 > IBM Integration Console 9.0.
  2. Start the broker by running the mqsistart command in the Command Console.
  3. Check that the Java debug port is set by running the mqsireportproperties command (all on one line) in the Command Console:
    mqsireportproperties broker_name -e integration_server_name -o ComIbmJVMManager -r
    For example:
    mqsireportproperties TEST -e default -o ComIbmJVMManager -r
  4. Set the Java debug port by running the mqsichangeproperties command (all on one line) in the Command Console:
    mqsichangeproperties broker_name -e integration_server_name 
    -o ComIbmJVMManager -n jvmDebugPort -v port_number
    For example:
    mqsichangeproperties TEST -e default 
    -o ComIbmJVMManager -n jvmDebugPort -v 3920
  5. Stop and restart the broker by running the mqsistop and mqsistart commands.
  6. Open the message flow that you want to debug in the Message Flow editor by double-clicking its name in the Application Development view.
  7. Add a breakpoint where the Java method is called, by following the instructions in Adding breakpoints in the flow debugger.
  8. To step directly into the Java code during the debugging process, add a breakpoint in the Java code.
  9. Deploy the broker archive (BAR) file that includes the JAR file that contains the Java code, by following the instructions in Deploying a broker archive file.
  10. Click Run > Debug to open the Debug wizard.
  11. Right-click Debug in the list of elements on the left and click New.
  12. Set the Java Debug Port with the same value that you specified for the -v parameter on the mqsichangeproperties command, and click Apply to save your changes.
  13. Click the Source tab, specify the source file location, and click Apply to save your changes.
  14. Click Debug to start the debug process.

Working with Java variables

When message flow processing has paused at a breakpoint in the source code within a node that contains Java code (a user-defined node or a JavaCompute node), you can browse Java variables in the Variables view on the Debug perspective, and change their associated data values.

  1. Switch to the Debug perspective.
  2. Click the Variables tab to open the Variables view if it is not already open. Variables are shown in a tree, using the symbol Variable.
  3. To work with a variable, right-click it and select an option from the menu.
Message flow processing continues until the next breakpoint that is set in the logical processing of the current message. If there is no further enabled breakpoint at which the flow instance can pause, processing runs to completion and the flow instance is removed from the Debug view.

Next:

When you have completed debugging the message flow, you can remove the breakpoints or end the debugging session:

ag11370_.htm | Last updated Friday, 21 July 2017