XTA: API Reference for C++ language
Main Page
Namespaces
Classes
Files
File List
File Members
PostgresqlXaResource.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
/* include XTA header file */
23
#include "xta.h"
24
25
26
27
/* set module trace flag */
28
#ifdef LIXA_TRACE_MODULE
29
# undef LIXA_TRACE_MODULE
30
#endif
/* LIXA_TRACE_MODULE */
31
#define LIXA_TRACE_MODULE LIXA_TRACE_MOD_XTA
32
33
34
35
#include "
Exception.hpp
"
36
#include "
PostgresqlXaResource.hpp
"
37
38
39
40
namespace
xta {
41
PostgresqlXaResource::PostgresqlXaResource
(
42
PGconn *connection, std::string
const
& name,
43
std::string
const
& open_info)
44
{
45
if
(NULL == (
pxar
= xta_postgresql_xa_resource_new(
46
connection, name.c_str(), open_info.c_str())))
47
throw
Exception
(LIXA_RC_NULL_OBJECT,
48
"xta_postgresql_xa_resource_new"
);
49
};
50
PostgresqlXaResource::~PostgresqlXaResource
()
51
{
52
xta_postgresql_xa_resource_delete(
pxar
);
53
pxar
= NULL;
54
};
55
56
}
xta::PostgresqlXaResource::PostgresqlXaResource
PostgresqlXaResource(PGconn *connection, std::string const &name, std::string const &open_info)
Definition:
PostgresqlXaResource.cpp:41
xta::Exception
Definition:
Exception.hpp:47
xta::PostgresqlXaResource::~PostgresqlXaResource
~PostgresqlXaResource()
Definition:
PostgresqlXaResource.cpp:50
Exception.hpp
PostgresqlXaResource.hpp
xta::PostgresqlXaResource::pxar
xta_postgresql_xa_resource_t * pxar
Definition:
PostgresqlXaResource.hpp:62
Copyright © 2009-2019, Christian Ferrari
tiian@users.sourceforge.net
http://www.tiian.org/