1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.2 -->
<HTML>
<HEAD>
<TITLE>CosTransactions_Coordinator</TITLE>
<SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
<STYLE TYPE="text/css">
<!--
.REFBODY { margin-left: 13mm }
.REFTYPES { margin-left: 8mm }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
ALINK="#FF0000">
<!-- refpage -->
<CENTER>
<A HREF="http://www.erlang.se">
<IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif">
</A>
<H1>CosTransactions_Coordinator</H1>
</CENTER>
<H3>MODULE</H3>
<DIV CLASS=REFBODY>
CosTransactions_Coordinator
</DIV>
<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
This module implements the OMG CosTransactions::Coordinator interface.
</DIV>
<H3>DESCRIPTION</H3>
<DIV CLASS=REFBODY>
<P> To get access to the record definitions for the structures use:<BR>
<CODE>-include_lib("cosTransactions/include/CosTransactions.hrl").</CODE>
</DIV>
<H3>EXPORTS</H3>
<P><A NAME="create_subtransaction/1"><STRONG><CODE>create_subtransaction(Coordinator) -> Control</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Control = #objref</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> A new subtransaction is created whose parent is the Coordinator argument.
<P> Raises exception:
<P>
<UL>
<LI>
'SubtransactionsUnavailable' - if nested transactions are not supported.
</LI>
<LI>
'Inactive' - if target transaction has already been prepared.
</LI>
</UL>
</DIV>
<P><A NAME="get_transaction_name/1"><STRONG><CODE>get_transaction_name(Coordinator) -> Name</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Name = string() of type "oe_name@machine_type_timestamp"</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns a printable string, which describe the transaction. The main purpose is to support debugging.
</DIV>
<P><A NAME="get_parent_status/1"><STRONG><CODE>get_parent_status(Coordinator) -> Status</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Status = atom()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> 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 <CODE>get_status/1</CODE> operation.
<P> Possible Status replies:
<P>
<UL>
<LI>
'StatusCommitted'
</LI>
<LI>
'StatusCommitting'
</LI>
<LI>
'StatusMarkedRollback'
</LI>
<LI>
'StatusRollingBack'
</LI>
<LI>
'StatusRolledBack'
</LI>
<LI>
'StatusActive'
</LI>
<LI>
'StatusPrepared'
</LI>
<LI>
'StatusUnknown'
</LI>
<LI>
'StatusNoTransaction'
</LI>
<LI>
'StatusPreparing'
</LI>
</UL>
</DIV>
<P><A NAME="get_status/1"><STRONG><CODE>get_status(Coordinator) -> Status</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Status = atom()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns the status of the transaction associated with the target object.
</DIV>
<P><A NAME="get_top_level_status/1"><STRONG><CODE>get_top_level_status(Coordinator) -> Status</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Status = atom()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns the status of the top-level transaction associated with the target object.
</DIV>
<P><A NAME="hash_top_level_tran/1"><STRONG><CODE>hash_top_level_tran(Coordinator) -> Return</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Return = integer()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns a hash code for the top-level transaction
associated with the target object. Equals the operation
<CODE>hash_transaction/1</CODE> if the target object is a top-level transaction.
</DIV>
<P><A NAME="hash_transaction/1"><STRONG><CODE>hash_transaction(Coordinator) -> Return</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Return = integer()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns a hash code for the transaction associated with the target object.
</DIV>
<P><A NAME="is_descendant_transaction/2"><STRONG><CODE>is_descendant_transaction(Coordinator, OtherCoordinator) -> Return</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>OtherCoordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Return = Boolean</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns true if the transction associated with the target object is a
descendant of the transaction associated with the parameter object.
</DIV>
<P><A NAME="is_same_transaction/2"><STRONG><CODE>is_same_transaction(Coordinator, OtherCoordinator) -> Return</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>OtherCoordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Return = Boolean</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns true if the transction associated with the target object is
related to the transaction associated with the parameter object.
</DIV>
<P><A NAME="is_top_level_transaction/1"><STRONG><CODE>is_top_level_transaction(Coordinator) -> Return</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Return = Boolean</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> Returns true if the transction associated with the target object is
a top-level transaction.
</DIV>
<P><A NAME="register_resource/2"><STRONG><CODE>register_resource(Coordinator, Resource) -> RecoveryCoordinator</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Resource = #objref</CODE></STRONG><BR>
<STRONG><CODE>RecoveryCoordinator = #objref</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> This operation registers the parameter <CODE>Resource</CODE> object as a participant in the
transaction associated with the target object. The <CODE>RecoveryCoordinator</CODE> returned
by this operation can be used by this Resource during recovery.
<P>
<TABLE CELLPADDING=4>
<TR>
<TD VALIGN=TOP><IMG ALT="Note!" SRC="note.gif"></TD>
<TD>
<P>
The Resources will be called in FIFO-order when preparing or committing.
Hence, be sure to register the Resources in the correct order.
</TD>
</TR>
</TABLE>
<P> Raises exception:
<P>
<UL>
<LI>
'Inactive' - if target transaction has already been prepared.
</LI>
</UL>
</DIV>
<P><A NAME="register_subtran_aware/2"><STRONG><CODE>register_subtran_aware(Coordinator, SubtransactionAwareResource) -> Return</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Return = ok</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> This operation registers the parameter <CODE>SubtransactionAwareResource</CODE> object such that
it will be notified when the transaction, associated wit the target object,
has committed or rolled back.
<P>
<TABLE CELLPADDING=4>
<TR>
<TD VALIGN=TOP><IMG ALT="Note!" SRC="note.gif"></TD>
<TD>
<P> The Resources will be called in FIFO-order.
Hence, be sure to register the Resources in the correct order.
</TD>
</TR>
</TABLE>
</DIV>
<P><A NAME="rollback_only/1"><STRONG><CODE>rollback_only(Coordinator) -> Return</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Coordinator = #objref</CODE></STRONG><BR>
<STRONG><CODE>Return = ok</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> The transaction associated with the target object is modified so the only
possible outcome is to rollback the transaction.
</DIV>
<H3>AUTHORS</H3>
<DIV CLASS=REFBODY>
support - support@erlang.ericsson.se<BR>
</DIV>
<CENTER>
<HR>
<SMALL>cosTransactions 1.2<BR>
Copyright © 1991-2004
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|