|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InteractionMetrics
Interface name : InteractionMetrics
This InteractionMetrics interface introduces the capability for any ResourceAdapter to participate in reporting its use time in a request and have that time reported by the various Request Metrics reporting tools available for WebShpere.
The WebSphere ConnectionEventListener will implement this class. We keep an EventListener associated with each ManagedConnection. By tracking the interaction time on a per ManagedConnection basis we can gather use time statistics for each ManagedConnection which will be useful data for solving performance related problems.
ResourceAdapters wishing to participate in various WebSphere RequestMetric tools, diagnostic tools, etc. will need to use this interface, which will be implemented on the ConnectionEventListner we register with every ResourceAdapter ManagedConnection we create, to report the usage time associated with the subset of calls as defined below in the table below.
The call flow in the resource adapter is the following:
Note that the Websphere runtime will track and report the time for the calls which either come into our code through the spi or come out of our code through the spi as identified in the table.
The following table will detail the minimum expected content for the detailed info for the various levels:
Instrumentation Point Package Interface Methods |
Probe Action Level 1 |
Probe Action Level 2 |
Probe Action Level 3 |
---|---|---|---|
These methods must be intrumented by the ResourceAdapter Package: javax.resource.cci Interface: Interaction Methods:
|
Performance | Readable form of the javax.resource.cci.InteractionSpec |
Readable form of the javax.resource.cci.InteractionSpec AdapterName AdapterShortDescription AdapterVendorName AdapterVersion InteractionSpecsSupported SpecVersion |
These methods must be intrumented by the ResourceAdapter Package: javax.resource.cci Interface: LocalTransaction Methods:
|
Performance | Performance |
AdapterName AdapterShortDescription AdapterVendorName AdapterVersion InteractionSpecsSupported SpecVersion |
See Note 1 Package: javax.resource.spi Interface: ManagedConnectionFactory Methods:
|
Performance | Performance |
AdapterName AdapterShortDescription AdapterVendorName AdapterVersion InteractionSpecsSupported SpecVersion |
See Note 1 Package: javax.resource.spi Interface: ManagedConnection Methods:
|
Performance |
EISProductName EISProductVersion UserName |
ConnectionFactory JNDI Name
EISProductName EISProductVersion UserName AdapterName AdapterShortDescription AdapterVendorName AdapterVersion InteractionSpecsSupported SpecVersion |
See Note 1 Package: javax.resource.spi Interface: ManagedConnection Methods:
|
Performance | Performance |
AdapterName AdapterShortDescription AdapterVendorName AdapterVersion InteractionSpecsSupported SpecVersion |
See Note 1 Package: javax.resource.spi Interface: LocalTransaction Methods:
Methods:
|
Performance | Performance |
AdapterName AdapterShortDescription AdapterVendorName AdapterVersion InteractionSpecsSupported SpecVersion |
NOTE 1: the JCA Runtime has access to
these method calls and information and can call
the pre/postInteraction methods surrounding the calls it makes to these methods.
It will do that for the RA so the RA should NOT make calls to report usage
for these methods.
When providing dynamic infomation for a given segment of an interaction,
the following properties/capabilities will be considered standard for
all JCA Resource adapters as defined in the JCA 1.5 or later specification:
(whenever representing this information you must use these names as spelled).
Field Summary | |
---|---|
static int |
RM_ARM_ABORT
RM_ARM_ABORT - Aborted is intended for cases where the
transaction is interrupted/cancelled before completion. |
static int |
RM_ARM_FAILED
RM_ARM_FAILED - Failed is intended for cases where program
logic determines that an operation cannot be successfully completed due
to some discovered error. |
static int |
RM_ARM_GOOD
RM_ARM_GOOD - Good, the request is completed successfully |
static int |
RM_ARM_UNKNOWN
RM_ARM_UNKNOWN - Unknown is used when the transaction
status is not known. |
static int |
TRAN_DETAIL_LEVEL_BASIC
At this level, component will call preInteraction/postInteraction and pass context data matching basic context names. |
static int |
TRAN_DETAIL_LEVEL_EXTENDED
At this level, component will call preInteraction/postInteraction and pass context data matching extended context names. |
static int |
TRAN_DETAIL_LEVEL_PERF
At this level, component will call preInteraction/postInteraction without passing any context data. |
Method Summary | |
---|---|
byte[] |
getCorrelator()
|
int |
getTranDetailLevel()
Returns one of the following: TRAN_DETAIL_LEVEL_PERF At this level, component will call preInteraction/postInteraction without passing any context data. |
boolean |
isInteractionMetricsEnabled()
Indicates whether or not the InteractionMetrics is enabled for instrumentation. |
void |
postInteraction(java.lang.Object ctx,
int status)
The postInteraction method should be called by the
ResourceAdapter at the end of any method for which the preInteraction
call was made. |
void |
postInteraction(java.lang.Object ctx,
int status,
java.util.Properties detailInfo)
The postInteraction method should be called by the
ResourceAdapter at the end any method for which the preInteraction
call was made. |
java.lang.Object |
preInteraction(java.lang.String[] ctxData)
The preInteraction method should be called by the
ResourceAdapter at the start of any methods for which interaction time is
to be measured, including but not limited to the following:
ConnectionFactory.getConnection methods. |
Field Detail |
---|
static final int TRAN_DETAIL_LEVEL_PERF
static final int TRAN_DETAIL_LEVEL_BASIC
static final int TRAN_DETAIL_LEVEL_EXTENDED
static final int RM_ARM_GOOD
RM_ARM_GOOD
- Good, the request is completed successfully
static final int RM_ARM_ABORT
RM_ARM_ABORT
- Aborted is intended for cases where the
transaction is interrupted/cancelled before completion.
static final int RM_ARM_FAILED
RM_ARM_FAILED
- Failed is intended for cases where program
logic determines that an operation cannot be successfully completed due
to some discovered error.
static final int RM_ARM_UNKNOWN
RM_ARM_UNKNOWN
- Unknown is used when the transaction
status is not known.
Method Detail |
---|
byte[] getCorrelator()
int getTranDetailLevel()
java.lang.Object preInteraction(java.lang.String[] ctxData)
preInteraction
method should be called by the
ResourceAdapter at the start of any methods for which interaction time is
to be measured, including but not limited to the following:
Note: this method returns an opaque context Object. If during
the course of this methods execution the ResourceAdapter switches
threads then the context object must be passed along since it will then
be required on the postInteraction
call.
ctxData
- should be the actual class name (array index 0)and
method name (array index 1) with the signature that preInteraction is
called with.
void postInteraction(java.lang.Object ctx, int status)
postInteraction
method should be called by the
ResourceAdapter at the end of any method for which the preInteraction
call was made.
ctx
- - Oject is only needed if the ResourceAdapter switches
threads between the start and the end of the current method.
If not needed pass null
.status
- will return one of the following constants
depending on if the transaction is successful or not.
RM_ARM_GOOD
RM_ARM_ABORT
RM_ARM_FAILED
void postInteraction(java.lang.Object ctx, int status, java.util.Properties detailInfo)
postInteraction
method should be called by the
ResourceAdapter at the end any method for which the preInteraction
call was made.
ctx
- Oject is only needed if the ResourceAdapter switches
threads between the start and the end of the current method. If not
needed pass null
.status
- will return one of the following constants
depending on if the transaction is successful or not.
RM_ARM_GOOD
RM_ARM_ABORT
RM_ARM_FAILED
detailInfo
- If required then the detailInfo which is passed back is a property
object which contains additional dynamic content which is appropriate for
the given TRAN_DETAIL_LEVEL.boolean isInteractionMetricsEnabled()
When it returns true, the resource adapter will call preInteraction/postInteraction/getCorrelator.
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |