#include "config.h"
#include "lixa_errors.h"
#include "lixa_trace.h"
#include "client_conn.h"
#include "xta_native_xa_resource.h"
Go to the source code of this file.
Macros | |
#define | LIXA_TRACE_MODULE LIXA_TRACE_MOD_XTA |
Functions | |
void | xta_native_xa_resource_clean (xta_native_xa_resource_t *xa_resource) |
void | xta_native_xa_resource_delete (xta_native_xa_resource_t *xa_resource) |
int | xta_native_xa_resource_init (xta_native_xa_resource_t *xa_resource, int rmid, const xta_transaction_manager_config_t *config, const char *name, const char *switch_file, const char *open_info, const char *close_info) |
xta_native_xa_resource_t * | xta_native_xa_resource_new (const char *name, const char *switch_file, const char *open_info, const char *close_info) |
xta_native_xa_resource_t * | xta_native_xa_resource_new_by_rmid (int rmid, const xta_transaction_manager_config_t *config) |
#define LIXA_TRACE_MODULE LIXA_TRACE_MOD_XTA |
Definition at line 40 of file xta_native_xa_resource.c.
void xta_native_xa_resource_clean | ( | xta_native_xa_resource_t * | xa_resource | ) |
Clean the properties of a Native XA Resource; this function must be called after xta_native_xa_resource_init during object disposition to avoid memory leaks
[in,out] | xa_resource | : Native XA Resource object |
Definition at line 296 of file xta_native_xa_resource.c.
References xta_xa_resource_s::act_rsrmgr_config, xta_xa_resource_s::dynamic, LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, xta_xa_resource_s::rsrmgr_config, xta_native_xa_resource_t::xa_resource, and xta_xa_resource_clean().
Referenced by xta_native_xa_resource_delete().
void xta_native_xa_resource_delete | ( | xta_native_xa_resource_t * | xa_resource | ) |
Delete an object that represent a native XA Resource
[in] | xa_resource | : native XA Resource |
Definition at line 142 of file xta_native_xa_resource.c.
References LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, and xta_native_xa_resource_clean().
int xta_native_xa_resource_init | ( | xta_native_xa_resource_t * | xa_resource, |
int | rmid, | ||
const xta_transaction_manager_config_t * | config, | ||
const char * | name, | ||
const char * | switch_file, | ||
const char * | open_info, | ||
const char * | close_info | ||
) |
Initialize the common properties of Native XA Resources
[in,out] | xa_resource | : Native XA Resource object |
[in] | rmid | : Resource Manager unique identifier within the thread of control. This identifier is even used to control the behavior of the constructor: if (rmid >= 0) : all the values that describe the Resource Manager must be extracted from configuration file (lixac.flom) and the following options will be ignored (use NULL value for convenience) if (rmid < 0) : create a new Resource Manager description that's not specified in configuration file (lixac.flom) and the following options can't be NULL. This behavior is useful to generate Native XA Resource dynamically at run time. |
[in] | config | : legacy LIXA structure that contains all the Resource Managers' configurations |
[in] | name | : the name assigned to the Resource Manager just for debugging purposes |
[in] | switch_file | : absolute path of the XA switch file that points to xa_ functions for the resource manager |
[in] | open_info | : a null-terminated character string that may contain instance-specific information for the resource manager when xa_open must be called (use NULL if you want to use the value passed by standard config) |
[in] | close_info | : a null-terminated character string that may contain instance-specific information for the resource manager when xa_close must be called (use NULL if you want to use the value passed by standard config |
Definition at line 171 of file xta_native_xa_resource.c.
References xta_xa_resource_s::act_rsrmgr_config, xta_xa_resource_s::dynamic, LIXA_RC_INTERNAL_ERROR, LIXA_RC_INVALID_OPTION, LIXA_RC_NULL_OBJECT, LIXA_RC_OK, LIXA_RC_OUT_OF_RANGE, LIXA_RC_XML_STRDUP_ERROR, MAXINFOSIZE, xta_xa_resource_s::rsrmgr_config, xta_native_xa_resource_t::xa_resource, and xta_xa_resource_init().
Referenced by xta_native_xa_resource_new(), and xta_native_xa_resource_new_by_rmid().
xta_native_xa_resource_t* xta_native_xa_resource_new | ( | const char * | name, |
const char * | switch_file, | ||
const char * | open_info, | ||
const char * | close_info | ||
) |
Create a new object to represent a native XA resource
[in] | name | : the name assigned to the Resource Manager just for debugging purposes |
[in] | switch_file | : absolute path of the XA switch file that points to xa_ functions for the resource manager |
[in] | open_info | : a null-terminated character string that may contain instance-specific information for the resource manager when xa_open must be called (use NULL if you want to use the value passed by standard config) |
[in] | close_info | : a null-terminated character string that may contain instance-specific information for the resource manager when xa_close must be called (use NULL if you want to use the value passed by standard config |
Definition at line 44 of file xta_native_xa_resource.c.
References LIXA_RC_G_TRY_MALLOC_ERROR, LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, and xta_native_xa_resource_init().
xta_native_xa_resource_t* xta_native_xa_resource_new_by_rmid | ( | int | rmid, |
const xta_transaction_manager_config_t * | config | ||
) |
Create a new object to represent a native XA resource described inside LIXA legacy configuration file "lixac.conf"
[in] | rmid | : Resource Manager unique identifier within the thread of control. All the values that describe the Resource Manager must be extracted from configuration file (lixac.flom). |
[in] | config | : legacy LIXA structure that contains all the Resource Managers' configurations |
Definition at line 95 of file xta_native_xa_resource.c.
References LIXA_RC_G_TRY_MALLOC_ERROR, LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, and xta_native_xa_resource_init().