Previous in Contents Next in Contents

The MtsTxPipeline Object

The Microsoft® Commerce Server Commerce Interchange Pipeline (CIP) supports MTS transactions through the MtsTxPipeline object. This object is registered as an MTS component during the Commerce Server installation, and is marked as requiring a transaction. If you create an MtsTxPipeline object on a page that is not marked as requiring a transaction, a transaction context is created for the MtsTxPipeline object, and the components that execute within that pipeline do so as part of a single, atomic operation. If you create an MtsTxPipeline object on a page marked as requiring a transaction, the MtsTxPipeline executes as part of the page-level transaction context.

In either case, the MtsTxPipeline object's transaction support provides a host of benefits to the site builder. First, and most importantly, transaction support means that if any component in an MtsTxPipeline fails, the work of the preceding components in the pipeline is rolled back, and the MtsTxPipeline object aborts the transaction.

The MtsTxPipeline object's transaction support proves particularly beneficial in relation to CIP components such as Audit, which modify the site database. If you use these components, or any other ADO-related order processing pipeline (OPP) component that modifies the database, and the component fails, the modifications that the component makes to the database are automatically rolled back.

Moreover, this behavior holds true, whether or not the page on which you execute the MtsTxPipeline is marked as requiring a transaction. If the page is marked as requiring a transaction, then the object instance that you create participates in that transaction. If the page is not marked as requiring a transaction, one is created for the MtsTxPipeline, and the MtsTxPipeline aborts the transaction in the event of a component failure.


© 1997-2000 Microsoft Corporation. All rights reserved.