This file is indexed.

/usr/share/gtk-doc/html/libgda-5.0/libgda-5.0-GdaXaTransaction.html is in libgda-5.0-doc 5.2.4-9.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GdaXaTransaction: GNOME Data Access 5 manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNOME Data Access 5 manual">
<link rel="up" href="connection.html" title="Connections &amp; commands">
<link rel="prev" href="GdaTransactionStatus.html" title="GdaTransactionStatus">
<link rel="next" href="virtual_connection.html" title="Virtual connections">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libgda-5.0-GdaXaTransaction.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="connection.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GdaTransactionStatus.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="virtual_connection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgda-5.0-GdaXaTransaction"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgda-5.0-GdaXaTransaction.top_of_page"></a>GdaXaTransaction</span></h2>
<p>GdaXaTransaction — Distributed transaction manager</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgda-5.0-GdaXaTransaction.stability-level"></a><h2>Stability Level</h2>
<a href="http://foldoc.org/Stable"><span class="acronym">Stable</span></a>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="libgda-5.0-GdaXaTransaction.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="returnvalue">GdaXaTransaction</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-new" title="gda_xa_transaction_new ()">gda_xa_transaction_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-register-connection" title="gda_xa_transaction_register_connection ()">gda_xa_transaction_register_connection</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-unregister-connection" title="gda_xa_transaction_unregister_connection ()">gda_xa_transaction_unregister_connection</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-begin" title="gda_xa_transaction_begin ()">gda_xa_transaction_begin</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-commit" title="gda_xa_transaction_commit ()">gda_xa_transaction_commit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-rollback" title="gda_xa_transaction_rollback ()">gda_xa_transaction_rollback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-commit-recovered" title="gda_xa_transaction_commit_recovered ()">gda_xa_transaction_commit_recovered</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-id-to-string" title="gda_xa_transaction_id_to_string ()">gda_xa_transaction_id_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId"><span class="returnvalue">GdaXaTransactionId</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-string-to-id" title="gda_xa_transaction_string_to_id ()">gda_xa_transaction_string_to_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgda-5.0-GdaXaTransaction.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction">GdaXaTransaction</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionError" title="enum GdaXaTransactionError">GdaXaTransactionError</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId">GdaXaTransactionId</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgda-5.0-GdaXaTransaction.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;virtual/gda-ldap-connection.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libgda-5.0-GdaXaTransaction.description"></a><h2>Description</h2>
<p>The <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object acts as a distributed transaction manager: to make sure local transactions on several
connections (to possibly different databases and database types) either all succeed or all fail. For more information,
see the X/Open CAE document Distributed Transaction Processing: The XA Specification. 
This document is published by The Open Group and available at </p>
<a class="ulink" href="http://www.opengroup.org/public/pubs/catalog/c193.htm" target="_top">http://www.opengroup.org/public/pubs/catalog/c193.htm</a>.
<p>The two phases commit protocol is implemented during the execution of a distributed transaction: modifications
made on any connection are first <span class="emphasis"><em>prepared</em></span> (which means that they are store in the database), and
if that phase succeeded for all the involved connections, then the <span class="emphasis"><em>commit</em></span> phase is executed
(where all the data previously stored during the <span class="emphasis"><em>prepare</em></span> phase are actually committed).
That second phase may actually fail, but the distributed transaction will still be considered as successfull
as the data stored during the <span class="emphasis"><em>prepare</em></span> phase can be committed afterwards.</p>
<p>A distributed transaction involves the following steps:</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><p>Create a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object</p></li>
<li class="listitem"><p>Register the connections which will be part of the distributed transaction with that object
using <a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-register-connection" title="gda_xa_transaction_register_connection ()"><code class="function">gda_xa_transaction_register_connection()</code></a></p></li>
<li class="listitem"><p>Beging the distributed transaction using <a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-begin" title="gda_xa_transaction_begin ()"><code class="function">gda_xa_transaction_begin()</code></a></p></li>
<li class="listitem"><p>Work individually on each connection as normally (make modifications)</p></li>
<li class="listitem"><p>Commit the distributed transaction using <a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-commit" title="gda_xa_transaction_commit ()"><code class="function">gda_xa_transaction_commit()</code></a></p></li>
<li class="listitem"><p>Discard the <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object using <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a></p></li>
</ol></div>
</div>
<div class="refsect1">
<a name="libgda-5.0-GdaXaTransaction.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gda-xa-transaction-new"></a><h3>gda_xa_transaction_new ()</h3>
<pre class="programlisting"><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="returnvalue">GdaXaTransaction</span></a> *
gda_xa_transaction_new (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> format</code></em>,
                        <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *global_transaction_id</code></em>);</pre>
<p>Creates a new <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object, which will control the process of
performing a distributed transaction across several connections.</p>
<div class="refsect3">
<a name="gda-xa-transaction-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>a format ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>global_transaction_id</p></td>
<td class="parameter_description"><p>the global transaction ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-new.returns"></a><h4>Returns</h4>
<p>the newly created object. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-register-connection"></a><h3>gda_xa_transaction_register_connection ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gda_xa_transaction_register_connection
                               (<em class="parameter"><code><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> *xa_trans</code></em>,
                                <em class="parameter"><code><a class="link" href="GdaConnection.html" title="GdaConnection"><span class="type">GdaConnection</span></a> *cnc</code></em>,
                                <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *branch</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Registers <em class="parameter"><code>cnc</code></em>
 to be used by <em class="parameter"><code>xa_trans</code></em>
 to create a distributed transaction.</p>
<p>Note: any <a class="link" href="GdaConnection.html" title="GdaConnection"><span class="type">GdaConnection</span></a> object can only be registered with at most one <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object; also
some connections may not be registered at all with a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object because the database
provider being used does not support it.</p>
<div class="refsect3">
<a name="gda-xa-transaction-register-connection.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>xa_trans</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cnc</p></td>
<td class="parameter_description"><p>the connection to add to <em class="parameter"><code>xa_trans</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>branch</p></td>
<td class="parameter_description"><p>the branch qualifier</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a place to store errors, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-register-connection.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if no error occurred</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-unregister-connection"></a><h3>gda_xa_transaction_unregister_connection ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gda_xa_transaction_unregister_connection
                               (<em class="parameter"><code><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> *xa_trans</code></em>,
                                <em class="parameter"><code><a class="link" href="GdaConnection.html" title="GdaConnection"><span class="type">GdaConnection</span></a> *cnc</code></em>);</pre>
<p>Unregisters <em class="parameter"><code>cnc</code></em>
 to be used by <em class="parameter"><code>xa_trans</code></em>
 to create a distributed transaction. This is
the opposite of <a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-register-connection" title="gda_xa_transaction_register_connection ()"><code class="function">gda_xa_transaction_register_connection()</code></a>.</p>
<div class="refsect3">
<a name="gda-xa-transaction-unregister-connection.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>xa_trans</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cnc</p></td>
<td class="parameter_description"><p>the connection to add to <em class="parameter"><code>xa_trans</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-begin"></a><h3>gda_xa_transaction_begin ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gda_xa_transaction_begin (<em class="parameter"><code><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> *xa_trans</code></em>,
                          <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Begins a distributed transaction (managed by <em class="parameter"><code>xa_trans</code></em>
). Please note that this phase may fail
for some connections if a (normal) transaction is already started (this depends on the database
provider being used), so it's better to avoid starting any (normal) transaction on any of the
connections registered with <em class="parameter"><code>xa_trans</code></em>
.</p>
<div class="refsect3">
<a name="gda-xa-transaction-begin.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>xa_trans</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a place to store errors, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-begin.returns"></a><h4>Returns</h4>
<p> TRUE if no error occurred</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-commit"></a><h3>gda_xa_transaction_commit ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gda_xa_transaction_commit (<em class="parameter"><code><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> *xa_trans</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> **cnc_to_recover</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Commits a distributed transaction (managed by <em class="parameter"><code>xa_trans</code></em>
). The commit is composed of two phases:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>a PREPARE phase where all the connections are required to store their transaction data to a 
    permanent place (to be able to complete the commit should a problem occur afterwards)</p></li>
<li class="listitem"><p>a COMMIT phase where the transaction data is actually written to the database</p></li>
</ul></div>
<p>If the PREPARE phase fails for any of the connection registered with <em class="parameter"><code>xa_trans</code></em>
, then the distributed commit
fails and FALSE is returned. During the COMMIT phase, some commit may actually fail but the transaction can
still be completed because the PREPARE phase succeeded (through the recover method).</p>
<div class="refsect3">
<a name="gda-xa-transaction-commit.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>xa_trans</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cnc_to_recover</p></td>
<td class="parameter_description"><p>a place to store the list of connections for which the commit phase failed, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gda.Connection][<a href="http://foldoc.org/out%20callee-allocates"><span class="acronym">out callee-allocates</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a place to store errors, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-commit.returns"></a><h4>Returns</h4>
<p> TRUE if no error occurred (there may be some connections to recover, though)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-rollback"></a><h3>gda_xa_transaction_rollback ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gda_xa_transaction_rollback (<em class="parameter"><code><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> *xa_trans</code></em>,
                             <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Cancels a distributed transaction (managed by <em class="parameter"><code>xa_trans</code></em>
).</p>
<div class="refsect3">
<a name="gda-xa-transaction-rollback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>xa_trans</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a place to store errors, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-rollback.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if no error occurred</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-commit-recovered"></a><h3>gda_xa_transaction_commit_recovered ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gda_xa_transaction_commit_recovered (<em class="parameter"><code><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> *xa_trans</code></em>,
                                     <em class="parameter"><code><a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> **cnc_to_recover</code></em>,
                                     <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Tries to commit the data prepared but which failed to commit (see <a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-commit" title="gda_xa_transaction_commit ()"><code class="function">gda_xa_transaction_commit()</code></a>). This
method allows one to terminate a distributed transaction which succeeded but for which some
connections needed to be recovered.</p>
<div class="refsect3">
<a name="gda-xa-transaction-commit-recovered.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>xa_trans</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransaction" title="struct GdaXaTransaction"><span class="type">GdaXaTransaction</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cnc_to_recover</p></td>
<td class="parameter_description"><p>a place to store the list of connections for which the there were data to recover and which failed to be actually committed, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gda.Connection][<a href="http://foldoc.org/out%20callee-allocates"><span class="acronym">out callee-allocates</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a place to store errors, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-commit-recovered.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if all the data which was still uncommitted has been committed</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-id-to-string"></a><h3>gda_xa_transaction_id_to_string ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gda_xa_transaction_id_to_string (<em class="parameter"><code>const <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId"><span class="type">GdaXaTransactionId</span></a> *xid</code></em>);</pre>
<p>Creates a string representation of <em class="parameter"><code>xid</code></em>
, in the format &lt;gtrid&gt;,&lt;bqual&gt;,&lt;formatID&gt; the 
&lt;gtrid&gt; and &lt;bqual&gt; strings contain alphanumeric characters, and non alphanumeric characters
are converted to "<code class="literal">ab</code>" where ab is the hexadecimal representation of the character.</p>
<div class="refsect3">
<a name="gda-xa-transaction-id-to-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>xid</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId"><span class="type">GdaXaTransactionId</span></a> pointer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-id-to-string.returns"></a><h4>Returns</h4>
<p>a new string representation of <em class="parameter"><code>xid</code></em>
. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gda-xa-transaction-string-to-id"></a><h3>gda_xa_transaction_string_to_id ()</h3>
<pre class="programlisting"><a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId"><span class="returnvalue">GdaXaTransactionId</span></a> *
gda_xa_transaction_string_to_id (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
<p>Creates a new <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId"><span class="type">GdaXaTransactionId</span></a> structure from its string representation, it's the opposite
of <a class="link" href="libgda-5.0-GdaXaTransaction.html#gda-xa-transaction-id-to-string" title="gda_xa_transaction_id_to_string ()"><code class="function">gda_xa_transaction_id_to_string()</code></a>.</p>
<p><span class="annotation">[<a href="http://foldoc.org/skip"><span class="acronym">skip</span></a>]</span></p>
<div class="refsect3">
<a name="gda-xa-transaction-string-to-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a string representation of a <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId"><span class="type">GdaXaTransactionId</span></a>, in the "gtrid,bqual,formatID" format</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gda-xa-transaction-string-to-id.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="libgda-5.0-GdaXaTransaction.html#GdaXaTransactionId" title="struct GdaXaTransactionId"><span class="type">GdaXaTransactionId</span></a> structure, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in <em class="parameter"><code>str</code></em>
has a wrong format</p>
<p>Free-function: g_free</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libgda-5.0-GdaXaTransaction.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdaXaTransaction"></a><h3>struct GdaXaTransaction</h3>
<pre class="programlisting">struct GdaXaTransaction {
	GObject                  object;
	GdaXaTransactionPrivate *priv;
};
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GdaXaTransactionError"></a><h3>enum GdaXaTransactionError</h3>
<div class="refsect3">
<a name="GdaXaTransactionError.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDA-XA-TRANSACTION-ALREADY-REGISTERED-ERROR:CAPS"></a>GDA_XA_TRANSACTION_ALREADY_REGISTERED_ERROR</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDA-XA-TRANSACTION-DTP-NOT-SUPPORTED-ERROR:CAPS"></a>GDA_XA_TRANSACTION_DTP_NOT_SUPPORTED_ERROR</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDA-XA-TRANSACTION-CONNECTION-BRANCH-LENGTH-ERROR:CAPS"></a>GDA_XA_TRANSACTION_CONNECTION_BRANCH_LENGTH_ERROR</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GdaXaTransactionId"></a><h3>struct GdaXaTransactionId</h3>
<pre class="programlisting">struct GdaXaTransactionId {
	guint32  format;
	gushort  gtrid_length;
	gushort  bqual_length;
	char     data [128];
};
</pre>
<div class="refsect3">
<a name="GdaXaTransactionId.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> <em class="structfield"><code><a name="GdaXaTransactionId.format"></a>format</code></em>;</p></td>
<td class="struct_member_description"><p>any number</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gushort"><span class="type">gushort</span></a> <em class="structfield"><code><a name="GdaXaTransactionId.gtrid-length"></a>gtrid_length</code></em>;</p></td>
<td class="struct_member_description"><p>number between 1 and 64</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gushort"><span class="type">gushort</span></a> <em class="structfield"><code><a name="GdaXaTransactionId.bqual-length"></a>bqual_length</code></em>;</p></td>
<td class="struct_member_description"><p>number between 1 and 64</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">char</span> <em class="structfield"><code><a name="GdaXaTransactionId.data"></a>data</code></em>[128];</p></td>
<td class="struct_member_description"> </td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>