RWDBConnection Objects
When using the DB XA Module, RWDBConnection objects are created in the same manner as those in the non-XA environment. Given an RWDBDatabase object:
 
RWDBDatabase dbase=RWDBManager::database("accessLib", "", "", "",
"", "lrm_name");
RWDBConnection conn=dbase.connection();
The same rules that apply to default connections in a non-XA environment apply in the XA environment. (See the “Databases and Connections” section of the DB Interface Module User’s Guide.)
The DB XA Module does not pose any restrictions on the number of connections opened on a single lrm_name. The restriction is placed by the CS_MAX_CONNECT property in the [all] section of the XA configuration file.
Because the retrieval of CS_CONNECTION objects is dependent on the current thread information, connection pooling is turned off when using the DB XA Module with the Sybase Access Module.
Using method RWDBDatabase:: defaultConnections(size_t size) to set default connections in a connection pool will result in a notSupported error.
NOTE: Because the TPM actually opens and closes connections, we recommend that you always use explicit connections.