AppDynamics Application Intelligence Platform

3.8.x Documentation

PDFs

Videos

Release Notes

The AppDynamics Java App Server Agent bootstraps using the javaagent command line option. Add this option to your startWebLogic.sh or startWebLogic.cmd file.

To add the javaagent command in a Windows environment

1. Open the startWebLogic.cmd file, located at <weblogic_version_install_dir>\user_projects\domains\<domain_name>\bin.

2. Add following javaagent argument to the beginning of your application server start script.

set JAVA_OPTIONS=% JAVA_OPTIONS% -javaagent:"<drive>:\<agent_home>\javaagent.jar"

(warning) If you are a Self-Service Trial user, add the App Agent for Java javaagent argument to your JVM start script where <my-app-jvm1> is the name you use for the application running on that JVM.

-javaagent:"<drive>:\<agent_home>\javaagent.jar=uniqueID=<my-app-jvm1>"

The javaagent argument references the full path of the App Server Agent installation directory, including the drive.

2a. Sample WebLogic v9.x startWebLogic.cmd file

2b. Sample WebLogic v10.x startWebLogic.cmd file

3. Restart the application server. The application server must be restarted for the changes to take effect.

To add the javaagent command in a application running as a Windows service

Some applications have a pre-compiled startup method that installs WebLogic as a Windows service. Follow these steps to add the agent to the service.

1. Open the script file that starts the application service, such as install_XXXX_Server_Start_Win_Service.cmd.

2. Add the javaagent command before the line starting with "set CMDLINE=%JAVA_VM%..." such as

set CLASSPATH=%MYSERVER_CLASSPATH%;%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%;%WLP_POST_CLASSpATH%

set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%

set WLS_DISPLAY_MODE=Production

@REM AppDynamics Agent Start
set JAVA_OPTIONS=% JAVA_OPTIONS% -javaagent:"<drive>:\<agent_home>\javaagent.jar"
@REM AppDynamics agent END

set CMDLINE=%JAVA_VM% %MEM_ARGS% -classpath %CLASSPATH% %JAVA_OPTIONS% weblogic.Server"

3. Remove the existing Windows Service for your application. From the command line, run this script.

install_XXXXX_Server_Start_Win_Service.cmd  XXXXX_xxxxx_Production_Server  R

4. Install the Windows Service for your application to include the AppDynamics agent JAVA_OPTIONS argument.

install_XXXXX_Server_Start_Win_Service.cmd  XXXXX_xxxx_Production_Server  I

5. From the WebLogic web console, stop your application.

6. Start your application (which also starts WebLogic) from the Windows Services application, where the Windows service name = XXXXX_xxxx_Production_Server.

7. Ensure that your application is working properly.

For more information, see Creating a Server-Specific Script in the Oracle documentation.

To add the javaagent command in a Linux environment

1. Open the startWebLogic.sh file, located at <weblogic_<version#>_install_dir>/user_projects/domains/<domain_name>/bin.

2. Add the following lines of code to the beginning of your application server start script.

export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/agent_home/javaagent.jar"

(warning) If you are a Self-Service Trial user, add the App Agent for Java javaagent argument to your JVM start script where <my-app-jvm1> is the name you use for the application running on that JVM.

-javaagent:<agent_home>/javaagent.jar=uniqueID=<my-app-jvm1>

The javaagent argument references the full path of the App Server Agent installation directory. For details see the screen captures.

2a. Sample WebLogic v9.x startWebLogic.sh file

2b. Sample WebLogic v10.x startWebLogic.sh file

3. Restart the application server. The application server must be restarted for the changes to take effect.