endurox.tpsrvsetctxdata

endurox.tpsrvsetctxdata(ctxt: endurox.PyTpSrvCtxtData, flags: int = 0) None

Restore ATMI context data, previously captured by tpsrvgetctxdata() in ATMI service main thread. If the service was in global transaction, the transaction is resumed in current thread.

This function applies to ATMI servers only.

For more details see tpsrvsetctxdata(3) C API call.

Raises:

AtmiException

Following error codes may be present:
TPEPROTO - Global transaction is started in current thread.
TPESYSTEM - System failure, see logs.
TPEOS - OS error, see logs.

Parameters:
  • ctxt (PyTpSrvCtxtData) – ATMI service context returned from tpsrvsetctxdata() function.

  • flags (int) – Reserved for future use, shall be set to 0 which is default value. Enduro/X Python library automatically applies TPNOAUTBUF flag.