.TH CosTransactions_Coordinator 3erl "cosTransactions 1.3.2" "Ericsson AB" "Erlang Module Definition" .SH NAME CosTransactions_Coordinator \- This module implements the OMG CosTransactions::Coordinator interface. .SH DESCRIPTION .LP To get access to the record definitions for the structures use: .br \fI-include_lib("cosTransactions/include/CosTransactions\&.hrl")\&.\fR\& .SH EXPORTS .LP .B create_subtransaction(Coordinator) -> Control .br .RS .LP Types: .RS 3 Coordinator = #objref .br Control = #objref .br .RE .RE .RS .LP A new subtransaction is created whose parent is the Coordinator argument\&. .LP Raises exception: .RS 2 .TP 2 * \&'SubtransactionsUnavailable\&' - if nested transactions are not supported\&. .LP .TP 2 * \&'Inactive\&' - if target transaction has already been prepared\&. .LP .RE .RE .LP .B get_transaction_name(Coordinator) -> Name .br .RS .LP Types: .RS 3 Coordinator = #objref .br Name = string() of type "oe_name@machine_type_timestamp" .br .RE .RE .RS .LP Returns a printable string, which describe the transaction\&. The main purpose is to support debugging\&. .RE .LP .B get_parent_status(Coordinator) -> Status .br .RS .LP Types: .RS 3 Coordinator = #objref .br Status = atom() .br .RE .RE .RS .LP Returns the status of the parent transaction associated with the target object\&. If the target object is a top-level transaction this operation is equivalent to \fIget_status/1\fR\& operation\&. .LP Possible Status replies: .RS 2 .TP 2 * \&'StatusCommitted\&' .LP .TP 2 * \&'StatusCommitting\&' .LP .TP 2 * \&'StatusMarkedRollback\&' .LP .TP 2 * \&'StatusRollingBack\&' .LP .TP 2 * \&'StatusRolledBack\&' .LP .TP 2 * \&'StatusActive\&' .LP .TP 2 * \&'StatusPrepared\&' .LP .TP 2 * \&'StatusUnknown\&' .LP .TP 2 * \&'StatusNoTransaction\&' .LP .TP 2 * \&'StatusPreparing\&' .LP .RE .RE .LP .B get_status(Coordinator) -> Status .br .RS .LP Types: .RS 3 Coordinator = #objref .br Status = atom() .br .RE .RE .RS .LP Returns the status of the transaction associated with the target object\&. .RE .LP .B get_top_level_status(Coordinator) -> Status .br .RS .LP Types: .RS 3 Coordinator = #objref .br Status = atom() .br .RE .RE .RS .LP Returns the status of the top-level transaction associated with the target object\&. .RE .LP .B hash_top_level_tran(Coordinator) -> Return .br .RS .LP Types: .RS 3 Coordinator = #objref .br Return = integer() .br .RE .RE .RS .LP Returns a hash code for the top-level transaction associated with the target object\&. Equals the operation \fIhash_transaction/1\fR\& if the target object is a top-level transaction\&. .RE .LP .B hash_transaction(Coordinator) -> Return .br .RS .LP Types: .RS 3 Coordinator = #objref .br Return = integer() .br .RE .RE .RS .LP Returns a hash code for the transaction associated with the target object\&. .RE .LP .B is_descendant_transaction(Coordinator, OtherCoordinator) -> Return .br .RS .LP Types: .RS 3 Coordinator = #objref .br OtherCoordinator = #objref .br Return = Boolean .br .RE .RE .RS .LP Returns true if the transaction associated with the target object is a descendant of the transaction associated with the parameter object\&. .RE .LP .B is_same_transaction(Coordinator, OtherCoordinator) -> Return .br .RS .LP Types: .RS 3 Coordinator = #objref .br OtherCoordinator = #objref .br Return = Boolean .br .RE .RE .RS .LP Returns true if the transaction associated with the target object is related to the transaction associated with the parameter object\&. .RE .LP .B is_top_level_transaction(Coordinator) -> Return .br .RS .LP Types: .RS 3 Coordinator = #objref .br Return = Boolean .br .RE .RE .RS .LP Returns true if the transaction associated with the target object is a top-level transaction\&. .RE .LP .B register_resource(Coordinator, Resource) -> RecoveryCoordinator .br .RS .LP Types: .RS 3 Coordinator = #objref .br Resource = #objref .br RecoveryCoordinator = #objref .br .RE .RE .RS .LP This operation registers the parameter \fIResource\fR\& object as a participant in the transaction associated with the target object\&. The \fIRecoveryCoordinator\fR\& returned by this operation can be used by this Resource during recovery\&. .LP .RS -4 .B Note: .RE The Resources will be called in FIFO-order when preparing or committing\&. Hence, be sure to register the Resources in the correct order\&. .LP Raises exception: .RS 2 .TP 2 * \&'Inactive\&' - if target transaction has already been prepared\&. .LP .RE .RE .LP .B register_subtran_aware(Coordinator, SubtransactionAwareResource) -> Return .br .RS .LP Types: .RS 3 Coordinator = #objref .br Return = ok .br .RE .RE .RS .LP This operation registers the parameter \fISubtransactionAwareResource\fR\& object such that it will be notified when the transaction, associated wit the target object, has committed or rolled back\&. .LP .RS -4 .B Note: .RE The Resources will be called in FIFO-order\&. Hence, be sure to register the Resources in the correct order\&. .RE .LP .B rollback_only(Coordinator) -> Return .br .RS .LP Types: .RS 3 Coordinator = #objref .br Return = ok .br .RE .RE .RS .LP The transaction associated with the target object is modified so the only possible outcome is to rollback the transaction\&. .RE