Name
mts_get_rmcookie, mts_enlist_transaction, mts_sleep — Microsoft Transaction Server (MTS) two-phase commit helpers
Synopsis
varchar mts_get_rmcookie(
|
); |
integer mts_enlist_transaction(
|
in tx_cookie varchar); |
mts_sleep(
|
in microseconds integer); |
Description
These BIFs cooperate with Microsoft Transaction Server (MTS) / Distributed Transaction Coordinator (DTC) to participate in two-phase commit transactions coordinated by an external resource manager.
mts_get_rmcookie returns this server's
resource-manager cookie. Pass it to the external transaction coordinator
so that the coordinator can identify Virtuoso when proposing
prepare/commit votes.
mts_enlist_transaction enlists the current SQL
connection in the transaction identified by
tx_cookie (an opaque MTS transaction handle
obtained from the coordinator). Pass the special string
'LOCAL' to unbind the connection from any external
transaction and revert to local commit semantics. Returns a non-zero
status on success.
mts_sleep blocks the current thread for the given
number of microseconds. Despite the name it is a generic sleep; it lives
in the MTS module because the coordinator timing loops use it.