Home
Sharing a WebSphere Application Server debug session
This example shows how a developer can share a WebSphere Application Server v7 debug session with another user by first parking the session in Rational Team Concert. A parked debug session has no owner and can be retrieved by another use at a later time.
In this example, Patrick has loaded into his repository workspace the contents on the Web Development Component. Patrick performs these actions:
Start the WebSphere Application Server in debug mode.
Add the project RAD75EJBWebEAR to the server.
Set a breakpoint in Account.java on the line: if (balance.compareTo(amount) < 0)
In the Debug view, right-click WebSphere Application Server v7.0 at localhost localhost:7777, and select Add to Team Repository.
Note that the Team decoration is added, and you should now see: Patrick can now proceed to debug the application. He will follow the steps listed in Running the sample application in debug mode, and attempt to withdraw a large amount until he hits the breakpoint. At this point Patrick decides to park the debug session by doing the following action:
Right-click [Team] VM [Team-Concert-server-hostname:7777], and select Park Debug Session. Parked debug sessions are stored on the Team Concert Server and nobody owns them. Anyone can retrieve them and regain control.
Figure 24-24 Appearance of a debug session added to a Team Repository
Possibly at a later time, Lara decides to continue Patrick's debug session. She performs these actions:
In the Team Artifacts view, expand the node Debug under the Project Area.
In the node Search Team Debug Sessions, select Parked Debug Sessions (Figure | 4-25).
Figure 24-25 Search for parked debug sessions
In the Team Debug view, identify the session started by Patrick, right-click the session, and select Debug (Figure | 4-26).
Figure 24-26 Team Debug view showing a parked debug session
A dialog prompts whether you want to import breakpoints. Click Yes. At this point Lara will see in the Debug perspective the code that contains the breakpoint. The variables view shows the contents as determined by the workflow previously followed by Patrick. Lara will also see a copy of the standard output and standard error streamed to the console (the same keep being streamed to the console of Patrick's instance of Application Developer). While Lara steps through the code, Patrick will see the results in the Web browser opened on his machine. Lara can then decide to transfer the session back to Patrick, or to park it again on the server.
ibm.com/redbooks