IBM WebSphere Adapters User Manual page 192

Version 6 release 2
Table of Contents

Advertisement

Purpose
1. Monitorable Element Schema (.mes) file changes
2. ".xsd" file changes
3. Invoke PMI:
186
WebSphere Adapters: WebSphere Adapter Toolkit User Guide
Defines the element type within an adapter where monitoring can be attached.
The element type is specified using the Qname of the element type from the
schema, which defines the structure of the artifact itself. It also defines the
natures (ENTRY, EXIT, FAILURE) that are available for that type of element.
The sample below declares how the monitors can be attached to myOutbound.
For example myOutbound method can emit event at ENTRY, EXIT or FAILURE
event points.
<?xml version="1.0" encoding="UTF-8"?>
<EventNaturesSpec
name="EventNatures"
targetNamespace=
"http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"
xmlns=
"http://www.ibm.com/xmlns/prod/websphere/monitoring/6.0.0/mes"
shortName="JCAAdapter">
<Property>CEI</Property>
<ElementKind name="myOutbound">
<EventNature name="ENTRY" eventName="eis:WBI.JCAAdapter.myOutbound.ENTRY" />
<EventNature name="EXIT" eventName="eis:WBI.JCAAdapter.myOutbound.EXIT" />
<EventNature name="FAILURE" eventName="eis:WBI.JCAAdapter.myOutbound.FAILURE" />
</ElementKind>
The xsd event schema file provides monitoring specific of each data elements
and it defines the types of events, payload or extended element for each event
type that can be emitted for the data elements. Content of schema looks like
following:
<?xml version="1.0" encoding="UTF-8"?>
<EventSpec xmlns=
"http://www.ibm.com/xmlns/prod/websphere/monitoring/6.0.0/es"
name="Events"
targetNamespace=
"http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"
xmlns:er=
"http://www.ibm.com/xmlns/prod/websphere/recovery/6.0.0/es/eventpayloads"
>
<complexType name="WBI.JCAAdapter.myOutbound.ENTRY">
<complexContent>
<extension base="wbi:WBIMonitoringEvent" />
</complexContent>
</complexType>
<complexType name="WBI.JCAAdapter.myOutbound.EXIT">
<complexContent>
<extension base="wbi:WBIMonitoringEvent" />
</complexContent>
</complexType>
<complexType name="WBI.JCAAdapter.myOutbound.FAILURE">
<complexContent>
<extension base="wbi:WBIMonitoringEvent">
<sequence>
<element name="FailureReason" type="string" />
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
To invoke PMI statistics around a method named myOutbound, you would do
the following:
a.
Import com.ibm.j2ca.extension.monitoring.CEI.EventPoint;
b.
Define a unique PMI event point name.
For example String eventName = uniqueAdapterID + "##" +
"myOutbound";
c.
Get an instance of EventPoint:
for each eventAction ENTRY, EXIT, FAILURE. EventPoint ep =
(EventPoint)(EventPoints.INSTANCE.getEventPoints(eventName,eventAction))

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Websphere adapter toolkit

Table of Contents