Previous Topic Next topic Print topic


Handling XA Connection Errors

Restriction: This topic applies only when the Enterprise Server feature is enabled.

The way a server instance handles XA resource connection errors is controlled by the following environment variables:

ES_XA_RECONNECT
If this environment variable is set to True, and an error occurs on a call to XA, the server attempts to reconnect to the resource manager.

If the server cannot reconnect, it will attempt to retry the XA call a maximum of five times. You can control the number of times that the server attempts to retry the call with the next environment variable.

Note: If an XAER_RMFAIL (resource manager is unavailable) error occurs, the XA switch module will be disabled irrespective of whether XA_RECONNECT is used or not.
ES_XA_????_NB_RETRIES
This environment variable controls the number of times that the server attempts to retry a failed XA call. The format for setting this environment variable is:
ES_XA_????_NB_RETRIES=nnnn

where ???? defines the XA ID, and nnnn is the number of attempts to retry the XA call before the SEP is recycled, and the switch disabled. The default value is 5, and its maximum value is 254. If you set nnnn to -1 or a number greater than 254, your switch module will never be disabled, and reconnection attempts will continue indefinitely.

Note:

When the region is started, an XA switch module is loaded for each SEP, and an xa_open call is made. If the xa_open fails the switch is immediately disabled.

If the initial xa_open call is successful:
  • Each time an XA transaction is executed, and an XA call fails, the retries counter is incremented.
  • When the maximum number of retries is reached, the SEP is marked "dirty", and recycled.
  • If the initial xa_open call in the replacing SEP still fails, the switch is disabled, and you must use Enterprise Server Monitoring and Control (ESMAC) to reenable the switch after the problem with the database is fixed.

If the maximum number of call failures is reached, thereby disabling your switch module, and ES_XA_RECONNECT is set to True, you can reenable the switch by starting ESMAC, and performing the following steps:

To start ESMAC:

  1. Access the Enterprise Server Administration screen for your installation.
  2. In the table of enterprise server instances, check that the server you want has started, and if not, start it.
  3. In the Status column of the enterprise server instance to monitor, click Details.

    The Details screen for the server is displayed.

  4. On the Details screen, select the Server > Control tab, then click ES Monitor & Control.

    The Enterprise Server Monitoring and Control (ESMAC) screen is displayed.

To reenable the switch module:

  1. In the Resources options, select Active.
  2. Select XAT.
  3. Click on the relevant disabled resource from the list of active ones to open the details for that XAT.
  4. Check the Enable box.
Previous Topic Next topic Print topic