If the connection is broken, terminate the running UAP and then restart it. Connection should be re-established automatically.
If restarting the application program is not desired, tx_open must be reissued when the error indicating the broken connection is returned to the application program. The service can be resumed without having to terminate the application program. The following is an example of coding for reissuing tx_open.
int connection = 1; |
If you are using an XA interface supporting multi-thread, connection with HiRDB is established when a transaction is started, and connection is cut off when the transaction is terminated. Therefore, even if the connection is broken during communication, it will be re-established when the next transaction is started.
If you used dynamic registration, specify transaction in the OpenTP1/Server Base operand trn_rm_open_close_scope. With this specification, OpenTP1/Server Base establishes or breaks the connection to HiRDB when the transaction starts or terminates. Therefore, even if the connection is broken during communication, it will be re-established when the next transaction is started.
If you used static registration, the transaction manager checks the connection with HiRDB when a transaction is started. If the connection has been broken, it is re-established automatically, and the transaction is started.
If connection with HiRDB is broken before the first SQL statement for accessing HiRDB is executed since the transaction manager started the transaction, the HiRDB client library re-establishes connection when the SQL statement is executed. However, the connection will not be re-established if the connection is broken as a result of a network error, since these cannot be detected.