Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Latest commit

 

History

History
111 lines (66 loc) · 4.61 KB

GlassfishAll.md

File metadata and controls

111 lines (66 loc) · 4.61 KB

Before You Start

Download and install the Java agent from Contrast before proceeding with the Configuration instructions.

Configure GlassFish

If you launch GlassFish yourself, you must add Contrast's JVM parameter to the domain.xml file in your domain directory, ${GLASSFISH_DIR}\domains\domain1.

<!-- Within the your profile's "java-config" element, add the following lines: -->
<jvm-options>-javaagent:${DOWNLOADS}\contrast.jar</jvm-options>

Of course, you need to substitute the path to contrast.jar and the GlassFish server for your environment.

Run Contrast on GlassFish with IntelliJ

The following instructions walk you through the process to add the Contrast Java agent to an application using the IntelliJ IDE running GlassFish.

Configuration

  • In the menu bar, click the Start/Run icon next to the GlassFish service.
  • Wait for the server to finish launching.

  • Navigate to the GlassFish Server Administration Console (usually http://localhost:4848/).
  • After the console has finished loading, select Configurations > server-config.
  • Select JVM Settings.

  • Select the tab for Profiler.
  • Add the name "Contrast".
  • Add the following JVM options:
-javaagent:${DOWNLOADS}/contrast.jar
  • Select Save.

  • Click on the Start/Run icon next to the GlassFish service from the top menu bar and select Restart Server.

A Contrast startup message should appear in the GlassFish server log console. (Allow one to two extra minutes for server startup.)

After GlassFish has finished the startup process, IntelliJ will open a new web browser.

  • Navigate to your application, and allow an extra minute for it to start up.

Run Contrast on GlassFish with NetBeans

The following instructions walk you through the process to add the Contrast Java agent to an application using NetBeans running GlassFish.

Configuration

Step one: GlassFish

  • Select the Services tab.
  • Under Servers, right click on the GlassFish Server and select Start.
  • Wait for the server to finish launching.

  • Navigate to the GlassFish Server Administration Console (usually http://localhost:4848/).
  • After the console has finished loading, select Configurations > server-config.
  • Select JVM Settings.

  • Select the tab for JVM Options.
  • Add the following JVM options:
-javaagent:${DOWNLOADS}/contrast.jar
  • Select Save.

Step two: NetBeans

  • In NetBeans, right click on the GlassFish Server and select Stop.

  • After the server has finished shutting down, right click on the project and select Run.

A Contrast startup message should appear in the GlassFish server log console. (Allow one to two extra minutes for server startup.)

After GlassFish has finished the startup process, NetBeans will switch to the HTTP Server Monitor mode and open a new web browser.

  • Navigate to your application, and allow an extra minute for it to start up.