DECdtm/XAprovides support for coordinating and managing transactions thatuse XA. By using an XA Gateway, DECdtm/XA can join other ResourceManagers (RM) in transactions that are managed by another TransactionManager (TM). This section describes how to configure and use DECdtmXA Gateway support.
In this chapter, the term XA Specification refersto Distributed Transaction Processing: The XA Specification.
To use DECdtm/XA and ensure proper startup and shutdown ofDECdtm/XA services, the following command files must be invoked:
SYS$STARTUP:DDTM$XA_STARTUP.COM
SYS$STARTUP:DDTM$XA_SHUTDOWN.COM
Add the command @SYS$STARTUP:DDTM$XA_STARTUP.COM to the startup database or to the command file SYS$MANAGER:SYSTARTUP_VMS.COM.
Add the command @SYS$STARTUP:DDTM$XA_SHUTDOWN.COM to the command file SYS$MANAGER:SYSHUTDWN.COM.
Perform the following steps to verify that DECdtm XA servicesare operating properly:
Use the XGCPutility to create a gateway log file with the same name as the localOpenVMS node. See Gateway Configuration and the HP OpenVMS System Management Utilities Reference Manual for details.
Run SYS$TEST:DECDTM_XG_IVP.EXE.
Use the XGCP utility to stop and restart the gatewayserver. This step is essential if you choose to configure the gatewaywith a name different than that of the local OpenVMS node. For moreinformation on the XGCP utility, see the HP OpenVMS System Management Utilities Reference Manual: M--Z.
Gateway Configuration
HP DECdtm/XA Version 2.1 Gateway now has clusterwidetransaction recovery support. Transactions from applicationsthat use a clusterwide DECdtm Gateway Domain Log can now be recoveredfrom any single-node failure. Gateway servers running on the remainingcluster nodes can initiate the transaction recovery process on behalfof the failed node.
The XA Gateway is configured into each transaction processing(TP) process as an XA-compliant resource manager. The XA Gatewayhandles XA calls from the XA transaction manager (TM) and maps theminto calls to DECdtm system services. This allows DECdtm to sendthe appropriate events to any DECdtm compliant Resource Manager(RM) used in a TP process.
The operation of the XA Gateway is transparent to the RM;DECdtm RMs do not need any modification to be used with the XA Gateway.
The XA Gateway uses a log file to record the mapping betweenXA transactions and DECdtm transactions. The log file is managedby the gateway server process DDTM$XG_SERVER.
Create the gateway log file with the XGCP utility (see the HP OpenVMS System Management Utilities Reference Manual).The size of the gateway log file depends on the number of concurrentlyactive transactions. Up to 600 bytes are required for each activetransaction, depending on the size of the transaction ID (TID) usedby the XA TM. The gateway log file expands automatically when required.
The gateway log file resides in the directory specified bythe logical name SYS$JOURNAL and has a name of the form SYSTEM$name.DDTM$XG_JOURNAL. For optimum performance, move each gateway log fileand each DECdtm log file to a separate physical device, and defineSYS$JOURNAL as a search list for the set of physical devices.
The XA Gateway requires an association on each OpenVMS Clusternode between an XA transaction manager and the XA Gateway log file.This association is managed by specifying a gateway name as follows:
Use the XGCP utility to create a gatewaylog file with the gateway name (see the HP OpenVMS System Management Utilities Reference Manual).
The gateway name is specified in the xa_open informationstring when the Gateway RM is configured in applications run underthe control of an XA TM. (XA RM configuration is described in OpenVMS Programming Concepts: Volume II.)
The first XA application run by the XA TM bindsthe gateway name to the local node of the OpenVMS Cluster. The gatewayname remains bound to that node until the gateway server is stopped.
All XA applications that run on the local node must be configuredwith the same gateway name. XA applications using the same namecannot run on other OpenVMS Cluster nodes. Therefore, you normally defineone gateway name and create one gateway log file for each node ofan OpenVMS Cluster.
You can change the association of a gateway name and bindthe gateway name to a different OpenVMS Cluster node, provided thatthe node can access the gateway log file. To change the associationof a gateway name, perform the following steps:
Stop all XA applicationson the original node.
Use the XGCP utility to stop the gateway serveron the original node.
Stop all XA applications on the new node.
Stop the gateway server on the new node and thenrestart the gateway server.
Run the original XA applications on the new node.
You must take care to protect against the loss of agateway log file, perhaps by shadowing the device on which it resides.If you create a new log file, or if you use an out-of-date log file, transactionsthat were originally recorded as committed may be incorrectly rolledback. This can cause databases to become inconsistent with eachother, or inconsistent with reports given to other systems or users.
Gateway log files are not large and it is better never todelete them. If you do delete an unwanted gateway log file, firstuse the DECdtm XGCP utility to verify that the gateway is not stilla participant in any prepared transactions. The gateway participantname is DDTM$XG/name.
The gateway server uses the following system logical names:
SYS$DECDTM_XG_REQS Number of concurrent requests processed by the server, inthe range 100 to 100,000. This determines the size of the globalsection that DDTM$XG uses for communication with the server, andthe quotas required by the server. The parameter is specified bydefining the logical name SYS$DECDTM_XG_REQS. Changes to the parameterdo not take effect until after the server and all client processeshave been stopped. If the value of this parameter is exceeded during operation,client requests are blocked instead of being processed in parallel.
SYS$DECDTM_XA_TRANS Estimated number of concurrent XA transactions, in the range1000 to 1,000,000. This determines the size of indexing tables usedinternally in the server. The parameter is specified by definingthe logical name SYS$DECDTM_XA_TRANS. Changes to this parameterdo not take effect until after the server has been stopped. If the value of this parameter is exceeded during operation,server CPU use will increase. However, the effect is unlikely tobe noticeable until the value of this parameter is exceeded by afactor of 10 or more.