Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awBegin | awBeginTransaction
 
awBeginTransaction
BrokerError awBeginTransaction(
BrokerClient client,
char *transaction_id,
int required_level,
int num_participants,
char **participants,
int *reply_tag);
client
The Broker client that is beginning the transaction.
transaction_id
The identifier of the transaction, created with the awMakeTransactionId function.
required_level
Indicates the requested level of the transaction being started, specified as one of the values in the table below.
num_participants
The number of client identifiers contained in the participants array. May be set to zero.
participants
An array of client identifiers that indicates which clients are allowed to interact with events publish as part of the transaction.
reply_tag
If not NULL, indicates that an acknowledgement reply is requested and the tag value of the published event is returned. This parameter is used for output.
Publishes an Adapter::beginTransaction event for the specified transaction identifier, which begins a transaction. All subsequent events published by this client with the same transaction identifier will be considered part of a transaction.
If reply_tag is not NULL, it will be set with the tag value of the event published so that you can match it to the acknowledgment that will follow. If reply_tag is NULL, no acknowledgment reply will be sent.
After invoking this method, your application can send any number of additional events with the transactionId envelope field set to the specified transaction identifier.
The required_level parameter indicates the level of the transaction that your Broker client is requesting. If the adapter does not support the requested transaction level, an error will be returned. The required_level must be set to one of the following values:
Transaction Level
Meaning
AW_TRANSACTION_LEVEL_ANY
Requests any of the following levels of transaction support from an adapter.
AW_TRANSACTION_LEVEL_PSEUDO
Requests pseudo transaction support, described in Transactional Client Processing with Adapters.
AW_TRANSACTION_LEVEL_BASIC
Requests basic transaction support, described in Transactional Client Processing with Adapters.
AW_TRANSACTION_LEVEL_CONVERSATIONAL
Requests conversational transaction support, described in Transactional Client Processing with Adapters.
Finally, you should use the awEndTransaction function to close the transaction. See Transactional Client Processing with Adapters for more information on transaction processing.
Possible BrokerError major codes
Meaning
AW_ERROR_INVALID_CLIENT
The client parameter is not NULL and has been destroyed or disconnected.
AW_ERROR_NO_PERMISSION
The client does not have permission to publish the Adapter::beginTranaction event type.
AW_ERROR_NULL_PARAM
The tranaction_id parameter is NULL.
See also: