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 you have set the relevant environment variables before starting the queue manager. Review your database product's documentation, and the advice given in Configuring Db2, Configuring 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).
- If you are using dynamic registration, your MQBEGIN call could succeed, but your SQL UPDATE (or similar) database call will fail.
- If you are not using dynamic registration, your MQBEGIN call will fail.