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 > Performance monitoring infrastructure (PMI) for resource adapters

Extend PMI on WebSphere Application Server

Extending PMI on WebSphere Application Server does not require you to add content into schema files (.xsd and.mes files).


Invoke PMI

Invoking PMI statistics on WebSphere Application Server can be done by following the steps listed below.

The steps below describe how to invoke PMI statistics around a method named myOutbound.

  1. Import com.ibm.j2ca.extension.monitoring.CEI.EventPoint;
  2. Define a unique PMI event point name.

    For example String eventName = uniqueAdapterID + "##" + "myOutbound";

  3. 3. Get an instance of EventPoint: for each eventAction ENTRY, EXIT, FAILURE.

    EventPoint ep = (EventPoint)(EventPoints.INSTANCE.getEventPoints(eventName,eventAction))

  4. 4. If eventPoint is enabled fire event for Entry, Exit and Failure.

    Entry event is fired in the beginning of the method call, exit event is fired in the end of the method call and failure event is fired in case of exception.

    For example we can invoke failure event by following API call:

    if(ep.isEnabled()) {
             ep.fire(new String[]{"FailureReason"}, new Object[]{ex.toString()});}

Performance monitoring infrastructure (PMI) for resource adapters