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 you must perform special preliminary operations before you start.

You can profile J2EE applications on an application server that has been started in one of the following ways:
  • The application server has been started from within the Rational® Application Developer environment.
  • The application server has been started with a profiling agent that is running in enabled mode.

Profiling J2EE applications on a server started within the Rational Application Developer environment

You can collect data from within the Rational Application Developer environment for J2EE applications that are running on an application server such as the WebSphere Application Server.

Prerequisite: Agent Controller must be running on the host machine where you intend to run the target application.

To profile the application:
  1. In the Servers view, right-click the host application server, and then click Profile. This starts the application server and opens a wizard for starting profiling on the server.
  2. On the Agents page, double-click Java Profiling Agent to add it to the list of selected agents.
  3. On the Profiling page, select the profiling set that collects the type of data that you want to investigate. You can also modify a profiling set by clicking Edit. For more information, see Getting started: Creating a profiling configuration for runtime problem determination.
  4. Click Finish. This completes the preparations for profiling, but does not actually start data collection.
  5. In the Profiling Monitor, right-click the agent, and then click Start Monitoring to start data collection.
  6. After you have collected the data you want, right-click the agent, and then click Terminate to detach the application server.
  7. Refer to the "Getting started" section of the help to display and analyze the data you have collected.

Reattaching to a J2EE application

After you have detached from a J2EE application that you have been profiling, you can reattach to it and continue collecting profiling data.

To reattach to the application:
  1. Open the Profiling and Logging perspective: Click Window > Open Perspective > Other, and then click Profiling and Logging.
  2. Open the Profile dialog box: Click 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. Define the profiling configuration as for a J2SE application (refer to Getting started: Creating a profiling configuration for runtime problem determination), but include the following additional entries:

    Page

    Java Application configuration

    Host

    Specify the target application server.

    Agent

    Specify the Java profiling agent.

  5. Click Profile. This completes the preparations for profiling, but does not actually start data collection.
  6. In the Profiling Monitor, right-click the agent, then click Start Monitoring to start data collection.
  7. After you have collected the data you want, detach the application server.
  8. Refer to the "Getting started" section of the help to display and analyze the data you have collected.

Profiling applications running with the profiling agent in enabled mode

You can also collect data from Java applications (including J2EE applications) that you can start outside of the Rational Application Developer environment with piAgent in enabled mode.

Prerequisites:
  • The target application server must be started with the switch "server=enabled" specified. For more information, see the topic "Profiling an application in stand-alone mode."
  • Agent Controller must be running on the target application server.
When you have completed the prerequisites, follow the instructions in Reattaching to a J2EE application.
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.