1CosTransactions_Resource(3)Erlang Module DefinitionCosTransactions_Resource(3)
2
3
4
6 CosTransactions_Resource - This module implements the OMG CosTransac‐
7 tions::Resource interface.
8
10 To get access to the record definitions for the structures use:
11 -include_lib("cosTransactions/include/CosTransactions.hrl").
12
14 commit(Resource) -> Return
15
16 Types:
17
18 Resource = #objref
19 Return = ok | {'EXCEPTION', E}
20 E = #'CosTransactions_NotPrepared'{} | #'CosTransac‐
21 tions_HeuristicRollback'{} | #'CosTransactions_Heuris‐
22 ticMixed'{} | #'CosTransactions_HeuristicHazard'{}
23
24 This operation instructs the Resource to commit all changes made
25 as a part of the transaction.
26
27 The Resource can raise:
28
29 * Heuristic Exception - if a Heuristic decision is made which
30 differ from the true outcome of the transaction. The Re‐
31 source must remember the Heuristic outcome until the forget
32 operation is performed.
33
34 commit_one_phase(Resource) -> Return
35
36 Types:
37
38 Resource = #objref
39 Return = ok | {'EXCEPTION', E}
40 E = #'CosTransactions_HeuristicHazard'{} | #'CosTransac‐
41 tions_TransactionRolledBack'{}
42
43 If possible, the Resource should commit all changes made as part
44 of the transaction, else it should raise the TRANSACTION_ROLLED‐
45 BACK exception. This operation can only be used if the Resource
46 is the only child of its parent.
47
48 forget(Resource) -> Return
49
50 Types:
51
52 Resource = #objref
53 Return = ok
54
55 This operation informs the Resource that it is safe to forget
56 any Heuristic decisions and the knowledge of the transaction.
57
58 prepare(Resource) -> Return
59
60 Types:
61
62 Resource = #objref
63 Return = Vote | {'EXCEPTION', E}
64 Vote = 'VoteReadOnly' | 'VoteCommit' | 'VoteRollback'
65 E = #'CosTransactions_HeuristicMixed'{} | #'CosTransac‐
66 tions_HeuristicHazard'{}
67
68 This operation is invoked on the Resource to begin the two-phase
69 commit protocol.
70
71 The Resource can reply:
72
73 * 'VoteReadOnly' - if no persistent data has been modified by
74 the transaction. The Resource can forget all knowledge of
75 the transaction.
76
77 * 'VoteCommit' - if the Resource has been prepared and is able
78 to write all the data needed to commit the transaction to
79 stable storage.
80
81 * 'VoteRollback' - under any circumstances but must do so if
82 none of the alternatives above are applicable.
83
84 * Heuristic Exception - if a Heuristic decision is made which
85 differ from the true outcome of the transaction. The Re‐
86 source must remember the Heuristic outcome until the forget
87 operation is performed.
88
89 rollback(Resource) -> Return
90
91 Types:
92
93 Resource = #objref
94 Return = ok | {'EXCEPTION', E}
95 E = #'CosTransactions_HeuristicCommit'{} | #'CosTransac‐
96 tions_HeuristicMixed'{} | #'CosTransactions_HeuristicHaz‐
97 ard'{}
98
99 This operation instructs the Resource to rollback all changes
100 made as a part of the transaction.
101
102 The Resource can raise:
103
104 * Heuristic Exception - if a Heuristic decision is made which
105 differ from the true outcome of the transaction. The Re‐
106 source must remember the Heuristic outcome until the forget
107 operation is performed.
108
109Ericsson AB cosTransactions 5.0.2 CosTransactions_Resource(3)