MANUAL INSTRUMENTATION
-
Navigate to the directory %Glassfish_Home%\bin where the startup script is located
Example: D:\glassfish-5.0-server\glassfish5\bin
Method 1:
-
Stop the GlassFish server if it is already running
-
asadmin.bat stop-domain
-
-
Take a backup of the file asadmin.bat
-
Append the content below to the file asadmin.bat and save it
@echo off
ECHO.%JAVA_TOOL_OPTIONS%| FIND /I "instrumentation.jar">Nul || (
set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS% -javaagent:"%VSP_HOME%"\iae-java\instrumentation.jar -Dvirsec_appcontextpath=<AppCollectiveID>
)
NOTE:
Ensure that <AppCollectiveID> mentioned above is replaced with the App Collective ID in the CMS Application Configuration section
-
Start the GlassFish server
-
asadmin.bat start-domain
-
Method 2:
-
Start the GlassFish admin server using the command:
-
asadmin.bat start-domain
-
-
Access the Glassfish admin-console URL: http://<Server-IP>:4848/
-
Stop the Glassfish Standalone instance
-
Add each VSP argument (in separate lines) under “ADD JVM Option” for the GlassFish instance
-javaagent:c:\PROGRA~2\Virsec\iae-java\instrumentation.jar
-Dvirsec_appcontextpath=<AppCollectiveID>
NOTE:
Ensure that <AppCollectiveID> mentioned above is replaced with the App Collective ID in the CMS Application Configuration section
-
Start the GlassFish server Standalone instance