xa_switch_t

Type

#define RMNAMESZ 32
/* length of resource manager name, including the null terminator */
#define MAXINFOSIZE 256
/* maximum size in bytes of xa_info strings, including the null terminator */

typedef struct xa_switch_t
{
char name[RMNAMESZ];
/* Nom du resource manager. */
long flags;
/* Options du Resource Manager. */
long version;
Version du protocole.
int (*xa_open_entry)(char *xa_info, int rmid, long flags);
/* Objet : Ouvre un Resource Manager. */
int (*xa_close_entry)(char *xa_info, int rmid, long flags);
/* Objet : Ferme le Resource Manager. */
int (*xa_start_entry)(XID *xid, int rmid, long flags);
/* Objet : Debute une nouvelle transaction. */
int (*xa_end_entry)(XID *xid, int rmid, long flags);
/* Objet : Termine la transaction en cours. */
int (*xa_rollback_entry)(XID *xid, int rmid, long flags);
/* Objet : Invalide la transaction. */
int (*xa_prepare_entry)(XID *xid, int rmid, long flags);
/* Objet : Prepare la validation de la transaction. */
int (*xa_commit_entry)(XID *xid, int rmid, long flags);
/* Objet : Valide la transaction. */
int (*xa_recover_entry)(XID *xid, long count, int rmid, long flags);
/* Objet : Enumere une liste de transactions en pre-validation. */
int (*xa_forget_entry)(XID *xid, int rmid, long flags);
/* Objet : Abandonne la validation d'une transaction qui est en echec. */
int (*xa_complete_entry)(int *handle, int *retval, int rmid, long flags);
/* Objet : Attend qu'une operation asynchrone se termine. */
} xa_switch_t;

Description

Cette interface est transmise par le gestionnaire de ressources au moniteur transactionnel.

Voici comment la récupérer :

Exemple

#include <upsoms.e>

static xa_switch_t *XaSwitch;

...
XaSwitch=(*MonModuleIntTrtUpsOms->XaSwitch)();
...

Voir aussi

xid pour connaître l'identifiant d'une transaction.