Exception handling and consistency of data

If the statement or stored procedure raises an error, a ConfirmBOD is created. This ConfirmBOD must include the exception message. To raise an error, you can for example use this code:

RAISERROR ('Customer ' + @customerId + ' does not exist',10, 1)

A ConfirmBOD is also created if the database throws an exception or the transaction cannot be committed successfully.

Transaction management

The database transaction is managed by the ION Service. Therefore, delivery is guaranteed. An incoming message is removed from the queue in the same transaction that commits the changes to the database.

Note: Consequently, it is not allowed to commit or abort inside the used stored procedure. Oracle database does not permit Read and Write operations simultaneously within the same procedure without relinquishing the transaction control. This can lead to the situation that the stored procedure execution succeeds but the full transaction from ION perspective fails. Due to this incompatibility, currently the Request-Reply action and DB connector as an intermediate step are proven to work only with Microsfot SQL server.

When reading the database, the ION Service also manages the transaction. The statement to read the database may perform inserts or updates, for example to keep track of the timestamp when reading.