Using ARM with Tomcat

The Profiling tool using the Application Response Measurement analysis type provides the ability to attach to a running application or to launch an application for profiling.
Attaching to an application means that a monitor is created to contain the results observed by an associated agent.
Launching a process means that the process is started with an agent is associated with to process, and a monitor is created to contain the results observed by the agent.

Attaching to a an application server requires either statically applied probes or placing arm calls directly in the application.

Attaching to an application

  1. From the Profiling and Logging Perspective, click on the Profile profiling icon drop-down menu, and select Profile... The Profile wizard opens.
  2. Double click on Attach - Java Process. A new configuration is created.
  3. Under the Host tab, specify the Host name or IP address and the Agent Controller port (if different from the default).
  4. Select the Instrument Agent.
  5. Click Apply to apply the changes.
  6. Click Profile to attach to the application.
  7. The Profiling Monitor view is refreshed displaying the agent representing your application. The workbench console opens, displaying program input and output.

Launching an application

  1. Move the armModel.jar and armProbes.jar to the Tomcat common library directory, for example C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib.
  2. From the Profiling and Logging Perspective, click on the Profile profiling icon drop-down menu, and select Profile... The Profile wizard opens.
  3. Double click on Apache Tomcat. A new configuration is created.
  4. In the Arguments tab, enter any Program arguments and/or VM arguments that you want this configuration to use.
    Note 1: You must set the Arm Transaction Factory property as a system property in the VM arguments. The Arm Report Factory and Arm Metric Factory are optional.
    -DArm40.ArmTransactionFactory=org.eclipse.tptp.trace.arm.internal.transaction.ArmTransactionFactoryImpl 
    -DArm40.ArmTranReportFactory=org.eclipse.tptp.trace.arm.internal.tranreport.ArmReportFactoryImpl
    -DArm40.ArmMetricFactory=org.eclipse.tptp.trace.arm.internal.metric.ArmMetricFactoryImpl
    		
  5. In the Classpath tab, add the following jars to the class path form the list of plug-ins.
    Plug-in Name Jars needed
    org.eclipse.tptp.trace.arm armLibrary.jar cbeLogging.jar
    org.opengroup.arm arm40_java_interfaces.jar
    org.eclipse.hyades.execution hexr.jar
    org.eclipse.hyades.logging.core hl14.jar hlcore.jar
    org.eclipse.tptp.platform.logging.events t1core.jar hlcbe101.jar
    Under Plugins dir org.eclipse.emf.common_VERSION_NUMBER.jar Example: org.eclipse.emf.common_2.2.0.v200606221156.jar
    Under Plugins dir org.eclipse.emf.ecore.xmi_VERSION_NUMBER.jar Example: org.eclipse.emf.ecore.xmi_2.2.0.v200606221156.jar
    Under Plugins dir org.eclipse.emf.ecore_VERSION_NUMBER.jar Example: org.eclipse.emf.ecore_2.2.0.v200606221156.jar
  6. Click Apply to apply the changes.
  7. Click Profile to attach to the application.
  8. After application server has been started the Profile on Server dialog is shown
  9. Select the agents that are associated with the process ID you want to attach to.
  10. Select the Monitor tab. Configure the profiling filters as required. Refer to the Application Response Measurement analysis type topic for more information on configuring the Application Response Measurement analysis type.
  11. Click Finish to connect to the application server.
  12. The Profiling Monitor view is refreshed displaying the agent representing your application. The workbench console opens, displaying program input and output.

Once your application is being profiled, you can perform a number of other data collection activities on the application such as viewing UML transaction breakdown and method statics.