OpenTP1 Version 7 Operation
If an I/O error occurs with the XAR file while the XA resource service is online, the XA resource service automatically swaps the online XAR file for the backup XAR file. This facility is called swapping. This facility allows nonstop operation of the XA resource service when there is a problem with the online XAR file.
You can use the swapping facility in the following ways:
If an I/O error occurs in an XAR file, the method to restart the online processing of the XA resource service differs depending on the file and the time the error occurs. The following shows the actions to take each time an error occurs.
The first and second methods involve replacing the XAR file that caused the error with a new XAR file without closing down OpenTP1. These methods allow the XA resource service to recover from shared memory the transaction branches that were present before the error occurred.
Since the first method involves measures that are implemented before any damage can occur to the backup XAR file, reliable operation of the XA resource service can be assured.
With the third method, even if OpenTP1 terminates, the XA resource service can access the information in the backup XAR file to recover the transaction branches that were present before the error occurred.
With the fourth method, OpenTP1 has terminated and both the online and backup XAR files have failed. Thus, swapping in a new XAR file does not allow the XA resource service to recover the transaction branches that were present before the error occurred.
Each method is described in detail below.
If an error occurs with the online XAR file, the XA resource service automatically swaps in the backup XAR file and continues uninterrupted operation. At this point, you can replace the failed online XAR file with a new file, allowing the transaction branches that were present before the error occurred to be recovered without having to shut down OpenTP1.
When the XA resource service is running using the backup XAR file, and you wish to replace the failed online XAR file with a new file, use the xarhold command to forcibly shut down the XA resource service. You will still be able to execute other OpenTP1 services.
To swap online XAR files at a failure:
The following figure shows how to swap XAR files when the online XAR file fails.
Figure 3-30 Swapping XAR files at failure of the online XAR file
Any failure of the backup XAR file, swapped in to allow continuous operation following an error with the online XAR file, will cause the XA resource service to shut down. If this occurs, OpenTP1 responds with the error code XAER_RMERR to every transaction instruction from an application server linked by the XA resource service. However, since the error is localized to the XA resource service, OpenTP1 continues running, and you can continue to execute OpenTP1 services with the exception of the XA resource service. Once you replace the XAR files with new files, you can recover the transaction branches of the XA resource service.
To replace the XAR file when both the online XAR file and the backup XAR file have failed and the XA resource service has shut down:
The following figure shows how to swap XAR files when the backup XAR file fails.
Figure 3-31 Swapping XAR files at failure of the backup XAR file
If the online XAR file fails and OpenTP1 terminates (either normally or abnormally), the XA resource service shuts down. To restart the XA resource service, you create a new XAR file and then restart OpenTP1.
To replace the XAR file when the online XAR file fails and OpenTP1 has terminated:
The following figure shows how to replace the XAR file when the online XAR file fails and OpenTP1 has been terminated.
Figure 3-32 Swapping XAR files at failure of the online XAR file with OpenTP1 not running
If both the online and backup XAR files fail and OpenTP1 terminates (either normally or abnormally), the XA resource service shuts down. This means that the transaction branches that were present before the error occurred cannot be recovered. To restart the XA resource service, create new XAR files, and then forcibly start OpenTP1 (forced normal start).
To replace XAR files when both the online and backup XAR files fail and OpenTP1 has terminated:
The following figure shows how to replace the XAR files when both the online and backup XAR files fail and OpenTP1 has terminated.
Figure 3-33 Swapping XAR files at failure of both the online and backup XAR files with OpenTP1 not running
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.