Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Part 2 Developing Applications by APIs> Chapter 9 Developing Java Applications> 9.3 How to Use Java APIs> 9.3.5 Error Handling

9.3.5.1 An Example of Error Handling

This section explains an example of how to handle when the error occurs.

mark1Process Flow

The point to be rerun will be separated by the error level when the error occurs. The following figure shows how to separate the rerun process by an error level.

[Figure 9-16 Error Handling]

mark2(1) When an error has occurred due to an incorrect parameter, etc

The SHUN_ERROR will be returned. In this case, re-execute the process that has failed after recorrecting the parameter.

mark2(2) When the transaction is cancelled

The SHUN_ERROR_TRANSACTION_ROLLEDBACK (*1) will be returned. In this case, re-execute the process from the start of the transaction.(*2).

*1) The error level that is returned only when the auto commit is invalid. This error level will not be returned when the auto commit is valid.
*2) From the API, users will not be able to start the transaction specifically. The transaction will be started automatically by the initial data update process after the auto commit is invalid.

mark2(3) When the connection to Shunsaku is closed forcibly

The SHUN_ERROR_CONNECTION_TERMINATED will be returned. In this case, release the ShunConnection object where the error occurred, and then re-execute the process starting from establishing the connection.


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006