actually, every new instance gets assigned a context object that preserves some state--the transaction status and security ID--between activations). This way, many client processes can use the same instance, thus avoiding the proliferation of objects that often plagues object-oriented designs.
On the other hand, should a method need to access the database many times, it can keep re-using the same instance and avoiding the overhead of setting up a new object and connection. This scheme encourages
a programming style that's a clever compromise between classical object-orientation and on-line transaction processing (OLTP) techniques.
There are some downsides. In its first release, MTS's multithreading support is restricted to "apartment" threading, where only instances of the same class can run on different threads. Later versions will support "worker" threading, where any instance can run on any thread. And by using ODBC and Distributed Transaction Coordinator (DTC), which ships with Microsoft SQL Server, MTS applications can participate in Extended Architecture (XA) transactions, but X/Open TP monitors can't call components running under MTS. And MTS doesn't support nested transactions (i.e. atomic subtransactions within transactions), though the MTS architects claim these are an unattainable academic mirage and that MTS's fine granularity renders them unnecessary.
In May, Microsoft announced that MTS was to be integrated into Windows NT 4.0, making its transactional abilities available to
all applications and file systems.
illustration_link (25 Kbytes)
