This illustration provides a high-level overview of methods for using the OCI functions OraMTSSvcGet(), OraMTSSvcRel(), and OraMTSSvcJoinTxn().

Method 1: COM Components running in an MTS-coordinated transaction:

The following OCI functions use OCI connection pooling to implicitly enlist the database in a transaction:

OCIInitialize(OCI_THREADED, ...) 
OraMTSSvcGet(..., &OCISvc, ..., ORAMTS_CFLG_ALLDEFAULT) 
. 
. 
. 
OraMTSSvcRel(OCISvc) 

Method 2: COM Components not running in an MTS-coordinated transaction, but using MS DTC. There are two possibilities (here is the first):

The following OCI functions use OCI connection pooling to explicitly enlist the database in a transaction:

OCIInitialize(OCI_THREADED, ...) 
DTCGetTransactionManager(...) 
BeginTransaction(..., &transaction) 
OraMTSSvcGet(..., &OCISvc, ..., ORAMTS_CFLG_NOIMPLICIT) 
OraMTSSvcEnlist(OCISvc, ..., transaction, ...) 
. 
. 
. 
OraMTSSvcEnlist(OCISvc, ..., NULL, ...) 
OraMTSSvcRel(OCISvc) 

Method 3: COM Components not running in an MTS-coordinated transaction, but using MS DTC. There are two possibilities (here is the second):

The following OCI functions use a regular (nonpooling) OCI connection to explicitly enlist the database in a transaction:

CIInitialize(OCI_THREADED, ...) 
OCI toget connected 
OraMTSEnlCtxGET 
DTCGetTransactionManager(...) 
BeginTransaction(..., &transaction) 
OraMTSJoinTxn (OCISvc, ..., transaction, ...) 
. 
. 
. 
OraMTSJoinTxn 
. 
. 
. 
OraMTSEnlCtxRel() 
OCI to logoff 

Method 4: COM components running in an MTS-coordinated transaction not marked as transactional, and using connection pooling:

The following OCI functions use OCI connection pooling and do not enlist the database in a transaction:

OCIInitialize(OCI_THREADED) 
OraMTSSvcGet(..., &OCISvc, ..., ORAMTS_CFLG_NOIMPLICIT) 
. 
. 
. 
OraMTSSvcRel(OCISvc)

End of description.