Freigeben über


What Are Pooled Pipelines?

Commerce Server Core Systems supplies two pooled pipeline objects, one for non-transacted pipelines (PooledPipeline) and one for transacted pipelines (PooledTxPipeline). Their use is identical to that of the non-pooled pipeline objects MtsPipeline and MtsTxPipeline. The difference between the two sets of pipelines is that the pooled pipeline objects are registered under COM+ to take advantage of object pooling.

Each of the pooled pipeline objects maintains a table of pipelines. When a pipeline is loaded, a pooled pipeline object first looks in its table of pipelines to see if the pipeline is already loaded. If the pipeline is not loaded already, the pooled pipeline object loads the pipeline and adds an entry to its protected table of pipelines. When the Execute method is called, the pipeline is retrieved from the table and run.

The individual components of a pooled pipeline (if they are poolable) are created once, and then held by the pipeline in the object pool. To be poolable, pipeline components must be free-threaded and cannot maintain state information between executions. Pipeline components written in Microsoft Visual Basic are apartment-threaded; they cannot be pooled. Non-poolable components can still be run within pooled pipelines. However, these components are created each time there is an Execute method call. When you create custom poolable pipeline components, you must add the Component Object Model (COM) category, CATID_MSCSPIPELINE_POOLABLE, to the component to make it poolable.

Note

In previous releases of Commerce Server, .NET pipeline components could not be marked as poolable and then used successfully. This is no longer true.

Although pooled pipelines are recommended in all new sites, older pipeline objects should be used during debugging. Because pipelines are effectively cached, changes to pipeline configurations may not take effect until either Microsoft Transaction Server (MTS) or Internet Information Services (IIS) is restarted. The objects MtsPipeline and MtsTxPipeline can be used for debugging a new pipeline and the objects PooledPipeline or PooledTxPipeline can be used in the production site.

See Also

Other Resources

Developing with Core Systems Pipelines