Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tmxa_RegisterRMI(3) — ACMSxp 3.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ENCINA(3)  —  Subroutines

NAME

tmxa_RegisterRMI - informs TM-XA of an RM instance

SYNOPSIS

#include <tmxa/tmxa.h>

tmxa_status_t tmxa_RegisterRMI (
IN char ∗openInfo,
IN char ∗closeInfo,
IN struct xa_switch_t ∗switchP,
IN int threadSupport,
OUT int ∗rmidP)

PARAMETERS

openInfo Specifies a string of information that is specific to the RM instance. This information is passed in xa_open calls. 

closeInfo Specifies a string of information that is specific to the RM instance. This information is passed in xa_close calls. 

switchP Points to an XA switch, which is a structure specified in the XA standard. This structure contains the name of the RM, pointers to the RM’s entry points, and a flag word. The flag word in the switch structure determines whether the RM dynamically registers transactions and whether the RM operates asynchronously. 

threadSupport Specifies the type of thread support to use for serializing access to RMs. The value can be one of four constants: TMXA_SERIALIZE_ALL_XA_OPERATIONS, TMXA_SERIALIZE_START, TMXA_SINGLE_ASSOCIATION, or TMXA_MULTIPLE_ASSOCIATIONS. 

rmidP Returns the RM identifier that the TM-XA Service has assigned to this RM instance. 

DESCRIPTION

The tmxa_RegisterRMI function informs the TM-XA Service about each resource manager (RM) that can participate in transactions via the XA interface. The tmxa_RegisterRMI function must be called at initialization time exactly once for each XA RM instance that is used by the application. All calls to the tmxa_RegisterRMI function must be done in the same thread and before the tmxa_Init function is called. When an application restarts, it should register at least the same RM instances as in the previous execution of the application. Failure to do so can inhibit recovery of previously used RMs. 

The format of the open and close strings and the method used to obtain the address of the XA switch structure are defined by the RM. The XA specification, however, requires the strings to be no more than 256 characters (including the null-terminating byte) and the pointers to be non-null. The TM-XA Service makes a local copy of the openInfo and closeInfo strings, so an application can deallocate or reuse them when the call to the tmxa_RegisterRMI function completes.  The TM-XA Service does not make a copy of the switch structure; it should remain allocated for the life of the application. 

NOTES

In the Encina Monitor environment, the mon_InitResourceManager function automatically calls the tmxa_RegisterRMI function; applications should not make the call. 

RETURN VALUES

TMXA_SUCCESS

TMXA_ALREADY_INITIALIZED

TMXA_INVALID_PARAM

TMXA_TOO_MANY_INSTANCES_REGISTERED

TMXA_NO_MORE_MEMORY

RELATED INFORMATION

mon_InitResourceManager

tmxa_Init

tmxa_RegisterRMI

tmxa_SetRMIOptions

tmxa_status_t

 

  —  March 1997

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026