Microsoft Transaction Server: Difference between revisions
m Use "object" rather than "component", which is ambiguous |
MusikBot II (talk | contribs) m Removing protection templates from unprotected page (more info) |
||
(39 intermediate revisions by 33 users not shown) | |||
Line 1: | Line 1: | ||
'''Microsoft Transaction Server''' ( |
'''Microsoft Transaction Server''' ('''MTS''') was [[software]] that provided services to [[Component Object Model]] (COM) [[Component-based software engineering|software components]], to make it easier to create large distributed applications. The major services provided by MTS were automated [[Database transaction|transaction]] 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]].<ref name="BoxSells2002">{{cite book|author1=Don Box|author2=Chris Sells|title=Essential.NET: The common language runtime|url=https://archive.org/details/essentialnetcomm01boxd|url-access=registration|access-date=4 October 2011|date=4 November 2002|publisher=Addison-Wesley Professional|isbn=978-0-201-73411-9|page=[https://archive.org/details/essentialnetcomm01boxd/page/206 206]}}</ref> |
||
MTS was first offered in the [[Windows NT]] 4.0 Option Pack. In [[Windows 2000]], MTS was enhanced and better integrated with the operating system and [[COM]], and was renamed [[COM+]]. COM+ added [[object pool |
MTS was first offered in the [[Windows NT]] 4.0 Option Pack. In [[Windows 2000]], MTS was enhanced and better integrated with the operating system and [[Component Object Model|COM]], and was renamed [[COM+]]. COM+ added [[object pool]]ing, [[Loose coupling|loosely-coupled events]] and user-defined simple transactions (compensating resource managers) to the features of MTS. |
||
COM+ is still provided with [[Windows Server 2003]] and [[Windows Server 2008]], and the Microsoft [[.NET Framework]] provides a wrapper for COM+ in the EnterpriseServices namespace. The [[Windows Communication Foundation]] (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. |
COM+ is still provided with [[Windows Server 2003]] and [[Windows Server 2008]], and the Microsoft [[.NET Framework]] provides a wrapper for COM+ in the EnterpriseServices namespace. The [[Windows Communication Foundation]] (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. |
||
Line 7: | Line 7: | ||
== Architecture == |
== Architecture == |
||
A basic MTS architecture |
A basic MTS architecture comprises: |
||
* |
* the MTS Executive (mtxex.dll) |
||
* |
* the [[Factory object|Factory]] Wrappers and Context Wrappers for each component |
||
* |
* the MTS Server Component |
||
*MTS clients |
* MTS clients |
||
* |
* auxiliary systems like: |
||
**[[Component Object Model|COM]] [[runtime]] services |
**[[Component Object Model|COM]] [[Run-time system|runtime]] services |
||
**the [[Service Control Manager]] (SCM) |
**the [[Service Control Manager]] (SCM) |
||
**the Microsoft [[Distributed Transaction Coordinator]] (MS-DTC) |
**the Microsoft [[Distributed Transaction Coordinator]] (MS-DTC) |
||
**the [[Microsoft Message Queuing|Microsoft Message Queue]] ([[MSMQ]]) |
**the [[Microsoft Message Queuing|Microsoft Message Queue]] ([[MSMQ]]) |
||
**the COM-Transaction Integrator (COM-TI) |
**the COM-Transaction Integrator (COM-TI) |
||
**etc. |
**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 [[Dynamic-link library|DLL]]s. MTS components are deployed and run in the MTS Executive which manages them. As |
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 [[Dynamic-link library|DLL]]s. MTS components are deployed and run in the MTS Executive which manages them. As with other COM components, an [[Object (computer science)|object]] implementing the IClassFactory [[Interface (computer science)|interface]] 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 |
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.<ref name="BoxSells2002"/> |
||
In addition |
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. [[Method (computer science)|Methods]] in the MTS component call into the Context Object through its IObjectContext interface. |
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. [[Method (computer science)|Methods]] 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 " |
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, |
Generally, when a client requests services from a typical MTS component, the following sequence occurs on the server : |
||
# |
# acquire a [[database connection]] |
||
# |
# read the component's state from either the Shared Property Manager or from an already existing object or from the client |
||
# |
# perform the [[business logic]] |
||
# |
# write the component's changed state, if any, back to the database |
||
# |
# close and release the database connection |
||
#'' |
# ''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 |
It is thus possible to implement high-latency resources as asynchronous resource pools, which should take advantage of the stateless [[just-in-time compilation|JIT]] activation afforded by the [[middleware]] server. |
||
==References== |
|||
{{reflist}} |
|||
== External links and references == |
== External links and references == |
||
* [http://my.execpc.com/~gopalan/mts/mts.html More details about MTS] |
|||
* [http://www.microsoft.com/technet/archive/transsrv/quicktr.mspx Quick Tour of Microsoft Transaction Server] |
* [http://www.microsoft.com/technet/archive/transsrv/quicktr.mspx Quick Tour of Microsoft Transaction Server] |
||
* [http://support.microsoft.com/kb/q262187/ Interpreting the MTS events in the event log] |
|||
⚫ | |||
[[Category:Windows components]] |
[[Category:Windows components]] |
||
Line 53: | Line 56: | ||
[[Category:Inter-process communication]] |
[[Category:Inter-process communication]] |
||
[[Category:Microsoft application programming interfaces]] |
[[Category:Microsoft application programming interfaces]] |
||
[[Category: |
[[Category:Component-based software engineering]] |
||
[[Category:Transaction processing]] |
[[Category:Transaction processing]] |
||
⚫ | |||
[[ja:Microsoft Transaction Server]] |
|||
[[ru:Microsoft Transaction Server]] |
|||
[[sv:Microsoft Transaction Server]] |
Latest revision as of 20:50, 8 July 2023
Microsoft Transaction Server (MTS) was software that provided services to Component Object Model (COM) software components, to make it easier to create large distributed applications. The major services provided by MTS were automated transaction 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.[1]
MTS was first offered in the Windows NT 4.0 Option Pack. In Windows 2000, MTS was enhanced and better integrated with the operating system and COM, and was renamed COM+. COM+ added object pooling, loosely-coupled events and user-defined simple transactions (compensating resource managers) to the features of MTS.
COM+ is still provided with Windows Server 2003 and Windows Server 2008, and the Microsoft .NET Framework provides a wrapper for COM+ in the EnterpriseServices namespace. The Windows Communication Foundation (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
[edit]A basic MTS architecture comprises:
- the MTS Executive (mtxex.dll)
- the Factory Wrappers and Context Wrappers for each component
- the MTS Server Component
- MTS clients
- auxiliary systems like:
- COM runtime services
- the Service Control Manager (SCM)
- the Microsoft Distributed Transaction Coordinator (MS-DTC)
- the Microsoft Message Queue (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 DLLs. MTS components are deployed and run in the MTS Executive which manages them. As with other COM components, an object implementing the IClassFactory interface 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.[1]
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 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 :
- acquire a database connection
- read the component's state from either the Shared Property Manager or from an already existing object or from the client
- perform the business logic
- write the component's changed state, if any, back to the database
- close and release the database connection
- 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 activation afforded by the middleware server.
References
[edit]- ^ a b Don Box; Chris Sells (4 November 2002). Essential.NET: The common language runtime. Addison-Wesley Professional. p. 206. ISBN 978-0-201-73411-9. Retrieved 4 October 2011.