OSID Logo
OSID Specifications
transaction package
Version 3.1.0
Interfaceosid.transaction.Transaction
Used Byosid.OsidSession
Description

OsidTransaction is used by an OsidSession to provide transactions across its methods. Transactions are performed within a session. Coordination of transactions across OSIDS of there sessions requires the availability of a transaction manager.

A trsnaction is started upon creation of an OsidTransaction. Actions within a session are queued until the transaction is committed or aborted.

Methodprepare
Description

Prepares for a commit. No further operations are permitted in the associated manager until this transaction is committed or aborted.

ErrorsILLEGAL_STATE this transaction has been committed or aborted
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
TRANSACTION_FAILURE this transaction cannot proceed due to a bad transaction element
Compliancemandatory This method must be implemented.
Provider Notes

The provider must verify this transaction such that a commit will succeed and reliably record the state changes resulting from this transaction before returning.

Methodcommit
Description

Commits the transaction and makes the state change(s) visible. This transaction is effectively closed and the only valid method that may be invoked is getState().

ErrorsILLEGAL_STATE this transaction has been committed or aborted
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

Any resources allocated for this transaction can be released.

Methodabort
Description

Cancels this transaction, rolling back the queue of operations since the start of this transaction. This transaction is effectively closed and the only valid method that may be invoked is getState().

ErrorsILLEGAL_STATE this transaction has been committed or aborted
Compliancemandatory This method must be implemented.
Provider Notes

Any resources allocated for this transaction can be released.

MethodgetState
Description

Gets the current state of this transaction.

Returnosid.transaction.TransactionState the current state of this transaction
Compliancemandatory This method must be implemented.