Profiling an EJB Module or Enterprise Application
See Also
There are two ways to profile an EJB module:
- As a stand-alone EJB module
- As part of an enterprise application
If your EJB module is part of an enterprise application, you should always
profile it by running the profile command on the enterprise application project.
Since the IDE does not know which enterprise applications an EJB module project
belongs to, running the Profile command on an EJB module project deploys it
as a stand-alone module.
If you are deploying your EJB module or enterprise application to a local installation
of the GlassFish server, you can profile your project by
choosing Profile Main Project from the main menu or choosing Profile from the pop-up menu in the
Projects window.
If you are deploying your EJB module or enterprise application to a remote server,
you need to attach the IDE to the remote server and profile the application in Attach mode.
The Attach Wizard can help you configure the remote server to accept attachment.
To profile a stand-alone EJB module:
- In the Projects window, right-click the EJB module project and choose Profile.
- Select a profiling task and click Run.
When you profile a stand-alone EJB module, the IDE does the following:
- Compiles the EJB module if necessary.
- Stops the application server and starts it in profile mode.
- Deploys the EJB module to the application server.
- Starts a profiling session, attaches the profiler to the server, and opens the Profiler window in the IDE.
After the application is deployed to the server, you should invoke its code the same way as you would for debugging or
just evaluating application functionality.
You can use an application client or a web application to access the EJB and invoke its code.
You can view the profiling data once the code of the application is invoked.
To profile an enterprise application:
- In the Projects window, right-click the enterprise application project and choose Profile.
- Select a profiling task and click Run.
When you profile an enterprise application, the IDE does the following:
- Compiles the EAR file if necessary.
- Stops the application server and starts it in profile mode.
- Deploys the enterprise application to the application server.
- Starts a profiling session, attaches the profiler to the server, and opens
the Profiler window in the IDE. If the application has
a designated web application and URL to run, the IDE opens the URL in the
external browser.
- See Also
- Profiling Tasks: Quick Reference
- Setting Profiling Filters
- Profiling a Remote Application
- Profiling Windows
- Selecting a Profiling Task
Legal Notices