Error conditions
In XA dynamic registration there is a possibility of a confusing failure in the queue manager.
A common example is if you forget to set your database environment variables properly before starting your queue manager, the queue manager's calls to xa_open fail. No global units of work can be used.
To avoid this, ensure that we have set the relevant environment variables before starting the queue manager. Review your database product's documentation, and the advice given in Configure Db2, Configure Oracle, and Sybase configuration.
With all database products, the queue manager calls xa_open once at queue manager startup, as part of the recovery session (as explained in Considerations when contact is lost with the XA resource manager ). This xa_open call fails if you set your database environment variables incorrectly, but it does not cause the queue manager to fail to start. This is because the same xa_open error code is used by the database client library to indicate that the database server is unavailable. IBM MQ does not treat this as a serious error, as the queue manager must be able to start to continue processing data outside global units of work involving that database.
Subsequent calls to xa_open are made from the queue manager during the first MQBEGIN on an IBM MQ connection (if dynamic registration is not being used) or during a call by the database client code to the IBM MQ-provided ax_reg function (if dynamic registration is being used).
The timing of any error conditions (or, occasionally, FFST reports) depends on whether we are using dynamic registration:- If we are using dynamic registration, your MQBEGIN call could succeed, but your SQL UPDATE (or similar) database call will fail.
- If we are not using dynamic registration, your MQBEGIN call will fail.
Ensure that the environment variables are set correctly in the application and queue manager processes. Parent topic: XA dynamic registration