IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit > Problem determination > Monitoring and measuring performance > Application response measurement (ARM)

Extend application response measurement (ARM) events using the InteractionMetrics

The WebSphere container provides InteractionMetrics interface that introduces the capability for any resource adapter to participate in reporting its usage time in a request and have that time reported by the various request metrics reporting tools available for WebSphere.


Tracking interaction metrics

The WebSphere ConnectionEventListener has implemented this class.

WebSphere keeps an EventListener associated with each ManagedConnection to track the interaction time on a per ManagedConnection basis to gather usage time statistics and data for each ManagedConnection, which can be used to assess and troubleshoot performance-related problems.

In order for resource adapters to participate in various WebSphere RequestMetric tools for outbound, diagnostic tools, etc, you will need to follow these steps:

  1. Import com.ibm.websphere.j2c.*;
  2. Get interaction metrics listener by using WBIManagedConnection classes' getInteractionListener() method or by calling WBIInteraction classes' getInteractionListener() method.

  3. At the beginning of each method to report statics for, call isInteractionMetricsEnabled, check whether the listener is enabled. listener.isInteractionMetricsEnabled();

    If it returns false, do nothing for the rest of this request.

  4. If isInteractionMetricsEnabled returns true, call preInteraction in the beginning of a method where you want to start ARM Object ctx = listener.preInteraction();
  5. Before sending the request to the downstream EIS process, call getCorrelator and attach the correlator with the request so that the downstream EIS process can get the correlator. Obtain correlation byte[] armCorBytes = listener.getCorrelator();

  6. In the end of method you need to collect the ARM statistics by calling postInteraction(ctx, InteractionMetrics.RM_ARM_GOOD, ispec);

  7. In case of exception call postInteraction(ctx, InteractionMetrics.RM_ARM_FAILED, ispec);

For details about interactionMetrics API, see: l

Application response measurement (ARM)