OSID Logo
OSID Specifications
transaction package
Version 3.0.0
Release Candidate Preview
Interfaceosid.transaction.Transaction
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_STATEthis transaction has been committed or aborted
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
TRANSACTION_FAILUREthis transaction cannot proceed due to a bad transaction element
CompliancemandatoryThis 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_STATEthis transaction has been committed or aborted
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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_STATEthis transaction has been committed or aborted
CompliancemandatoryThis 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.TransactionStatethe current state of this transaction
CompliancemandatoryThis method must be implemented.