Application Debugging

In some cases, you might want to monitor the activity of the JVMClosed Java Virtual Machine. A virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. running as part of your .NET application. The jconsole is a great tool that allows you to troubleshoot the JVM internals.

Opening the JMX Port

The following is used to open the JMX port to view and monitor the JVM loaded into the .NET process memory address.

Have the following settings as part of your app.config file:

<?xml version="1.0" encoding="utf-8" ?>
    <section name="GigaSpaces" type="GigaSpaces.Core.Configuration.GigaSpacesCoreConfiguration, GigaSpaces.Core"/>
      <JvmCustomOptions IgnoreUnrecognized="false">
        <add Option="-Dcom.sun.management.jmxremote.port=5144"/>
        <add Option="-Dcom.sun.management.jmxremote.ssl=false"/>
        <add Option="-Dcom.sun.management.jmxremote.authenticate=false"/>

See .NET JVM Configuration for more details.

Viewing in JConsole

  1. Start jconsole – jconsole is located under the bin directory of the Java home, by default it is under <Installation dir>\Runtime\java\bin

  2. Once the jconsole is started, select the Local tab:


  3. This shows the status of the JVM running in your .NET application:


For more details about JMX and jconsole, refer to: - Sun - Monitoring and Management Using JMX - Sun - Using jconsole.

Viewing in JVisualVM

As an alternative to viewing in JConsole, you can use JVisualVM.

  1. Start JVisualVM. The default location is the C:\GigaSpaces\XAPClosed GigaSpaces eXtreme Application Platform. Provides a powerful solution for data processing, launching, and running digital services.NET-17.0.0-x64\Runtime\Java directory.

  2. Connect via JMX. Go to File | Add JMX Connection...


  3. Enter the Connection: localhost:5144

  4. For thread dumps, go to the "Threads" tab, and click on the "Thread Dump" button.


    Or: Right click on the application in the left pane, and select "Thread Dump".


  5. Similarly for heap dumps, go to the "Monitor" tab, click on the "Heap Dump" button. Or right click on the application in the left pane and select "Heap Dump".