Getting started: Profiling J2EE applications

Profiling J2EE applications is similar to profiling Java applications, as described in the "Getting started" topics, but there are small differences, and perform special preliminary operations before you start.

You can profile J2EE applications either that are running within the Rational Application Developer (RAD) environment, or that are that are running in stand-alone mode.

 

Parent topic

Getting started with run-time problem determination

 

Related tasks

Getting started: Creating a profiling configuration for run-time problem determination

Related information
Getting started: Memory leak analysis
Getting started: Performance bottleneck detection
Getting started: Thread bottleneck detection
Getting started: Code coverage monitoring

Profiling J2EE applications running within the RAD environment

You can collect data from within the RAD environment for J2EE applications running on a different application server.

Prerequisites:

  • The target application server must have profiling enabled.

  • Agent Controller must be running on the target application server.

To profile the application:

  1. In the Profiling Monitor, right-click the application server and select Profile . . . from the pop-up menu. This starts the application server and opens the Profile on server dialog box.

  2. Under Agent, click Java Profiling Agent.

  3. Under Select a profiling set, click the profiling set that collects the type of data you want to investigate.

  4. Click the Profile button. This completes the preparations for profiling, but does not actually start data collection.

  5. In the Profiling Monitor, click the Start Monitoring button

    Start or Resume Monitoring button to start data collection.

  6. After you have collected the data you want, detach the application server.

Refer to the "Getting started" section of the help to display and analyze the data you have collected.

Profiling J2EE applications running in stand-alone mode

You can collect data from J2EE applications that are outside RAD; for example, you can profile applications running on the WebSphere Application Server (WAS).

Prerequisites:

  • The target application server be started with profiling enabled, and your J2EE application must be running.

  • Agent Controller must be running on the target application server.

To profile the application:

  1. Open the Profiling and Logging perspective: Select Window > Open Perspective > Other . . ., and then in the Select Perspective dialog box, select Profiling and Logging.

  2. Open the Profile dialog box: Select Run > Profile . . .

  3. Create a profiling configuration for profiling your J2EE application: Double-click the Attach - Java Process entry to create a New_configuration entry.

  4. Enter a descriptive name for the profiling configuration in the Name field.

  5. Define the profiling configuration by specifying the following:

    Tab

    Java Application configuration

    Host

    Specify the target application server.

    Agent

    Specify the Java profiling agent.

    Profiling

    Overview sub-tab

    Select or add a profiling set. To collect data, each profiling set must include one or more profiling types, which are displayed in the text box in the lower half of the screen. For information about profiling types, refer to the Getting Started topic for the type of profiling you want to perform

    Profiling

    Limits sub-tab

    Set parameters if you want to limit data collection automatically.

    Profiling

    Destination sub-tab

    Define the profiling project and monitor, and, optionally, a .trcxml destination file for profiling output. (You can display this file by selecting File > Import from the main Profiling and Logging menu.)

    Source

    Not applicable.

    Common

    Specify the launch configuration for the program. The default is a local launch, with the program running in the background.

  6. Click the Profile button. This completes the preparations for profiling, but does not actually start data collection.

  7. In the Profiling Monitor, click the Start Monitoring button

    Start or Resume Monitoring button to start data collection.

  8. After you have collected the data you want, detach the application server.

  9. Refer to the "Getting started" sections of the help to display and analyze the data you have collected.