Search code examples
glassfish

Check programmatically if glassfish is running in debug mode


To provide special debug information I want to know if the glassfish server is running in debug mode. Is it possible to check the running mode programmatically?


Solution

  • GlassFish Server offers a REST API for management and monitoring. You can connect to the DAS and parse the jvm options:

    http://localhost:4848/management/domain/list-jvm-options.html

    or:

    http://localhost:4848/management/domain/list-jvm-options.json

    or:

    http://localhost:4848/management/domain/list-jvm-options.xml

    Hope this helps!