#include "config.h"
#include "lixa_errors.h"
#include "lixa_trace.h"
#include "lixa_xid.h"
#include "xta_xid.h"
Go to the source code of this file.
Macros | |
#define | LIXA_TRACE_MODULE LIXA_TRACE_MOD_XTA |
Functions | |
int | xta_xid_branch_qualifier_is_multibranch (const char *branch_qualifier) |
int | xta_xid_branch_qualifier_set_multibranch (char *branch_qualifier) |
int | xta_xid_branch_qualifier_unset_multibranch (char *branch_qualifier) |
void | xta_xid_delete (xta_xid_t *xid) |
xta_xid_t * | xta_xid_dup (const xta_xid_t *xid) |
long | xta_xid_get_bqual (const xta_xid_t *xid, char *bqual) |
long | xta_xid_get_formatID (const xta_xid_t *xid) |
long | xta_xid_get_gtrid (const xta_xid_t *xid, char *gtrid) |
const XID * | xta_xid_get_xa_xid (const xta_xid_t *xid) |
xta_xid_t * | xta_xid_new (const char *branch_qualifier, int multiple_branches) |
xta_xid_t * | xta_xid_new_from_string (const char *xid_string) |
xta_xid_t * | xta_xid_new_from_XID (const XID *xid) |
void | xta_xid_reset (xta_xid_t *xid) |
char * | xta_xid_to_string (const xta_xid_t *xid) |
int xta_xid_branch_qualifier_is_multibranch | ( | const char * | branch_qualifier | ) |
Check if a branch_qualifier is related to a multiple branches transaction or not
[in] | branch_qualifier | that must be checked |
Definition at line 110 of file xta_xid.c.
Referenced by xta_transaction_branch(), xta_transaction_commit(), and xta_xid_new().
int xta_xid_branch_qualifier_set_multibranch | ( | char * | branch_qualifier | ) |
Set branch_qualifier to be a multiple branches transaction
[in,out] | branch_qualifier | that must be checked |
Definition at line 138 of file xta_xid.c.
Referenced by xta_xid_new().
int xta_xid_branch_qualifier_unset_multibranch | ( | char * | branch_qualifier | ) |
Unset branch_qualifier to be a multiple branches transaction
[in,out] | branch_qualifier | that must be checked |
Definition at line 219 of file xta_xid.c.
Referenced by xta_xid_new().
void xta_xid_delete | ( | xta_xid_t * | xid | ) |
Delete a Transaction Identifier object
[in] | xid | object to delete |
Definition at line 432 of file xta_xid.c.
References LIXA_RC_INTERNAL_ERROR, and LIXA_RC_OK.
Referenced by xta_transaction_delete().
Create a new Transaction Identifier object duplicating the passed one
[in] | xid | is the transaction identifier that must be duplicated |
Definition at line 385 of file xta_xid.c.
References LIXA_RC_G_TRY_MALLOC_ERROR, LIXA_RC_INTERNAL_ERROR, LIXA_RC_NULL_OBJECT, LIXA_RC_OK, and xta_xid_t::xa_xid.
long xta_xid_get_bqual | ( | const xta_xid_t * | xid, |
char * | bqual | ||
) |
This is just a wrapper of lixa_xid_get_bqual
Definition at line 569 of file xta_xid.c.
References xta_xid_t::xa_xid.
long xta_xid_get_formatID | ( | const xta_xid_t * | xid | ) |
This is just a wrapper of lixa_xid_get_formatID
Definition at line 575 of file xta_xid.c.
References xta_xid_t::xa_xid.
long xta_xid_get_gtrid | ( | const xta_xid_t * | xid, |
char * | gtrid | ||
) |
This is just a wrapper of lixa_xid_get_gtrid
Definition at line 563 of file xta_xid.c.
References xta_xid_t::xa_xid.
Retrieve the transaction ID in the XA standard format
[in] | xid | object |
Definition at line 458 of file xta_xid.c.
References LIXA_RC_INTERNAL_ERROR, LIXA_RC_NULL_OBJECT, LIXA_RC_OK, and xta_xid_t::xa_xid.
Referenced by xta_transaction_branch(), xta_transaction_commit(), xta_transaction_resume(), xta_transaction_rollback(), xta_transaction_start(), and xta_transaction_suspend().
xta_xid_t* xta_xid_new | ( | const char * | branch_qualifier, |
int | multiple_branches | ||
) |
Create a new Transaction Identifier object and generate a new unique XID
[in] | branch_qualifier | that must be assigned to the XID (in ASCII HEX format) |
[in] | multiple_branches | : boolean value: TRUE = the created transaction will span more applications, xta_transaction_branch will be called subsequently FALSE = the created transaction will not span more applications and xta_transaction_branch will not be called for this transaction |
Definition at line 47 of file xta_xid.c.
References LIXA_RC_G_TRY_MALLOC_ERROR, LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, LIXA_RC_STRDUP_ERROR, xta_xid_branch_qualifier_is_multibranch(), xta_xid_branch_qualifier_set_multibranch(), and xta_xid_branch_qualifier_unset_multibranch().
Referenced by xta_transaction_start().
xta_xid_t* xta_xid_new_from_string | ( | const char * | xid_string | ) |
Create a new Transaction Identifier object and set XID as passed by the caller
[in] | xid_string | a serialized XID, see xta_xid_to_string |
Definition at line 291 of file xta_xid.c.
References LIXA_RC_G_TRY_MALLOC_ERROR, LIXA_RC_INTERNAL_ERROR, LIXA_RC_MALFORMED_XID, and LIXA_RC_OK.
Referenced by xta_transaction_resume().
Create a new Transaction Identifier object and set XID as passed by the caller. This is considered a private method because the an XTA application should not manage the XID struct directly.
[in] | xid | a native XA XID |
Definition at line 337 of file xta_xid.c.
References LIXA_RC_G_TRY_MALLOC_ERROR, LIXA_RC_INTERNAL_ERROR, LIXA_RC_NULL_OBJECT, and LIXA_RC_OK.
Referenced by xta_transaction_branch().
void xta_xid_reset | ( | xta_xid_t * | xid | ) |
Reset a Transaction identifier object
[in,out] | xid | object to delete |
Definition at line 537 of file xta_xid.c.
References LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, and xta_xid_t::xa_xid.
Referenced by xta_transaction_commit(), and xta_transaction_rollback().
char* xta_xid_to_string | ( | const xta_xid_t * | xid | ) |
Convert the transaction ID to an ASCII string
[in] | xid | object |
Definition at line 491 of file xta_xid.c.
References LIXA_RC_INTERNAL_ERROR, LIXA_RC_MALLOC_ERROR, LIXA_RC_NULL_OBJECT, LIXA_RC_OK, and xta_xid_t::xa_xid.