endurox.xaoSvcCtx

endurox.xaoSvcCtx() int

Returns the OCI service handle for a given XA connection. Usable only for Oracle DB.

xaoSvcCtx example
import endurox as e
import cx_Oracle

e.tpinit()
e.tpopen()
db = cx_Oracle.connect(handle=e.xaoSvcCtx())
e.tpbegin(99, 0)

with db.cursor() as cursor:
    cursor.execute("delete from pyaccounts")
e.tpcommit(0)
e.tpterm()
Raises:

RuntimeError

Oracle XA drivers not properly initialized.

Returns:

handle – Oracle OCI service handle.

Return type:

int