xid

Type

#define XIDDATASIZE 128
/* size in bytes */
#define MAXGTRIDSIZE 64
/* maximum size in bytes of gtrid */
#define MAXBQUALSIZE 64
/* maximum size in bytes of bqual */

typedef struct xid_t
{
long formatID;
/* format identifier. A value of -1 in formatID means that the XID is null. */ long gtrid_length;
/* value from 1 through 64 */
long bqual_length;
/* value from 1 through 64 */
char data[XIDDATASIZE];
} XID;

Description

Cette structure modélise l'identification d'une transaction.

L'identification stricto sensu est consevée dans data dont les premiers grid_length octets sont la clé de la transaction englobante et les bqual_length octets suivants sont la clé de la branche.

Une branche correspond à une sous-transaction.

Exemple

#include <upsoms.e>

static xid Xid;

...
Xid.formatID=0;
Xid.grid_length=2;
Xid.bqual_length=2;
strcpy(Xid.data, "ABcd");
...

Voir aussi

xa_switch_t pour connaître l'interface d'un gestionnaire de ressources.