Project:
lixa
Code Location:
https://lixa.svn.sourceforge.net/svnroot/lixa/tests//tests
/
xa_5_26.at
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
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
AT_BANNER([XA: 5.26 ax_reg/ax_unreg]) AT_SETUP([XA/5.26/0.0 (ax_reg)]) # XA specification: page 26 # A resource manager calls ax_reg() to inform a transaction manager that it is # about to perform work on behalf of an application thread of control. The # transaction manager, in turn, replies to the resource manager with an # indication of whether or not that work should be performed on behalf of a # transaction branch. If the transaction manager determines that the calling # thread of control is involved in a branch, upon successful return, xid # points to a valid XID. If the resource manager.s work is outside any global # transaction, xid points to NULLXID. # # A resource manager must call this function from the same thread of control # that originally called ax_reg(). A resource manager taking advantage of this # facility must have TMREGISTER set in the flags element of its xa_switch_t # structure (see Chapter 4). Moreover, ax_unreg() returns failure [TMER_TMERR] # when issued by a resource manager that has not set TMREGISTER. # # The function.s first argument, rmid, is the integer that the resource # manager received when the transaction manager called xa_open(). It # identifies the resource manager in the thread of control. # # [TMER_PROTO] # The routine was invoked in an improper context. See Chapter 6 for details. AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_start/0 xa_end/0 xa_rollback/0 xa_close/0 ]]) AT_DATA([monkey2s.conf], [[# monkey R.M.config xa_open/0 xa_start/0 xa_end/0 xa_rollback/0 xa_close/0 ]]) AT_DATA([monkey1d.conf], [[# monkey R.M.config xa_open/0 xa_close/0 ]]) AT_DATA([monkey2d.conf], [[# monkey R.M.config xa_open/0 xa_end/0 xa_rollback/0 xa_close/0 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0002 ; lixa_test_exec.sh reset start case0027 0 2>$TESTS_TMP_FILE1], [0], [ignore], [ignore]) AT_CHECK([cat $TESTS_TMP_FILE1 | tee $TESTS_TMP_FILE2 && grep 'lixa_monkeyrm_call_ax_reg.*NULL XID.*rmid=2' $TESTS_TMP_FILE2], [0], [ignore], [ignore]) AT_CHECK([cat $TESTS_TMP_FILE1 | tee $TESTS_TMP_FILE2 && grep 'lixa_monkeyrm_call_ax_reg.*valid XID.*rmid=3' $TESTS_TMP_FILE2], [0], [ignore], [ignore]) AT_CLEANUP AT_SETUP([XA/5.29/0.0 (ax_unreg)]) # XA specification: page 29 # AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_start/0 xa_end/0 xa_rollback/0 xa_close/0 ]]) AT_DATA([monkey2s.conf], [[# monkey R.M.config xa_open/0 xa_start/0 xa_end/0 xa_rollback/0 xa_close/0 ]]) AT_DATA([monkey1d.conf], [[# monkey R.M.config xa_open/0 xa_close/0 ]]) AT_DATA([monkey2d.conf], [[# monkey R.M.config xa_open/0 xa_close/0 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0002 ; lixa_test_exec.sh noreset stop case0028 0 2>$TESTS_TMP_FILE1], [0], [ignore], [ignore]) AT_CHECK([cat $TESTS_TMP_FILE1 | tee $TESTS_TMP_FILE2 && grep 'lixa_monkeyrm_call_ax_reg.*NULL XID.*rmid=2' $TESTS_TMP_FILE2], [0], [ignore], [ignore]) AT_CHECK([cat $TESTS_TMP_FILE1 | tee $TESTS_TMP_FILE2 && grep 'lixa_monkeyrm_call_ax_reg.*valid XID.*rmid=3' $TESTS_TMP_FILE2], [0], [ignore], [ignore]) AT_CLEANUP
