Debugging an application that is running in a CICS JVM

The JVM in CICS® supports the Java™ Platform Debugger Architecture (JPDA), which is the standard debugging mechanism provided in the Java 2 Platform. This architecture provides a set of APIs that allow the attachment of a remote debugger to a JVM. A number of third party debug tools are available that exploit JPDA and can be used to attach to and debug a JVM that is running an enterprise bean, CORBA object or Java program. Typically the debug tool provides a graphical user interface that runs on a workstation and allows you to follow the application flow, setting breakpoints and stepping through the application source code, as well as examining the values of variables. The debugging process is summarized in Figure 1.
Figure 1. Debugging in the CICS JVM using JPDA.
Debugging a CICS EJB, CORBA or Java program in the CICS JVM using Java Platform Debugger Architecture (JPDA). The remote debugger runs on a client workstation connected to the debug JVM over a TCP/IP link using the JPDA APIs.
JPDA consists of the following layered APIs:
Java Debug Interface (JDI)
This is a Java programming language interface providing support for remote debugging. This is the highest level interface in the architecture, and can be used to implement a remote debugger user interface without having to write any code that runs in the application JVM or understand the protocol between the debugger and the JVM. Most third party debuggers that support JPDA currently use this API.
Java Debug Wire Protocol (JDWP)
This API defines the format of the flows that run between the application JVM and the debugger user interface. This protocol is for use by debuggers that need to exploit the communication at a lower level than the JDI, and for JVM suppliers or more advanced debugger developers who need to support the standard connection architecture from the application JVM side.
Java Virtual Machine Debug Interface (JVMDI)
This is a low-level native interface within the JVM. It defines the services a Java virtual machine must provide for debugging, and can be used by advanced debugger developers who wish to implement debugger code that runs inside the application JVM ( to implement an alternative transport mechanism for debugger connection, for example).
When you start the JVM in debug mode, the JVMDI interface is activated and additional threads are started in the JVM. One of these threads handles communication with the remote debugger, the others monitor the application that is running in the JVM. You can issue commands in the remote debugger, for example to set break points or to examine the values of variables in the application. These commands are activated by the listener and event handler threads in the JVM.

There is more information about JPDA on the web site java.sun.com/products/jpda.