XTA: API Reference for C++ language
Main Page
Namespaces
Classes
Files
File List
File Members
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
37
TransactionManager::TransactionManager
()
38
{
39
if
(NULL == (
tm
= xta_transaction_manager_new()))
40
throw
Exception
(LIXA_RC_NULL_OBJECT,
41
"xta_transaction_manager_new"
);
42
};
43
44
TransactionManager::~TransactionManager
()
45
{
46
xta_transaction_manager_delete(
tm
);
47
tm
= NULL;
48
};
49
50
Transaction
TransactionManager::createTransaction
()
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
}
TransactionManager.hpp
xta::TransactionManager::createTransaction
Transaction createTransaction()
Definition:
TransactionManager.cpp:50
xta::TransactionManager::tm
xta_transaction_manager_t * tm
Definition:
TransactionManager.hpp:50
xta::Transaction
Definition:
Transaction.hpp:43
xta::TransactionManager::~TransactionManager
~TransactionManager()
Definition:
TransactionManager.cpp:44
xta::Exception
Definition:
Exception.hpp:47
Exception.hpp
xta::TransactionManager::TransactionManager
TransactionManager()
Definition:
TransactionManager.cpp:37
Copyright © 2009-2019, Christian Ferrari
tiian@users.sourceforge.net
http://www.tiian.org/