1
2
3
4
5
6
7
8
9
10
11 package org.mule.umo;
12
13 import javax.transaction.Transaction;
14
15 public interface UMOTransaction
16 {
17
18 int STATUS_ACTIVE = 0;
19 int STATUS_MARKED_ROLLBACK = 1;
20 int STATUS_PREPARED = 2;
21 int STATUS_COMMITTED = 3;
22 int STATUS_ROLLEDBACK = 4;
23 int STATUS_UNKNOWN = 5;
24 int STATUS_NO_TRANSACTION = 6;
25 int STATUS_PREPARING = 7;
26 int STATUS_COMMITTING = 8;
27 int STATUS_ROLLING_BACK = 9;
28
29
30
31
32
33
34 void begin() throws TransactionException;
35
36
37
38
39
40
41 void commit() throws TransactionException;
42
43
44
45
46
47
48 void rollback() throws TransactionException;
49
50 int getStatus() throws TransactionException;
51
52 boolean isBegun() throws TransactionException;
53
54 boolean isRolledBack() throws TransactionException;
55
56 boolean isCommitted() throws TransactionException;
57
58 Object getResource(Object key);
59
60 boolean hasResource(Object key);
61
62 void bindResource(Object key, Object resource) throws TransactionException;
63
64 void setRollbackOnly() throws TransactionException;
65
66 boolean isRollbackOnly() throws TransactionException;
67
68 boolean isXA();
69
70
71
72
73
74
75 void resume() throws TransactionException;
76
77
78
79
80
81
82
83 Transaction suspend() throws TransactionException;
84
85 }