Normal Database Transaction Mode

The normal database transaction mode requires an explicit <startTransaction/> request paired with <commit/> or <rollback/> request to complete the transaction.

A normal sequence of events might be:

  • <startTransaction/>
  • <updateSubscriber … />
  • <.../>
  • <updateSubscriber … />
  • <commit/>

Or:

  • <startTransaction/>
  • <updateSubscriber … />
  • <.../>
  • <updateSubscriber … />
  • <rollback/>

All requests within a transaction must be sent on the same TCP/IP connection, for both XML and SOAP interfaces. If the TCP/IP connection is disconnected when a transaction is in progress, the transaction is automatically rolled back.

In normal database transaction mode, many updates can be sent and committed to the database at once when the transaction is completed. This results in a much faster rate of updates per second.

Transaction integrity is ensured by allowing updates to be aborted or rolled back if there is an unexpected failure before the transaction is completed. Updates are not committed to the database until the <commit/> request is issued. If an unexpected failure occurs, or if the transaction is explicitly aborted by the <rollback/> request, the database is maintained in the state it was in prior to the beginning of the transaction.

Data across all requests performed inside a transaction is consistent. A transaction can only be opened by one client connection at a time, preventing multiple clients from updating the database at the same time.

Note:

A block transaction (<tx> … </tx>) cannot be sent during a normal database transaction, for example, after a <startTransaction/> request has been sent and before a <commit/> or <rollback/> request is sent. If a block transaction request is sent during this period, then the request is rejected with a INV_REQ_IN_NORMAL_TX error. This error does not affect or abort the open transaction.