Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp.setTransactionName

xdmp.setTransactionName(
   name as String,
   [host-id as (Number|String)],
   [txn-id as (Number|String)]
) as null

Summary

Set the name of a local or remote transaction.

Parameters
name The new name.
host-id An optional host ID. If omitted, the local App Server host is assumed. If a host ID is given, then a transaction ID must also be given.
txn-id An optional transaction ID. If omitted, the current transaction is assumed. If a transaction ID is given, then a host ID must also be given.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-set-transaction-name-my

http://marklogic.com/xdmp/privileges/xdmp-set-transaction-name-any

Usage Notes

If the transaction already has a name, it is overwritten with the new name.

If the specified transaction does not exist, XDMP-NOTXN is raised.

If host-id is not found or MarkLogic Server is not available on that host, the exception XDMP-HOSTOFFLINE is raised.

See Also

Example

xdmp.setTransactionName("myTransaction");
=> Set the name of the current transaction in the current local session
   to "myTransaction".

Example

xdmp.setTransactionName("myTransaction",
                            xdmp:host("some-host.marklogic.com"), $txn-id);
=> Set the name of the given transaction on the remote host
   some-host.marklogic.com to "myTransaction".

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.