Back to home page

Enduro/X

 
 

    


0001 TPGETCONN(3)
0002 ============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpgetconn - Get XA Driver database/resource connection
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 void* tpgetconn(void);
0016 
0017 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0018 
0019 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0020 
0021 DESCRIPTION
0022 -----------
0023 Function is used to return XA driver specific connection data. By default this
0024 function without specific XA driver use will return NULL with error set to *TPENOENT*,
0025 as callback for Enduro/X ATMI library is not known.
0026 
0027 If callback is installed, the function would return pointer to driver specific
0028 connection handler object. The pointer shall be interpreted according to driver
0029 specification. For example Enduro/X PostgreSQL drivers would return (PGconn *)
0030 pointer.
0031 
0032 In case if driver specific callback is installed and driver specific data is *NULL*,
0033 no *tperrno* is set.
0034 
0035 RETURN VALUE
0036 ------------
0037 On success, *tpgetconn()* executes the XA Driver specific callback for getting
0038 connection object. The result could be pointer or NULL, *tperrno* is set to 0.
0039 In case if callback is not installed, the *tperrno* is set to indicate this.
0040 
0041 ERRORS
0042 ------
0043 Note that *tpstrerror()* returns generic error message plus custom message 
0044 with debug info from last function call.
0045 
0046 *TPENOENT* Callback is not installed by XA driver.
0047 
0048 *TPESYSTEM* System failure occurred during serving.
0049 See logs i.e. user log, or debugs for more info.
0050 
0051 *TPEOS* System failure occurred during serving.
0052 See logs i.e. user log, or debugs for more info.
0053 
0054 *TPENOENT* Callback from XA driver is not installed.
0055 
0056 EXAMPLE
0057 -------
0058 See *atmitest/test067_postgres/atmiclt67.c* for sample code.
0059 
0060 BUGS
0061 ----
0062 Report bugs to support@mavimax.com
0063 
0064 SEE ALSO
0065 --------
0066 *tpinit(3)* *libndrxxapq(8)* *libndrxxaecpg(8)*
0067 
0068 COPYING
0069 -------
0070 (C) Mavimax, Ltd
0071