XTA: API Reference for C language

xta_native_xa_resource.h File Reference
Include dependency graph for xta_native_xa_resource.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xta_native_xa_resource_t
 

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_txta_native_xa_resource_new (const char *name, const char *switch_file, const char *open_info, const char *close_info)
 
xta_native_xa_resource_txta_native_xa_resource_new_by_rmid (int rmid, const xta_transaction_manager_config_t *config)
 

Function Documentation

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

Parameters
[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

Parameters
[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

Parameters
[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
Returns
a reason code

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

Parameters
[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
Returns
a new object or NULL in the event of error

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"

Parameters
[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
Returns
a new object or NULL in the event of error

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().


Copyright © 2009-2019, Christian Ferrari tiian@users.sourceforge.net http://www.tiian.org/