Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awBegin | awBeginTransaction
BrokerError awBeginTransaction(
BrokerClient client,
char *transaction_id,
int required_level,
int num_participants,
char **participants,
int *reply_tag);
The Broker client that is beginning the transaction.
The identifier of the transaction, created with the awMakeTransactionId function.
Indicates the requested level of the transaction being started, specified as one of the values in the table below.
The number of client identifiers contained in the participants array. May be set to zero.
An array of client identifiers that indicates which clients are allowed to interact with events publish as part of the transaction.
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
Requests any of the following levels of transaction support from an adapter.
Requests pseudo transaction support, described in Transactional Client Processing with Adapters.
Requests basic transaction support, described in Transactional Client Processing with Adapters.
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
The client parameter is not NULL and has been destroyed or disconnected.
The client does not have permission to publish the Adapter::beginTranaction event type.
The tranaction_id parameter is NULL.
See also: