Quick Tour of MS Transaction Server

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Microsoft® Transaction Server (MTS) is a component-based transaction processing system for developing, deploying, and managing high-performance, scalable, and robust enterprise, Internet, and intranet server applications.

The following sections introduce the features of Microsoft Transaction Server:

  • What is Microsoft Transaction Server?

  • Microsoft Transaction Server Run-Time Environment

  • Microsoft Transaction Server Explorer

  • Microsoft Transaction Server APIs

  • Microsoft Transaction Server Sample Applications

On This Page

What Is Microsoft Transaction Server?
Microsoft Transaction Server Run-Time Environment
Microsoft Transaction Server Explorer
Microsoft Transaction Server APIs
Microsoft Transaction Server Sample Applications

What Is Microsoft Transaction Server?

MTS is a component-based transaction processing system for building, deploying, and administering robust Internet and intranet server applications. In addition, MTS allows you to deploy and administer your MTS server applications with a rich graphical tool (MTS Explorer).

MTS provides the following features:

  • The MTS run-time environment.

  • The MTS Explorer, a graphical user interface for deploying and managing application components.

  • Application programming interfaces and resource dispensers for making applications scalable and robust. Resource dispensers are services that manage non-durable shared state on behalf of the application components within a process.

  • Three sample applications that demonstrate how to use the application programming interface (API) to build MTS components, and use scriptable administration objects to automate deployment procedures in the MTS Explorer.

The MTS programming model provides a framework for developing components that encapsulate business logic. The MTS run-time environment is a middle-tier platform for running these components. You can use the MTS Explorer to register and manage components executing in the MTS run-time environment.

The three-tiered programming model provides an opportunity for developers and administrators to move beyond the constraints of two-tier client/server applications. You have more flexibility for deploying and managing three-tiered applications because:

  • The three-tier model emphasizes a logical architecture for applications, rather than a physical one. Any service may invoke any other service and may reside anywhere.

  • These applications are distributed, which means you can run the right components in the right places, benefiting users and optimizing use of network and computer resources.

Microsoft Transaction Server Run-Time Environment

The MTS run-time infrastructure makes application development, deployment, and management easy by providing the application developer and system administrator a comprehensive but easy-to-use set of system services that include:

  • Distributed transactions. A transaction is a unit of work that is done as an atomic operation ¾ that is, the operation succeeds or fails as a whole.

  • Automatic management of processes and threads.

  • Object instance management.

  • A distributed security service to control object creation and use.

  • A graphical interface for system administration and component management.

Application developers who rely upon these system services to make their applications scalable and robust can focus on solving their business problems rather than on developing a system infrastructure.

MTS works with any application development tool capable of producing ActiveX™ dynamic-link libraries (DLLs). For example, developers can use Microsoft Visual Basic®, Microsoft Visual C++®, Microsoft Visual J++®, or any other ActiveX tool to develop MTS applications.

MTS is designed to work with a wide variety of resource managers, including relational database systems, file systems, and document storage systems. This allows developers and independent software vendors to select from a wide range of resource managers and to easily use two or more resource managers within a single application while enjoying the benefits of local or distributed transactions.

Microsoft Transaction Server Explorer

The MTS Explorer is a graphical user interface for managing and deploying MTS components. System and web administrators as well as developers can use the MTS Explorer to administer, distribute, install, deploy, and test packages. Developers use the MTS Explorer to assemble components into pre-built packages, distribute and test components in the MTS environment. Administrators or developers also use the Explorer to install, deploy, and maintain components and packages. In addition, the Explorer allows you to monitor and manage transactions for your transactional components.

The Explorer hierarchy depicts how the following items in the run-time environment are organized:

  • Computers

  • Packages

  • Components

  • Roles

  • Interfaces

  • Methods

MTS packages are installed on computers, contain components, and define roles. Components in a package define interfaces and methods. You can use special purpose windows to view transaction and trace message information.

The following diagram shows how the hierarchy is displayed in the left pane of the Explorer:

Cc751038.snapin(en-us,TechNet.10).gif

You can use the properties window to view the properties of components in a package(see the following diagram) or to view packages installed on a computer.

Cc751038.vigs04(en-us,TechNet.10).gif

You can also use the Transaction Statistics window to view summary descriptive statistics for recent transactions.

Cc751038.vigs05(en-us,TechNet.10).gif

The MTS Explorer window has a left pane that displays a hierarchy and a right pane that displays the contents of the item you click in the left pane. The hierarchy is a tree structure that contains folders and all the items you can configure with the MTS Explorer.

You can navigate through the MTS Explorer hierarchy by double-clicking a folder or item in the right pane to expose its contents. You can also view those contents by clicking the folder or item in the left pane, which displays the contents in the right pane. To expand any item in the hierarchy, click the plus (+) sign beside it, and the MTS Explorer displays the hierarchy of that item in the left pane. Double-clicking a folder or item in the left pane will also display its contents in the right pane so that you can switch between the expanded and collapsed views of the hierarchy.

Use arrows keys in either pane to select an item. Pressing the ENTER key will display the contents of an item. You can move between the Explorer's two panes by pressing the TAB key.

Note that on Windows® 95, the tree in the left pane in the MTS Explorer does not appear. To navigate, double-click icons to move down the hierarchy and then click the Up one level toolbar button to move up the hierarchy. For more information about using the MTS Explorer on Windows 95, see the Roadmap to the MTS Administrator's Guide.

Setting or Viewing an Item's Properties

Basic information about an item that has been added to the MTS Explorer hierarchy is displayed in the item's property sheet. What information appears on a property sheet varies from item to item. For example, the property sheet for a computer item contains the computer's name, location of the log file, and update settings, whereas the property sheet for a package item contains information regarding security and other process-specific settings.

You can view property sheets by selecting an item and choosing the Properties command from the Action menu, or right-clicking the item and selecting Properties. Each property sheet is divided into individual pages, which you can access by clicking the appropriate tab.

Monitoring and Resolving Transactions

Extensive support for transaction processing is a major feature of the MTS run-time environment. Microsoft Distributed Transaction Coordinator (MS DTC) provides the support for transaction processing in MTS. MS DTC is a Windows NT® service that MTS uses to ensure that all parties in a transaction are in agreement before it is finalized.

Transaction support is provided in the MTS Explorer hierarchy through three windows:

 

trlist

You use the Transaction List window to monitor the state of an active transaction.

 

trstatus

You use the Transaction Statistics window to view summary statistics for recent transactions.

 

trtrace

You use the Trace Messages window to view trace messages relating to transaction processing.

Microsoft Transaction Server APIs

You can use MTS application programming interfaces (APIs) to develop scalable and robust applications that take advantage of the features of the MTS run-time environment, and to automate administration of packages and components.

Developing Client Applications

Client applications that run outside the MTS run-time environment instantiate MTS objects by using the standard COM library functions (CoCreateInstance in C++; the Visual Basic CreateObject method performs the same function).

Developing Components

If you are developing MTS components (server components that will be registered in the MTS run-time environment), you can use the MTS IObjectContext, ISharedPropertyGroupManager, ISharedPropertyGroup, and ISharedProperty interfaces to:

  • Declare that an object's work is complete

  • Prevent a transaction from being committed

  • Create other MTS objects

  • Include other objects' work within the scope of the current object's transaction

  • Determine if a caller is in a particular role

  • Determine if security is enabled

Automating MTS Administration

You can automate administration of packages and components using the MTS administrative objects. Using Visual Basic, Visual Basic Scripting Edition (VBScript), or any other Automation-compatible language, you can automate procedures in the MTS Explorer ranging from installing a prebuilt package to enumerating through related collections.

Microsoft Transaction Server Sample Applications

In addition to the documentation, MTS includes useful sample applications that are valuable learning tools. You can copy any part of them into your own applications and modify them as necessary.

Throughout the MTS Programmer's Guide, sample code and applications illustrate MTS programming techniques. Many of the files for these applications are included with your installation. You can find the source files for the applications in the \Samples folder of your MTS installation.

MTS provides the following sample applications.

Sample

Description

 

 

Sample Bank

Sample Bank is a simple transactional database application that demonstrates how to use the MTS application programming interfaces

Tic-Tac-Toe

Tic-Tac-Toe is a simple multiuser game that shows nontransactional components managing shared state.

Administrative Sample Scripts

The administrative object scripts demonstrate how to automate MTS Explorer procedures using VBScript.