COSTRANSACTIONS_RECOVERYCOORDINATOR(3erl)
β¨ NAME β¨
CosTransactions_RecoveryCoordinator β bestie, this module implements the OMG CosTransactions::RecoveryCoordinator interface. That's it, that's the whole personality. π
π DESCRIPTION π
So like, to get access to the record definitions for the structures, you use this:
-include_lib("cosTransactions/include/CosTransactions.hrl").
No cap, that's the whole description section. Short and iconic. π«Ά
πΈ EXPORTS πΈ
π¦ replay_completion(RecoveryCoordinator, Timeout, Resource) -> Return π¦
Types:
RecoveryCoordinator = #objref
Timeout = integer(), milliseconds | 'infinity'
Resource = #objref
Return = Status | {'EXCEPTION', E}
E = #'CosTransactions_NotPrepared'{}
Status = atom()
Okay so here's the tea β β the RecoveryCoordinator object is the one that gets handed to you by the operation CosTransactions_Coordinator:register_resource/3. And replay_completion/2 may only be used by the registered Resource, and what it does is return the current status of the transaction. It's the move you pull when you're recovering after a failure. (Also yes, the page says /2 right there while the signature is /3 β iykyk, we do not ask questions, we simply report. π)
Possible Status replies, the whole roster:
'StatusCommitted''StatusCommitting''StatusMarkedRollback''StatusRollingBack''StatusRolledBack''StatusActive''StatusPrepared''StatusUnknown''StatusNoTransaction''StatusPreparing'
β οΈ Warning β οΈ
Not me being the bearer of bad news but: replay_completion/3 is blocking and may cause dead-lock if a child calls this function at the same time as its parent invokes an operation on the child. π
The good news? Dead-lock will not occur if the timeout has any value except 'infinity'. So like, don't be cute with 'infinity' here.
And one more thing fr fr: if the call is external incoming (intra-ORB), the timeout will not be activated. Which means β similar action must be taken if the Resource resides on another vendors ORB. π Protect your peace, protect your timeout.
k bye bestie, go forth and recover those transactions β¨ this page was brought to you by Ericsson AB, running cosTransactions version 5.2.2 β mwah, stay slay π
π¦ where this page comes from
- fedora 43: erlang-cosTransactions 1:5.2.2-1.fc43 Β· Apache-2.0
- fedora 44: erlang-cosTransactions 1:5.2.2-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms