Jump to: navigation, search

Subscribing to Transaction Monitoring

To initiate transaction monitoring, your code must call the following function.

TTransactionMonitoring

This function requests a T-Server to start, stop, or modify a subscription to the Transaction Monitoring Feature notifications. If a request is successful (EventACK), EventTransactionStatus (EventTransactionStatus) is distributed to the requestor.

Syntax

int TTransactionMonitoring (
	TServer 			tserver_handle,
	TSubscriptionOperationType 	subscription_operation,
	const char 			* subscription_identifier,
	const TKVList 			* subscription_rules
);

Parameters

  • tserver_handle—Local server handle to the T-Server in question.
  • subscription_operation—This parameter represents an operation on a subscription to Transaction Monitoring Feature notifications. Its value is one of TSubscriptionOperationType. A value of this parameter should be provided by the T-Server client.
  • subscription_identifier—This parameter represents a subscription identifier. A value should be NULL for the operation SubscriptionStart. For other operations its value should be taken from the message EventACK. It is generated by a T-Server on a creation of a new subscription.
  • subscription_rules—This parameter contains subscription rules. A value of this parameter should be provided by the T-Server client. Its value should be NULL for the operation SubscriptionStop. See Subscription Rules for details.

Return Values

The Transaction Monitoring Feature return value is a standard return value for the T-Library API:

  • >0—Reference number (ReferenceID) assigned to this request by the T-Library API.
  • <0—Error condition.

Subscription Rules

Subscription rules are provided by T-Server clients and passed as part of a notify key-value pair in the Extensions attribute for RequestTransactionMonitoring. They are represented as a key-value list.

Every subscription rule key-value pair contains a notification mode for one element. The key represents the name of the element. The value represents the requested notification mode. If no key has as its name a given element, then that element's default notification mode is used. See Transaction Monitoring Elements for the list of all default notification modes.

Example

The following is an example RequestTransactionMonitoring with subscription rules included:

AttributeReferenceID reference-id-1
AttributeSubscriptionOperation SubscriptionStart
AttributeExtensions
	notify (list)
		class.name always
		object.local-id always
		iscc.transaction.state always
		iscc.direction.role once
		iscc.is-link-creation never

The local attribute object.local-id represents a unique identifier of the Local Transaction Instance. The value of this attribute is different from the value of the Global Identifier attribute.

This page was last edited on March 22, 2018, at 00:48.
Comments or questions about this documentation? Contact us for support!