Examples of Modifying Application Server Configurations - LoadRunner

This section provides examples modifying the configuration of the following application servers

  • Configuring the WebSphere Application Server
  • Configuring the WebLogic Application Server
  • Configuring the Oracle9i Application Server
  • Configuring the JBoss Application Server

Configuring the WebSphere Application Server

WebSphere servers are controlled from an Administrative Console. The Console has control over the JVM command line and allows you to add classpath elements, define runtime variables (-D variables), and configure the bootclasspath for WebSphere 4.x versions. You may also add any additional arguments to the JVM command line that may be needed. Note that the appearance of the Console for each WebSphere version differ. The examples shown in this section may not correspond exactly to your WebSphere version, but the principle is the same, that is, the parameters must be inserted in the appropriate fields.

Note: You must click Apply in each tab in the Administrative Console before moving to another tab in order to make the changes effective.

To configure the probe on a WebSphere application server:

  1. Access the WebSphere Administrative Console, and display the General tab for the application server that you want to configure.

    To configure the probe on a WebSphere application server

    Note: This screen shows WebSphere version 4. Your console may appear different if you are running another version.

  2. Click the JVM Settings tab.

    To configure the probe on a WebSphere application server

    Note: If your JVM uses a JIT option, such as -hotspot or -classic, make sure (in the Java Command Line arguments on the console) that the -Xbootclasspath option is entered following the JIT option.

  3. Click Advanced JVM Settings, to open the Advanced JVM Settings box.
  4. Add the boot classpath elements to the prepend field, as in the following example:

    To configure the probe on a WebSphere application server

  5. In the Generated Command Line Arguments area, verify that the settings are the same as in the following example:

    To configure the probe on a WebSphere application server

  6. Restart the application server.

Configuring the WebLogic Application Server

These procedures explain how to configure the WebLogic application server so that it recognizes the J2EE probe, when WebLogic is running either as a script or a service.

To configure the WebLogic server, running as a script:

WebLogic application servers are started by running shell scripts (UNIX) or cmd scripts (Windows). While the standard installation comes with default scripts, it is very common for a site manager to heavily modify these scripts. For this reason, detailed instructions can not be given, and these guidelines should be used instead:

The J2EE probe is controlled through several command line arguments and, possibly, a few environment variables. The command line arguments that might be used are -Xbootclasspath. You must add these command line arguments in a place that is appropriate to the specific installation. This could be in the actual file that launches the Java virtual machine, but may also be in a file that sets up a generic environment to be used by several WebLogic installed bases. It is important to understand the structure of the scripts that actually launch the application server when selecting the proper place to apply these changes.

You must take extra care when modifying environment variables since these may be changed by other parts of the script architecture after being set to reflect the probe installation.

Typical Locations of WebLogic Scripts

The following examples are provided to show some typical locations of the startup scripts for a Windows installation of WebLogic 6.1 and 7 along with the changes that need to be made to each script:

Weblogic 6.1

Script location example:

D:beawlserver6.1configpetstorestartPetStore.cmd.

Modify the Java command-line, and add the

-Xbootclasspath/p:<mercprobe>/classes/boot argument.

Weblogic 7

Script location example: D:beauser_projectspetstorestartPetStore.cmd. To change the script, add the following immediately before the call to startWLS.cmd (at the end of the file):

To configure the WebLogic server versions 7.x, 6.x or 5.x SP10 or later, when running as a service:

  1. Locate the command file that is being used by the customer to install the WebLogic service (for example, installNtService.cmd).
  2. Backup this file.
    Tip: It is recommended that you check that the *.cmd file you found installs the service successfully, before you modify it. To verify that the *.cmd file installs the service successfully, run the file before making any changes to it.
  3. On the line that begins with set CMDLINE=, add:
    -Xbootclasspath/p:<mercprobe>/classes/boot

    For example:

    Note: If your JVM uses a JIT option, such as -hotspot or -classic, make sure that the -Xbootclasspath option is entered following the JIT option.

  4. Save the file, and then run it.

Weblogic 8 .1

To load the probe with the JRockit JVM:

  1. Locate the command file that the user uses to invoke the WebLogic application server (for example, startWebLogic.cmd).
  2. Create a new copy of the command file (for example, startWebLogicWithJRockit.cmd).
  3. Check that the JAVA executable used with WebLogic is JRockit. To do this, check the following environment variable setting in startWebLogicWithJRockit.cmd (the newly-saved file]:
    set JAVA_HOME=c:beajrockit.
    For example, for WebLogic 8.1 it might be:
    set JAVA_HOME=<BEA_HOME_DIR>jrockit81sp1_141_03]
  4. Check that JAVAPROBE_HOME is set. For example: set JAVAPROBE_HOME=c:JavaProbe
  5. Find the JAVA invocation that starts the WebLogic application server. It should look something like this:
    %JAVA_HOME%binjava %JAVA_VM% %JAVA_OPTIONS% ..... weblogic.Server
  6. Add the following lines to the application server startup command line after %JAVA_OPTIONS%:

Configuring the Oracle9i Application ServerTo configure the Oracle9i Application Server:

  1. Configure the probe through the Oracle9i administration console (the Enterprise Manager):
    • Access the URL http://<application server>:<adminport>.
    • Click Instance.
    • Click Application.
    • At the bottom of the page, click Server Properties.
  2. Enter the location of the Java executable that was specified during installation of the probe.
  3. Add the following line to the Java options:
  4. Click Apply.
  5. Use the navigation path at the top of the page to return to the application server, and start or restart the application.
  6. Verify that the Application Server instance starts correctly in the console. Log files for the Application Server are typically located under <oracle-home>/opmn/logs/<application><instance>.If the Application Server does not start properly, review the changes made in the previous steps.

Configuring the JBoss Application Server

This section explains how to configure the JBoss 3.2.1 application server so that it recognizes the J2EE probe.

To configure the JBoss server, running as a script:

JBoss application servers are started by running shell scripts (UNIX) or cmd scripts (Windows). While the standard installation comes with default scripts, it is very common for a site manager to modify these scripts heavily. For this reason, detailed instructions cannot be given, and these guidelines should be used instead:

The J2EE probe is controlled through several command line arguments and, possibly, a few environment variables. The command line arguments that might be used are -Xbootclasspath.

You must add these command line arguments in a place that is appropriate to the specific installation. This could be in the actual file that launches the Java virtual machine, but may also be in a file that sets up a generic environment to be used by several JBoss installed bases. It is important to understand the structure of the scripts that actually launch the application server when selecting the proper place to apply these changes. -Xbootclasspath/p:<mercprobe>/classes/boot

You must take extra care when modifying environment variables since these may be changed by other parts of the script architecture after being set to reflect the probe installation.

Typical Location of JBoss Scripts

Here is an example of a startup script location on a Windows installation of the JBoss application server, and the needed changes in the script: Script location example: D:JBossEJBContainerbinrun.bat.

Note: <mercprobe>/etc must be added to the beginning of the line.

  1. Copy <Jboss Home>binrun.bat (or .sh) to <Jboss Home>runMercury.bat (or .sh).
  2. Open the new file runMercury.bat (or .sh).
  3. Just before the Java command line used to start the server, add the following variables:
    For Windows platforms:
    For UNIX platforms:
  4. In the same section of the file, add a parameter to the command line:
    Example:
  5. To start the application server with the probe, run runMercury.bat.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

LoadRunner Topics