IBM WebSphere Adapters Network Card User Manual


 
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 please see: l
Extending ARM events using the Open Group API:
Use following reference information to make you component ARM-enabled using
the Open Group API.
Application response measurement (ARM) documentation
Use following links to access the information on how to make you component
ARM enabled using the Open Group API.:
v Application Response Measurement (ARM) Instrumentation Guide.
v ARM 4.0 Java APIs.
v ARM fundamentals and downloads.
First failure data capture (FFDC):
First failure data capture (FFDC) provides the instrumentation for exception
handlers (catch blocks) to record exceptions that are thrown by a component.
To provide FFDC for your component, exception handlers can be instrumented by
defining an aspect, which determines the packages, classes, methods, and
exceptions types that will be supported by FFDC.
Users extend the abstract FFDCSupport aspect that captures the required context,
such as method name and exception object, automatically. No additional
configuration is required because the data provided by the aspect is the same data
that would be provided from a hand-coded invocation.
WebSphere Adapter development overview 189