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:
- 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.
- Under Agent, click Java Profiling Agent.
- Under Select a profiling set, click the profiling set that collects the type of data you want to investigate.
- Click the Profile button. This completes the preparations for profiling, but does not actually start data collection.
- In the Profiling Monitor, click the Start Monitoring button
to start data collection.
- 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:
- Open the Profiling and Logging perspective: Select Window > Open Perspective > Other . . ., and then in the Select Perspective dialog box, select Profiling and Logging.
- Open the Profile dialog box: Select Run > Profile . . .
- Create a profiling configuration for profiling your J2EE application: Double-click the Attach - Java Process entry to create a New_configuration entry.
- Enter a descriptive name for the profiling configuration in the Name field.
- 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.
- Click the Profile button. This completes the preparations for profiling, but does not actually start data collection.
- In the Profiling Monitor, click the Start Monitoring button
to start data collection.
- After you have collected the data you want, detach the application server.
- Refer to the "Getting started" sections of the help to display and analyze the data you have collected.