The components that are included in Commerce Server 3.0 are free-threaded components. Visual Basic supports the creation of apartment-threaded components, but does not support the creation of free-threaded components.
Consequently, if you use Visual Basic to create components for either of the Commerce Server pipeline architectures, you should keep the following in mind:
If you include the component in a pipeline you load using the OrderPipeline object, and if you make this object globally available, your component will work as expected. This is because the OrderPipeline object checks the threading model of each component at load-time to determine how to marshal that component's data.
For performance reasons, however, this checking is not performed by the MtsOrderPipeline or MtsTxOrderPipeline objects, objects that are generally created on a per-page basis. For MtsOrderPipeline or MtsTxOrderPipeline objects that you create on a page, this has no bearing on the proper functioning of Visual Basic pipeline components.
However, including such components in an MtsOrderPipeline or MtsTxOrderPipeline object that you make globally available (via the Application object, for example) is unsupported behavior. If you must include a Visual Basic component in a globally available pipeline object instance, you must use the OrderPipeline object to load and execute that pipeline.