Microsoft Transaction Server
Encyclopedia
Microsoft Transaction Server (MTS) was software that provided services to Component Object Model
Component Object Model
Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

 (COM) software components
Component-based software engineering
Component-based software engineering is a branch of software engineering that emphasizes the separation of concerns in respect of the wide-ranging functionality available throughout a given software system...

, to make it easier to create large distributed applications. The major services provided by MTS were automated transaction
Database transaction
A transaction comprises a unit of work performed within a database management system against a database, and treated in a coherent and reliable way independent of other transactions...

 management, instance management (or just-in-time activation) and role-based security. MTS is considered to be the first major software to implement aspect-oriented programming
Aspect-oriented programming
In computing, aspect-oriented programming is a programming paradigm which aims to increase modularity by allowing the separation of cross-cutting concerns...

.

MTS was first offered in the Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

 4.0 Option Pack. In Windows 2000
Windows 2000
Windows 2000 is a line of operating systems produced by Microsoft for use on personal computers, business desktops, laptops, and servers. Windows 2000 was released to manufacturing on 15 December 1999 and launched to retail on 17 February 2000. It is the successor to Windows NT 4.0, and is the...

, MTS was enhanced and better integrated with the operating system and COM
COM
COM is the original, yet still common, name of the serial port interface on IBM PC-compatible computers. It might not only refer to physical ports, but also to virtual ports, such as ports created by bluetooth or USB-to-Serial adapters....

, and was renamed COM+. COM+ added object pool
Object pool
In computer programming, an object pool is a software design pattern. An object pool is a set of initialised objects that are kept ready to use, rather than allocated and destroyed on demand. A client of the pool will request an object from the pool and perform operations on the returned object...

ing, loosely-coupled events
Loose coupling
In computing and systems design a loosely coupled system is one where each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. The notion was introduced into organizational studies by Karl Weick...

 and user-defined simple transactions (compensating resource managers) to the features of MTS.

COM+ is still provided with Windows Server 2003
Windows Server 2003
Windows Server 2003 is a server operating system produced by Microsoft, introduced on 24 April 2003. An updated version, Windows Server 2003 R2, was released to manufacturing on 6 December 2005...

 and Windows Server 2008, and the Microsoft .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

 provides a wrapper for COM+ in the EnterpriseServices namespace. The Windows Communication Foundation
Windows Communication Foundation
The Windows Communication Foundation , previously known as "Indigo", is an application programming interface in the .NET Framework for building connected, service-oriented applications.-The architectures:...

 (WCF) provides a way of calling COM+ applications with web services. However, COM+ is based on COM, and Microsoft's strategic software architecture is now web services and .NET, not COM. There are pure .NET-based alternatives for many of the features provided by COM+, and in the long term it is likely COM+ will be phased out.

Architecture

A basic MTS architecture comprises:
  • the MTS Executive (mtxex.dll)
  • the Factory
    Factory object
    In object-oriented computer programming, a factory is an object for creating other objects. It is an abstraction of a constructor, and can be used to implement various allocation schemes. For example, using this definition, singletons implemented by the singleton pattern are formal factories.A...

     Wrappers and Context Wrappers for each component
  • the MTS Server Component
  • MTS clients
  • auxiliary systems like:
    • COM
      Component Object Model
      Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

       runtime
      Run-time system
      A run-time system is a software component designed to support the execution of computer programs written in some computer language...

       services
    • the Service Control Manager
      Service Control Manager
      Service Control Manager is a special system process under Windows NT family of operating systems, which starts, stops and interacts with Windows service processes. It is located in %SystemRoot%\services.exe executable...

       (SCM)
    • the Microsoft Distributed Transaction Coordinator
      Distributed Transaction Coordinator
      The Distributed Transaction Coordinator service is a component of modern versions of Microsoft Windows that is responsible for coordinating transactions that span multiple resource managers, such as databases, message queues, and file systems...

       (MS-DTC)
    • the Microsoft Message Queue
      Microsoft Message Queuing
      Microsoft Message Queuing or MSMQ is a Message Queue implementation developed by Microsoft and deployed in its Windows Server operating systems since Windows NT 4 and Windows 95. The latest Windows 7 also includes this component...

       (MSMQ)
    • the COM-Transaction Integrator (COM-TI)
    • etc.


COM components that run under the control of the MTS Executive are called MTS components. In COM+, they are referred to as COM+ Applications. MTS components are in-process DLL
Dynamic-link library
Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...

s. MTS components are deployed and run in the MTS Executive which manages them. As with other COM components, an object
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

 implementing the IClassFactory interface
Interface (computer science)
In the field of computer science, an interface is a tool and concept that refers to a point of interaction between components, and is applicable at the level of both hardware and software...

 serves as a Factory Object to create new instances of these components.

MTS inserts a Factory Wrapper Object and an Object Wrapper between the actual MTS object and its client. This interposing of wrappers is called interception. Whenever the client makes a call to the MTS component, the wrappers (Factory and Object) intercept the call and inject their own instance-management algorithm called the Just-In-Time Activation (JITA) into the call. The wrapper then makes this call on the actual MTS component. Interception was considered difficult at the time due to a lack of extensible metadata.

In addition, based on the information from the component's deployment properties, transaction logic and security checks also take place in these wrapper objects.

For every MTS-hosted object, there also exists a Context Object, which implements the IObjectContext interface. The Context Object maintains specific information about that object, such as its transactional information, security information and deployment information. Methods
Method (computer science)
In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

 in the MTS component call into the Context Object through its IObjectContext interface.

MTS does not create the actual middle-tier MTS object until the call from a client reaches the container. Since the object is not running all the time, it does not use up a lot of system resources (even though an object wrapper and skeleton for the object do persist).

As soon as the call comes in from the client, the MTS wrapper process activates its Instance Management algorithm called JITA. The actual MTS object is created "just in time" to service the request from the wrapper. And when the request is serviced and the reply is sent back to the client, the component either calls SetComplete/SetAbort, or its transaction ends, or the client calls Release on the reference to the object, and the actual MTS object is destroyed. In short, MTS uses a stateless component model.

Generally, when a client requests services from a typical MTS component, the following sequence occurs on the server :
  1. acquire a database connection
    Database connection
    A database connection is a facility in computer science that allows client software to communicate with database server software, whether on the same machine or not. A connection is required to send commands and receive answers....

  2. read the component's state from either the Shared Property Manager or from an already existing object or from the client
  3. perform the business logic
    Business logic
    Business logic, or domain logic, is a non-technical term generally used to describe the functional algorithms that handle information exchange between a database and a user interface.- Scope of business logic :Business logic:...

  4. write the component's changed state, if any, back to the database
  5. close and release the database connection
  6. vote on the result of the transaction. MTS components do not directly commit transactions, rather they communicate their success or failure to MTS.


It is thus possible to implement high-latency resources as asynchronous resource pools, which should take advantage of the stateless JIT
Just-in-time compilation
In computing, just-in-time compilation , also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static compilation...

 activation afforded by the middleware
Middleware
Middleware is computer software that connects software components or people and their applications. The software consists of a set of services that allows multiple processes running on one or more machines to interact...

server.

External links and references

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK