~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/cosTransactions/doc/src/CosTransactions_Resource.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • mto: (3.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
 
3
 
 
4
<erlref>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>1999</year>
 
8
      <year>2008</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
12
  The contents of this file are subject to the Erlang Public License,
 
13
  Version 1.1, (the "License"); you may not use this file except in
 
14
  compliance with the License. You should have received a copy of the
 
15
  Erlang Public License along with this software. If not, it can be
 
16
  retrieved online at http://www.erlang.org/.
 
17
 
 
18
  Software distributed under the License is distributed on an "AS IS"
 
19
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
  the License for the specific language governing rights and limitations
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>CosTransactions_Resource</title>
 
27
    <prepared></prepared>
 
28
    <docno></docno>
 
29
    <checked></checked>
 
30
    <date>1999-04-12</date>
 
31
    <rev>PA1</rev>
 
32
  </header>
 
33
  <module>CosTransactions_Resource</module>
 
34
  <modulesummary>This module implements the OMG CosTransactions::Resource interface.</modulesummary>
 
35
  <description>
 
36
    <p>To get access to the record definitions for the structures use:      <br></br>
 
37
<c>-include_lib("cosTransactions/include/CosTransactions.hrl").</c></p>
 
38
  </description>
 
39
  <funcs>
 
40
    <func>
 
41
      <name>commit(Resource) -> Return</name>
 
42
      <fsummary>Instruct the target object to commit the transaction</fsummary>
 
43
      <type>
 
44
        <v>Resource = #objref</v>
 
45
        <v>Return = ok | {'EXCEPTION', E}</v>
 
46
        <v>E = #'CosTransactions_NotPrepared'{} | #'CosTransactions_HeuristicRollback'{} | #'CosTransactions_HeuristicMixed'{} | #'CosTransactions_HeuristicHazard'{}</v>
 
47
      </type>
 
48
      <desc>
 
49
        <p>This operation instructs the Resource to commit all changes made as a part of the transaction.</p>
 
50
        <p>The Resource can raise:</p>
 
51
        <list type="bulleted">
 
52
          <item>Heuristic Exception - if a Heuristic decision is made which differ
 
53
           from the true outcome of the transaction. The Resource must remember
 
54
           the Heuristic outcome until the <c>forget</c> operation is performed.</item>
 
55
        </list>
 
56
      </desc>
 
57
    </func>
 
58
    <func>
 
59
      <name>commit_one_phase(Resource) -> Return</name>
 
60
      <fsummary>Instruct the target object to commit the transaction</fsummary>
 
61
      <type>
 
62
        <v>Resource = #objref</v>
 
63
        <v>Return = ok | {'EXCEPTION', E}</v>
 
64
        <v>E = #'CosTransactions_HeuristicHazard'{} | #'CosTransactions_TransactionRolledBack'{}</v>
 
65
      </type>
 
66
      <desc>
 
67
        <p>If possible, the Resource should commit all changes made as part of the transaction,
 
68
          else it should raise the TRANSACTION_ROLLEDBACK exception. 
 
69
          This operation can only be used if the Resource is the only child of its parent.</p>
 
70
      </desc>
 
71
    </func>
 
72
    <func>
 
73
      <name>forget(Resource) -> Return</name>
 
74
      <fsummary>Instruct the target object to forget any heuristic decisions</fsummary>
 
75
      <type>
 
76
        <v>Resource = #objref</v>
 
77
        <v>Return = ok</v>
 
78
      </type>
 
79
      <desc>
 
80
        <p>This operation informs the Resource that it is safe to forget any Heuristic
 
81
          decisions and the knowledge of the transaction.</p>
 
82
      </desc>
 
83
    </func>
 
84
    <func>
 
85
      <name>prepare(Resource) -> Return</name>
 
86
      <fsummary>Instruct the target object to begin the two-phase commit protocol</fsummary>
 
87
      <type>
 
88
        <v>Resource = #objref</v>
 
89
        <v>Return = Vote | {'EXCEPTION', E}</v>
 
90
        <v>Vote = 'VoteReadOnly' | 'VoteCommit' | 'VoteRollback'</v>
 
91
        <v>E = #'CosTransactions_HeuristicMixed'{} | #'CosTransactions_HeuristicHazard'{}</v>
 
92
      </type>
 
93
      <desc>
 
94
        <p>This operation is invoked on the Resource to begin the two-phase commit protocol.</p>
 
95
        <p>The Resource can reply:</p>
 
96
        <list type="bulleted">
 
97
          <item>'VoteReadOnly' - if no persistent data has been modified by the transaction. 
 
98
           The Resource can forget all knowledge of the transaction. </item>
 
99
          <item>'VoteCommit' - if the Resource has been prepared and is able to write all the
 
100
           data needed to commit the transaction to stable storage.</item>
 
101
          <item>'VoteRollback' - under any circumstances but must do so if none of the alternatives above
 
102
           are applicable.</item>
 
103
          <item>Heuristic Exception - if a Heuristic decision is made which differ
 
104
           from the true outcome of the transaction. The Resource must remember
 
105
           the Heuristic outcome until the <c>forget</c> operation is performed.</item>
 
106
        </list>
 
107
      </desc>
 
108
    </func>
 
109
    <func>
 
110
      <name>rollback(Resource) -> Return</name>
 
111
      <fsummary>Instruct the target object to rollback the transaction</fsummary>
 
112
      <type>
 
113
        <v>Resource = #objref</v>
 
114
        <v>Return = ok | {'EXCEPTION', E}</v>
 
115
        <v>E = #'CosTransactions_HeuristicCommit'{} | #'CosTransactions_HeuristicMixed'{} | #'CosTransactions_HeuristicHazard'{}</v>
 
116
      </type>
 
117
      <desc>
 
118
        <p>This operation instructs the Resource to rollback all changes made as a part of the transaction.</p>
 
119
        <p>The Resource can raise:</p>
 
120
        <list type="bulleted">
 
121
          <item>Heuristic Exception - if a Heuristic decision is made which differ
 
122
           from the true outcome of the transaction. The Resource must remember
 
123
           the Heuristic outcome until the <c>forget</c> operation is performed.</item>
 
124
        </list>
 
125
      </desc>
 
126
    </func>
 
127
  </funcs>
 
128
  
 
129
</erlref>
 
130