summaryrefslogtreecommitdiff
path: root/CIAO/ccm/CCM_Transaction.idl
blob: 961793feb29e02e4e0a0baba57632a27e1ed50a5 (plain)
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
/// Compliant with OMG 06-04-01 Section 9.3.2.3

#if !defined (CCM_TRANSACTION_IDL)
#define CCM_TRANSACTION_IDL

#if !defined (CCM_LW)

module Components
{
  typeprefix Components "omg.org";

  module Transaction
  {

    typedef sequence<octet> TranToken;

    exception NoTransaction {};
    exception NotSupported {};
    exception SystemError {};
    exception RollbackError {};
    exception HeuristicMixed {};
    exception HeuristicRollback {};
    exception Security {};
    exception InvalidToken {};

    enum Status
    {
      ACTIVE,
      MARKED_ROLLBACK,
      PREPARED,
      COMMITTED,
      ROLLED_BACK,
      NO_TRANSACTION,
      PREPARING,
      COMMITTING,
      ROLLING_BACK
    };

    local interface UserTransaction {
      void begin ()
        raises (NotSupported,
                SystemError);

      void commit ()
        raises (RollbackError,
                NoTransaction,
                HeuristicMixed,
                HeuristicRollback,
                Security,
                SystemError);

      void rollback ()
        raises (NoTransaction,
                Security,
                SystemError);

      void set_rollback_only ()
        raises (NoTransaction,
                SystemError);

      Status get_status()
        raises (SystemError);

      void set_timeout (in long to)
        raises (SystemError);

      TranToken suspend ()
        raises (NoTransaction,
                SystemError);

      void resume (in TranToken txtoken)
        raises (InvalidToken,
                SystemError);
    };
  };
};

#endif

#endif /* CCM_TRANSACTION_IDL */