3.2 Transactions
After the start-up phase has succeeded and session is begun, client can run zero or
more transactions in the session.
Transactions must be run sequentially, that is the client must commit a
transaction before starting a new one.
To begin a transaction client sends the se_BeginTransaction message. If the
transaction begins Ok, the server answers se_BeginTransactionOk. If the
transaction fails to begin, the server answers se_BeginTransactionFailed.
To commit the transaction client sends the se_CommitTransaction message.
If the transaction commits Ok, the server answers se_CommitTransactionOk. If
the transaction fails to commit, the server does rollback for the transaction and
answers se_CommitTransactionFailed.
To rollback the transaction client sends the se_RollbackTransaction message. If
the transaction rollbacks Ok, the server answers se_RollbackTransactionOk. If the
transaction failed to rollback, the server sends se_RollbackTransactionFailed
and closes the session.
The possible instructions from the client in this phase are:
- se_BeginTransaction. Does not contain a body.
- se_CommitTransaction. Does not contain a body.
- se_RollbackTransaction. Does not contain a body.
The possible instructions from the server in this phase are:
- se_BeginTransactionOk. Does not contain a body.
- se_BeginTransactionFailed. The body contains the error code and
error info.
- se_CommitTransactionOk. Does not contain a body.
- se_CommitTransactionFailed. The body contains the error code and
error info.
- se_RollbackTransactionOk. Does not contain a body.
- se_RollbackTransactionFailed. The body contains the error code
and error info.
- se_ErrorResponse. Body contains info.
|