To enable the AppDynamics Java Agent add the javaagent command-line option to the WebLogic startup file. If you start and finish clustered WebLogic servers using Node Manager, configure server startup in the WebLogic Server Administration Console.

Musical instrument Oracle WebLogic for Windows

  1. Open the startWebLogic.cmd file, located at <weblogic_version_install_dir>\user_projects\domains\<domain_name>\bin.
  2. Add post-obit javaagent argument to the application server start script.

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

    CODE

    • The javaagent argument must reference the total path of the amanuensis installation directory, including the drive letter of the alphabet.

    • The command must precedes the WebLogic starting time commands, for example:

      @REM Enable the AppDynamics Coffee Agent set JAVA_OPTIONS=%JAVA_OPTIONS% -javaagent:"E:\AppDynamics\AppServerAgent\javaagent.jar" @REM AppDynamics Java Agent END  @REM Start WEBLOGIC echo starting weblogic with Java version: %JAVA_HOME%\bin\java %JAVA_VM% -version
  3. Restart the awarding server for the changes to take effect.

Musical instrument Oracle WebLogic for an Application Running as a Windows Service

Some applications have a pre-compiled startup method that installs WebLogic as a Windows service.

To add together 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 "prepare 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 Enable the AppDynamics Java Agent set up 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"                  

    Lawmaking

  3. Open a command prompt and run the following script to remove the existing Windows Service for your application:

    install_XXXXX_Server_Start_Win_Service.cmd  XXXXX_xxxxx_Production_Server  R
  4. Install the updated Windows Service for your application:

    install_XXXXX_Server_Start_Win_Service.cmd  XXXXX_xxxx_Production_Server  I
  5. From the WebLogic spider web console, stop your application.
  6. Start your application (which also starts WebLogic) from the Windows Services awarding, where the Windows service name = XXXXX_xxxx_Production_Server.
  7. Ensure that your application is working properly.

See Creating a Server-Specific Script in the Oracle documentation.

Instrument Oracle WebLogic for Linux

  1. Edit startWebLogic.sh located at <weblogic_<version#>_install_dir>/user_projects/domains/<domain_name>/bin/startWebLogic.sh .
  2. Add the following to the beginning of your awarding server start script:

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

    Code

    • The javaagent statement must reference the full path of the agent installation directory.

    • The consign control precedes the WebLogic start commands, for case:

      #Enable the AppDynamics Coffee Agent  export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/opt/AppDynamics/AppServerAgent/javaagent.jar"  # Kickoff WEBLOGIC repeat "starting weblogic with Coffee version:" ${JAVA_HOME}/bin/java ${JAVA_VM} -version
  3.  Restart the awarding server for the changes to take issue.

Musical instrument Clustered WebLogic Servers

For amassed WebLogic servers, you offset and cease using Node Manager, and configure server startup in the WebLogic Server Administration Console.

  1. Open the WebLogic Server Administration Panel. See Overview of the Administration Panel.
  2. Navigate toEnvirons > Serversand click your server in theServer List.
  3. Click the Server Beginning tab.
  4. Add thejavaagent argument and set the value to the path to the Java Agent:

    -javaagent:/<agent_home>/javaagent.jar

    WebLogic Server Administration Console

  5. Restart the awarding server.

Java 2 Security Configuration

If you have enabled Java two security on your WebLogic server, you must add this code block to the weblogic.policy file:

grant codeBase "file:/<agent_home>/-" { permission java.security.AllPermission; };