Debugging a Java Service while it Runs in Integration Server
Before you can remotely debug a Java service, complete the following setup:
After the setup is complete, you can debug the Java service. To do so, open the remote Java service to set breakpoints. Then run the Remote Java Application launch configuration, which you created earlier, in debug mode and execute the Java service. The debug session suspends execution at any breakpoints you set in any of the Java services in the Java project identified in the launch configuration. In Designer you can use the Debug perspective to inspect the state of the service execution.
To debug a Java service while it runs in
Integration Server 1. Set breakpoints in the remote Java service by performing the following:
a. From the Package Explorer view, expand the Java project you created for the IS package that contains the Java service you want to debug.
b. Expand the code/source folder to locate the Java service you want to debug.
c. Double click the Java service’s .java file to open the service in the Java editor.
d. To set breakpoints, double click in the left margin next to the executable lines of code where you want breakpoints. Designer displays the breakpoint enabled icon () in the margin. For more information, see the Eclipse Java Development User Guide. Important: After setting breakpoints, service execution will be suspended every time the service is executed. That is whether it is executed from Designer, Integration Server Administrator, or from an IS client.
2. Establish a listener that waits for the Java service to execute by running the launch configuration in debug mode.
a. In Designer: Run > Debug Configurations.
b. In the Debug Configurations dialog box, under Remote Java Application select the launch configuration you created for debugging the Java service.
c. In the right panel, click Debug.
3. Execute the service in any way you want. For example, you can:
In
Designer in the Package Explorer view, select the Java service and then select
Run As > Runs Service.
Debug a flow service that invokes the Java service. While stepping through the flow service using the flow service debugger, when the step invokes the Java service executes, control is transferred to the Remote Java Application debugger.
Invoke the service from an IS client.
4. Switch to Debug perspective by selecting Window > Open Perspective > Debug.
Integration Server suspends the execution where you specified breakpoints. In Designer you can use the Debug perspective to inspect the state of the Java service. Use the actions in the Debug view toolbar to resume the execution. For more information about using the views in the Debug perspective, see the Eclipse Java Development User Guide.
Related Topics