XTA: API Reference for C++ language

TransactionManager.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009-2018, Christian Ferrari <tiian@users.sourceforge.net>
3  * All rights reserved.
4  *
5  * This file is part of LIXA.
6  *
7  * LIXA is free software: you can redistribute this file and/or modify
8  * it under the terms of the GNU Lesser General Public License version 2.1 as
9  * published by the Free Software Foundation.
10  *
11  * LIXA is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with LIXA. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 
21 
22 /* set module trace flag */
23 #ifdef LIXA_TRACE_MODULE
24 # undef LIXA_TRACE_MODULE
25 #endif /* LIXA_TRACE_MODULE */
26 #define LIXA_TRACE_MODULE LIXA_TRACE_MOD_XTA
27 
28 
29 
30 #include "Exception.hpp"
31 #include "TransactionManager.hpp"
32 
33 
34 
35 namespace xta {
36 
38  {
39  if (NULL == (tm = xta_transaction_manager_new()))
40  throw Exception(LIXA_RC_NULL_OBJECT,
41  "xta_transaction_manager_new");
42  };
43 
45  {
46  xta_transaction_manager_delete(tm);
47  tm = NULL;
48  };
49 
51  {
52  xta_transaction_t *tx = NULL;
53  if (NULL == (tx = xta_transaction_manager_create_transaction(tm)))
54  throw Exception(LIXA_RC_NULL_OBJECT,
55  "xta_transaction_manager_create_transaction");
56  Transaction t(tx);
57  return t;
58  };
59 
60 }
xta_transaction_manager_t * tm

Copyright © 2009-2019, Christian Ferrari tiian@users.sourceforge.net http://www.tiian.org/