<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Jim Johnson's Blog</title><link>http://pluralsight.com/blogs/jimjohn/</link><description>Adventures in Atomicity</description><managingEditor>Jim Johnson</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Jim Johnson</dc:creator><title>MSDTC changes in WS2008, Part 4: Miscellaneous features</title><link>http://pluralsight.com/blogs/jimjohn/archive/2008/04/06/50667.aspx</link><pubDate>Sun, 06 Apr 2008 17:02:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2008/04/06/50667.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/50667.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2008/04/06/50667.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/50667.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/50667.aspx</trackback:ping><description>&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Parts &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2008/03/15/50484.aspx"&gt;1&lt;/A&gt;, &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2008/03/16/50489.aspx"&gt;2&lt;/A&gt;, and &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2008/03/23/50536.aspx"&gt;3&lt;/A&gt; covered most of the mainline MSDTC features that show up in WS2008.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;And now we come to the end with three more, relatively minor, topics: VSS integration, changes in XA support, and some changes in MSDTC tracing.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;VSS Integration&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;This isn't strictly speaking a WS2008 feature, as it was mostly present in Vista.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, it is a good example of a 'good Windows citizen' change.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Traditionally, transaction managers have had little to do with backup.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;They manage a log that is assumed to hold very short lived data.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In turn, that data only makes sense in conjunction with other data stores (i.e. either other transaction manager or resource manager logs).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;And, there is normally no automated way to handle the multiple data stores being out of sync.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;MSDTC is no different in any of these regards, and all of these reasons are still valid with Vista.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;However, there is a role that a transaction manager can play.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Consider taking a live backup of a volume where you have a number of transaction aware resources.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The ideal backup is no longer a crash consistent point in time view of the data.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is a crash consistent point in time where all the active resource managers will recover their transactions in the same way on restore -- in other words, a transaction consistent point in time.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;VSS, the Kernel Transaction Manager, and MSDTC were changed during Vista to support this mode.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;VSS now asks the transaction managers at the appropriate times to establish a transaction consistent point.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is one where all impacted resources that have received a phase 2 (commit) notification have acknowledged processing it.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once that has been reached, all the resources are directed to take their snapshots, and then the transaction manager is released to continue processing.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Each resource manager, when recovering from a VSS restore, will automatically abort all transactions that were in flight or in doubt.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This means that they will all restore to the same logical point in time, given the volume a transaction consistent restore.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;XA Support&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;In part &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2008/03/23/50536.aspx"&gt;3&lt;/A&gt;, I described how MSDTC now automatically reconnects to the correct MSDTC instance during recovery for any given transaction.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;By default, that feature also works for XA-based resource managers.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;In order for MSDTC to do this, it had to add some data to both the PrepareInfo structure and to the XA XID.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The PrepareInfo structure was already variable length, but the XA XID was packed into a format that had typically been more static in its size.&amp;nbsp; Normally, there is no problem with the new fields.&amp;nbsp; However, the format and size of these structures did change, and that could cause some resource managers difficulty.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Because of this, as of Vista SP1 and Windows Server 2008, MSDTC supports a degraded mode of operation which restricts a&amp;nbsp;resource manager to both the pre-Vista recovery data formats and to working with, and only with, the default cluster resource MSDTC instance.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;In order to select this mode, the resource manager needs to call DtcGetTransactionManagerEx as follows:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: black; FONT-FAMILY: Consolas"&gt;hr = DtcGetTransactionManagerEx (&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: black; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;NULL, NULL, riid, &lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: black; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;OLE_TM_FLAG_NOAGILERECOVERY, // 0x00000002&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: black; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;NULL, &amp;amp;pvRiidObject);&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;As you can see, this requires that the default be selected, and the flag will force this to use the default cluster resource instance.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Changes in tracing&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;MSDTC has long had both the administrative transaction tracing and a growing set of fault analysis trace features.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The latter are increasingly useful in tracking down issues quickly and resolving them.&amp;nbsp; During Vista and Windows Server 2008, the transactions team worked on rationalizing the tracing, extending it to cover more of our own problem resolution scenarios, and incorporating suggestions and feedback from PSS.&amp;nbsp; From what I saw, we ended up with much more extensive tracing than we'd previously had, with a result that we were able to debug problems during development much more quickly than in the past.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;While they are mostly meant for internal consumption, they might be interesting for some intrepid spelunker.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I was going to provide a rundown of the traces, but I ran across &lt;A href="http://support.microsoft.com/default.aspx/kb/926099"&gt;http://support.microsoft.com/default.aspx/kb/926099&lt;/A&gt;, which already does that, and better.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;And that brings my lap around the changes in MSDTC to a close.&amp;nbsp; It has some very significant new features, ones that I believe and hope will prove useful to many customers.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Jim.&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/50667.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>MSDTC changes in WS2008, Part 3: Cluster features</title><link>http://pluralsight.com/blogs/jimjohn/archive/2008/03/23/50536.aspx</link><pubDate>Sun, 23 Mar 2008 10:52:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2008/03/23/50536.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/50536.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2008/03/23/50536.aspx#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/50536.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/50536.aspx</trackback:ping><description>&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;As I mentioned in parts &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2008/03/15/50484.aspx"&gt;1&lt;/A&gt; &amp;amp; &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2008/03/16/50489.aspx"&gt;2&lt;/A&gt;, WS2008 clusters are designed to have more than one functioning MSDTC instance.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once the DtcGetTransactionManager[Ex] had been upgraded to connect to multiple MSDTC instances simultaneously, the issues next focused on configuration and management.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;MSDTC Configuration&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;An MSDTC instance is defined by the information to establish an RPC connection, a log file, and some security and accessibility information.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The connection information consists of a NetBIOS name and four GUIDs, also known as connection IDs, or CIDs.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In a non-clustered system, the NetBIOS name is the one used by the system, and the rest of the information is located in the local registry.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The CIDs and log file information can be found under HKLM\Software\Classes\CID, and the pretty much the rest can be found under HKLM\Software\Microsoft\MSDTC.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;These settings represent three roles: what does the MSDTC service need to configure itself, what does the system provide, and what does the MSDTC proxy need to contact the MSDTC service.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;On a single node system it can be hard to tell these apart.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;But then you look at a pre-WS2008 cluster and you'll see that some of the settings, specifically the CIDs, the security settings, and the log location, have been migrated into the cluster registry hive (the name is calculated, so there isn't a simple path to point out).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Information pertaining to the capabilities of an individual system, such as tracing, XA DLL registration, and version information remain in the various local hives.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The MSDTC proxy understands when it is in a cluster, so that information is not a clearly derived.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;At one level, the WS2008 changes amounted to supporting multiple entries in the cluster registry, each of which is attached to a different cluster resource.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For backwards compatibility, one of the MSDTC cluster instances is designated the default cluster instance, and uses the cluster alias as the NetBIOS name.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Add a command line feature to start an MSDTC service for a specific configuration, and we're done.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Picking 'the right MSDTC'&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;There's a big problem with the solution so far.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If the application or resource manager specifies the MSDTC instance in DtcGetTransactionManager[Ex], then the correct MSDTC instance will be used, and you'll get the benefits of from being able to spread the traffic around, from the instance always being local to your resource, and so forth.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Unfortunately, almost no one specifies the MSDTC instance to use.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is partially due to the assumption that there was just one, hardened by the MSDTC proxy behavior to bind to the first MSDTC instance specified in the process.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Figuring out how to select a 'good' MSDTC instance was the next big hurdle.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;A good MSDTC is one that isn't overly remote from the caller, that has the same availability characteristics, or better, of the caller, and one that doesn't add additional MSDTC instances for no good reason.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Oh, and did I mention that existing programs need to continue to work?&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;This then produced the following rules:&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; DIRECTION: ltr; unicode-bidi: embed" type=circle&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Any caller that does not specify whether it is a local application or a cluster resource uses the default cluster instance.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;If the caller is specified as a local application, the local MSDTC instance, if available, is used.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Otherwise the cluster default instance is used.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;If the caller is specified as aligned with a specific cluster resource:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; DIRECTION: ltr; unicode-bidi: embed" type=disc&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;If there is an MSDTC instance that is part of that cluster resource, it will be used.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;If not, and there is a cluster default MSDTC instance available, it will be used.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;If there are no cluster instances available, then a local MSDTC instance will be used with a notification of a potential loss of availability.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.75in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;A caller can be identified in two ways: programmatically or via configuration.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For the first, the DtcGetTransactionManagerEx call has been extended.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The call has the signature:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;EXTERN_C EXPORTAPI __cdecl DtcGetTransactionManagerEx (&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Consolas"&gt;tchar * pszHost,&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// NetBIOS name of the MSDTC instance, or null&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Consolas"&gt;tchar *pszTmName,&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// must be null&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Consolas"&gt;REFIID riid,&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// IID for the interface to retrieve&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Consolas"&gt;DWORD grfOptions,&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// Configuration options&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Consolas"&gt;void * pvConfigParams,// Configuration parameters&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Consolas"&gt;void **ppvObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// returned object instance&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Consolas"&gt;);&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 1.875in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The structure passed in pvConfigParams is what has been extended to now look like:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;typedef struct _OLE_TM_CONFIG_PARAMS_V2&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;{&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DWORD&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dwVersion;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// Must be set to 2&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DWORD&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dwConcurrencyHint; // Set to 0&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;APPLICATIONTYPE applicationType;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// Specifies alignment to local or not&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;GUID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;clusterResourceId; // If not local, align to this resource&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;} OLE_TM_CONFIG_PARAMS_V2;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;typedef enum APPLICATIONTYPE&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;{&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;LOCAL_APPLICATIONTYPE,&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;CLUSTERRESOURCE_APPLICATIONTYPE&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Consolas"&gt;};&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Note that the call to DtcGetTransactionManagerEx can specify the specific MSDTC instance to use.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The new configuration parameter settings allow for a different approach.&amp;nbsp; Rather than having the caller specify the MSDTC instance to use, by name, these new settings allow a caller to make statements about itself that the MSDTC proxy will use to select a reasonable MSDTC instance.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The assumption is that statements that a caller makes about itself are less likely to change due to a configuration change in the cluster, and leaves more leeway for later optimization algorithms -- such as continuing to use an existing cluster MSDTC instance if it is already in use for that transaction.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;It is also important to realize that in the case of the CLUSTERRESOURCE_APPLICATIONTYPE what the caller is specifying is the preferred cluster resource to align to.&amp;nbsp; In the case of a cluster resource this is most likely to be itself.&amp;nbsp; In the case of, say, a&amp;nbsp;node-local&amp;nbsp;COM+ component, this could well be the cluster resource that the SQL Server that it uses is in.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;BR&gt;The second way that a caller can be identified is via external configuration settings known as TM mappings.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The configuration specifies executables, COM+ application IDs, and cluster resource IDs that are to be mapped to specific MSDTC instances.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;These settings are used when the caller to DtcGetTransactionManagerEx supplies neither the name of an MSDTC instance or a OLE_TM_CONFIG_PARAMS_V2 structure.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The configuration settings can be found under HKLM\Cluster\MSDTC\TMMappings.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The values can be set, viewed, and deleted via options on msdtc.exe, as follows:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; DIRECTION: ltr; unicode-bidi: embed" type=circle&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;To set up a mapping, use &lt;BR&gt;msdtc.exe -tmMappingSet -name &amp;lt;mapping name&amp;gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.75in; FONT-FAMILY: Calibri"&gt;[-exe &amp;lt;full exe name&amp;gt; | -service &amp;lt;service name&amp;gt; | -complusappID &amp;lt;appID&amp;gt;]&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.75in; FONT-FAMILY: Calibri"&gt;[-local|-resourceName &amp;lt;cluster DTC resource name]&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.75in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; DIRECTION: ltr; unicode-bidi: embed" type=circle&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;To view a mapping, use&lt;BR&gt;msdtc.exe -tmMappingView -name &amp;lt;mapping name&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;To view all known mappings, use&lt;BR&gt;msdtc.exe -tmMappingView *&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;To delete a mapping, use&lt;BR&gt;msdtc.exe -tmMappingClear -name &amp;lt;mapping name&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;To delete all known mappings, use&lt;BR&gt;msdtc.exe -tmMappingClear *&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.375in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;For instance, let's say that I have a application "JoesGarageShopApp.exe" that only works against local files and only on a single node.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I'd like that application to only use the local MSDTC instance, whichever that one is.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I'd do that with:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.375in; FONT-FAMILY: Calibri"&gt;msdtc.exe -tmMappingSet -name JoesGarageShopMapping -exe JoesGarageShopApp.exe -local&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;What happens to resource managers?&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;From the point of view of the resource manager, effectively nothing.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;They make the calls to the MSDTC proxy, and receive notifications in the way that they always have.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There are two significant changes, but they are done transparently behind the MSDTC proxy interface.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The first is that a transaction passed into a resource manager from an application may be using a different MSDTC instance than the one that the resource manager wishes to use.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If that is the case, the MSDTC proxy will emulate the operations to pull the transaction to the new MSDTC instance (see &lt;A href="http://blogs.msdn.com/florinlazar/archive/2004/10/02/236965.aspx"&gt;http://blogs.msdn.com/florinlazar/archive/2004/10/02/236965.aspx&lt;/A&gt; for a good description of how this normally works).&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The second change is that pPrepInfo presented at &lt;A href="http://msdn2.microsoft.com/en-us/library/ms679213(VS.85).aspx"&gt;IResourceManager::Reenlist&lt;/A&gt; may specify a different MSDTC instance than the one that is currently being used.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In that case, the MSDTC proxy, as part of handling the&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Reenlist request, will internally issue the correct DtcGetTransactionManagerEx call to connect to that MSDTC instance as well.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Kernel Transaction Support&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;As something of a detail point, there is some underlying plumbing in place to handle failover of transacted NTFS and transacted registry resource managers.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The overall logic is the same as I've talked about above.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The one difference is that the kernel interfaces are not themselves remotable, so there is an agent service (the KtmRm service) that acts as the intermediary between the MSDTC instance and the kernel transaction manager.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/50536.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>MSDTC changes in WS2008, Part 2: Cluster requirements</title><link>http://pluralsight.com/blogs/jimjohn/archive/2008/03/16/50489.aspx</link><pubDate>Sun, 16 Mar 2008 09:24:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2008/03/16/50489.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/50489.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2008/03/16/50489.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/50489.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/50489.aspx</trackback:ping><description>&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;As a preamble, I have to point out that most customers have little to no trouble with MSDTC in a cluster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It has been a great solution for those that need transactional consistency and high availability.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Nothing in this description should suggest otherwise.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;However, one fact of life is that Windows shows the power of large numbers.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We have vastly more users than I've encountered in any previous company.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Because of that, you can see trends and identify opportunities for improvement much more easily than I've seen in the past.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The clustering changes came about as a response to a number of issues that we'd been seeing with MSDTC in a cluster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;They basically fell into three categories:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; DIRECTION: ltr; unicode-bidi: embed" type=circle&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Complexity of setting up a cluster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Setting up a cluster with MSDTC was complex -- it involved a number of steps, those steps had a fragility in how they related to setting up other cluster resources, such as SQL Server, and they required that the system actually degrade in capability as an initial step.&lt;BR&gt;&lt;BR&gt;To put it another way, setting up a cluster first disabled the MSDTC instances you did have, then you had to know to create a cluster MSDTC instance, and then you could add in new transaction-aware cluster resources (e.g. SQL Server).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The fewer steps and the fewer ordering dependencies that we could get to, the better.&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Asymmetric performance patterns.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once the cluster was correctly set up, there was a second surprise.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;As the cluster lived through node failures, and depending on the application design, the performance of e.g. SQL Server or MSMQ could change significantly from one failover point to the next.&lt;BR&gt;&lt;BR&gt;We all know that full distributed transactions have overhead.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In some cases, quite considerable overhead.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That's why so much of the industry's work is and has been around optimizations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In the case of MSDTC, the performance when MSDTC is on the same node as the application and / or resource managers is higher than when it is on its own node.&lt;BR&gt;&lt;BR&gt;Given that there is one MSDTC cluster instance, any reasonably complex configuration will have SQL or MSMQ instances that move from being remote to that MSDTC instance to being on the same system as MSDTC, and then back.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;As that happens the performance profile for their interactions with MSDTC change significantly.&lt;BR&gt;&lt;BR&gt;This means that you should do your performance planning against the case when MSDTC is located on another node from the application and resource managers.&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Migration of nodes into and out of a cluster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Note above that the local MSDTC is disabled upon entry into a cluster, and the MSDTC cluster instance replaces the role of that local MSDTC.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This has a direct implication that when a node joins a cluster it needs to be fully recovered, and the same is true when it permanently leaves.&lt;BR&gt;&lt;BR&gt;Frequently this isn't a problem when joining, if you assume that nodes that are put into a cluster are pretty much idle nodes anyway.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is only in more dynamic load management cases that this one could be a concern.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;At the root of each of these points was a longstanding design decision to have only one active MSDTC instance in a cluster -- and it had to be a cluster resource.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This was the cluster representation of the assumption that topologies were pretty much fixed: that a resource manager would be in a configuration where they were always using the same transaction manager, and likewise for the applications.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;And to be clear, this wasn't a bad assumption for how systems have actually worked.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It reflected how systems were configured, how COM+ was configured, and how the hardware tended to be deployed.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Beginning around .Net 2.0, though, we began to explore ways to remove or reduce this assumption.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This was driven by an assumption that we'll be seeing increased mobility of applications, and a desire to be able to isolate one application, or one resource, from another.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;First, we had to deal with the assumption as present in the MSDTC proxy.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It would bind to the MSDTC instance specified by the first call in that process.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Until the last few years, you've not been able to find out which one that was.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Now you can for any version that supports the &lt;A href="http://msdn2.microsoft.com/en-us/library/ms687122(VS.85).aspx"&gt;ITmNodeName&lt;/A&gt; interface.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Next, in Vista we changed the proxy further to bind to multiple MSDTC instances, once per unique MSDTC name specified.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;With this in place, you could change MSDTC instances on a per transaction basis, both in normal operation and during recovery.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;This was a sufficient basis to then begin working through the various design issues to handle multiple MSDTC instances in a cluster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Interestingly, most came from configuration choices or management operations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;On the other hand, the protocol had sufficiently abstracted the idea of an MSDTC instance that I can't remember any protocol changes that were needed specifically for this, although I'll admit that I've not checked recently.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The design issues that I remember being at the top were:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; DIRECTION: ltr; unicode-bidi: embed" type=circle&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;What is a 'good' MSDTC instance to pick?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If I take an application or resource running today, it won't specify which MSDTC instance to use.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I don't want to just use a cluster-wide default, or I'll get largely what I get today -- one cluster instance handling everything.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So, how should a particular instance be picked?&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;What does the cluster default MSDTC instance mean?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Is it anything more than an instance that happens to have the same name as the cluster alias, or is it deeper than that?&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;What configuration needs to be consistent across all MSDTC instances, and what should be specific to a given instance?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Also, much more mundanely, where should all this configuration data go?&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;What are the management changes to support these configurations?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;What are the command line changes, and what are the MMC plugin changes?&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I'll pick up with how we approached these questions in part 3.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Jim.&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/50489.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>MSDTC changes in WS2008, Part 1: Introduction</title><link>http://pluralsight.com/blogs/jimjohn/archive/2008/03/15/50484.aspx</link><pubDate>Sat, 15 Mar 2008 13:44:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2008/03/15/50484.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/50484.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2008/03/15/50484.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/50484.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/50484.aspx</trackback:ping><description>&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Windows Server 2008 has a number of significant changes to MSDTC, addressing issues from performance, simplicity, and reach.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;These changes are the culmination of a stream of work that began with Vista, and was heavily influenced by .Net from 2.0 onwards.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The changes in WS2008 had the following goals:&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; DIRECTION: ltr; unicode-bidi: embed" type=circle&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Support the use of transacted NTFS and transacted Registry operations.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Increase flexibility of deployment, predictability of performance in a Windows cluster.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Improve the diagnostics available for troubleshooting.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Be a 'good Windows citizen'.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.375in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Much of the visible changes to support transacted NTFS and registry operations showed up in Vista.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The changes in WS2008 are largely to support those features in a cluster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I'll talk about them in passing as part of the overall cluster changes.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The biggest set of changes, by far, had to do with the cluster support.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is what I'm going to focus on in parts 2 &amp;amp; 3.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Through WS2003, MSDTC could only have a single instance on a cluster.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This paralleled the single-instance-per-node assumption that holds for non-clustered systems.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, it meant that entering a cluster meant that the local MSDTC was disabled, thus preventing it from completing any outstanding recovery.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It also meant that you could be very asymmetric performance patterns depending on where failovers had taken the recovery resource, such as a SQL server instance, and the MSDTC instance.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;As you can imagine, you'd get much better performance when they happened to be on the same system vs. when they weren't.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;In WS2008 the underlying assumption has been removed.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can have any number of MSDTC cluster resources, they can be affinitized to other cluster resources (so that you can keep the transaction on the same system, regardless of failover patterns), you can retain the use of the local (per-node) MSDTC instances for those cases where the application is not cluster-aware, and you can split a cluster safely without requiring that all transactions be resolved.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Finally, there were two sets of changes that we made that should be considered largely internal.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;One was a set of changes to unify and extend the advanced diagnostic tracing features that PSS would typically use when resolving a customer problem.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The other was a set of changes related to the quality and feature expectations for any component going into Windows.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Although neither should directly impact any customers, I'll touch on those in part 4.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Jim.&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/50484.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>Building the transaction protocol documents</title><link>http://pluralsight.com/blogs/jimjohn/archive/2008/02/28/50334.aspx</link><pubDate>Thu, 28 Feb 2008 10:49:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2008/02/28/50334.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/50334.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2008/02/28/50334.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/50334.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/50334.aspx</trackback:ping><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;You've undoubtedly read about the &lt;A href="http://www.microsoft.com/presspass/presskits/interoperability/default.mspx"&gt;announcement&lt;/A&gt; last week to publish our protocol documents on msdn.&amp;nbsp; If you've gone and &lt;A href="http://msdn2.microsoft.com/en-us/library/cc203350.aspx"&gt;looked&lt;/A&gt;, there's an extensive set of documents posted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;You may also remember that I mentioned that I'd been involved in some projects that had taken up quite a bit of my time over the past 18 months.&amp;nbsp; One of those projects involved some of those documents -- the MSDTC protocols &lt;A href="http://msdn2.microsoft.com/en-us/library/cc224892.aspx"&gt;[MS-CMPO]&lt;/A&gt;, &lt;A href="http://msdn2.microsoft.com/en-us/library/cc224824.aspx"&gt;[MS-CMP]&lt;/A&gt;, &lt;A href="http://msdn2.microsoft.com/en-us/library/cc229116.aspx"&gt;[MS-DTCO]&lt;/A&gt;, and others.&amp;nbsp; If you take a look at these documents, you'll find that they describe a fairly complex set of messages, state machines, and inter-component interactions.&amp;nbsp; Constructing this documentation was a pretty interesting challenge, and one that I thought might interest you.&amp;nbsp; What follows are my personal observations about what we did to produce these transaction documents.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Much like the product code, the transaction feature team was responsible for the construction of these documents.&amp;nbsp; We were the experts on the code, and therefore made the best sense for understanding what the content of the documents needed to be.&amp;nbsp; There were ancillary groups that provided editing, review, and formatting support.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;One of the first big tasks we faced was how to describe 'the protocol'.&amp;nbsp; Like all transaction managers, we had a set of interlocking protocols and state machines that arbitrated operations between applications, resource manager, and other transaction managers.&amp;nbsp; Each arm typically has one or more 'protocols', but their operation is dependent on the aggregate state across them.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Or, to put it another way, if I only look at, say, a resource manager to transaction manager exchange in isolation I'll find nondeterministic behavior around whether or not a transaction enlist request will succeed.&amp;nbsp; What makes it nondeterministic is that the failure is a result of the aggregate state the transaction is in, which is effectively invisible to our particular exchange (for instance, the app may have already requested that the transaction commit, and the transaction manager may have already issued request to prepare messages to the other participants).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;This is a problem that the various standards have faced.&amp;nbsp; In my experience, none have dealt with it terribly well.&amp;nbsp; WS-AtomicTransactions takes a stab in the state tables at identifying the existence of this aggregate state, but is pretty terse on how it works.&amp;nbsp; XA is a bit more verbose, but it is also pretty hard to work out the aggregate state machine from its various tables.&amp;nbsp; Frankly, we had to find a way to do better.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Before I go on, please do note that this is not a criticism of these standards -- it's more a side effect of the inherent tradeoffs a standards org has to make in the face of multiple vendors with differing implementations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;The second big task was to then determine exactly how the protocols worked.&amp;nbsp; What we needed to ensure was that the documents reflected the actuality of how the protocol was implemented, across the range of Windows versions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;There's pretty obviously only one solution -- go to the code.&amp;nbsp; The dev team writes the support fixes for MSDTC, so it had current experience with the various code bases.&amp;nbsp; That helped, inasmuch as it made the archeology effort more efficient.&amp;nbsp; Of course, most of the changes were additions.&amp;nbsp; The protocols are pretty much upwardly compatible, after all.&amp;nbsp; But still, over the years there have been quite a few changes.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;At this point the team had an outline for the documents, and a large amount of data that it had accumulated.&amp;nbsp; The actual authoring and revising then began, and were run essentially like any other project.&amp;nbsp; There was a coordinator that assigned out tasks, monitored progress, and kept an eye on how the docs were shaping up.&amp;nbsp; As we learned details, he oversaw ensuring that this information was quickly shared with the rest of the team.&amp;nbsp; This allowed us to produce the documents on the aggressive time schedule that were required for delivery.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;One special aside is that when you look at the documents you'll note that section 4 contains examples of message exchanges.&amp;nbsp; What we did was to assign section 4 to one of our senior testers.&amp;nbsp; He took the draft documents, constructed specialized test programs that spoke the protocols, and captured the actual message contents in the samples.&amp;nbsp; This turned out to be an effective early QA test of the document, and found a couple of product bugs as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;This was an intense period of activity.&amp;nbsp; I'm happy with the technical content of the transaction documents.&amp;nbsp; I&amp;#8217;m also proud of how the team came together to produce them.&amp;nbsp; But you have to ask, who might want to use it?&amp;nbsp; I can't speak for anyone here, but I know folks that could have used it to construct transaction bridges to OpenVMS, and I could imagine one or more of the J2EE vendors doing so today.&amp;nbsp; Only time will tell.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Jim.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/50334.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>The end of an era</title><link>http://pluralsight.com/blogs/jimjohn/archive/2007/12/31/49582.aspx</link><pubDate>Mon, 31 Dec 2007 10:41:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2007/12/31/49582.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/49582.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2007/12/31/49582.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/49582.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/49582.aspx</trackback:ping><description>&amp;nbsp; 
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I &lt;A href="http://www.openvms.org/stories.php?story=07/12/12/8359748"&gt;read&lt;/A&gt; a couple of weeks ago that HP is closing ZKO (Spitbrook Road, Nashua).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I have a lot of fond memories of working in VMS development in ZKO1/1 (and later ZKO3/4) in the 80's and early 90's.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It's sad to see that it is going.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Of course I miss the people -- too many to try to count.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It was a great place to work, and I'm proud of the work that we did back then.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;VMS was an excellent product for its time, and portions of it compare favorably to anything being done today.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I miss the DEC traditions around April 1st, especially&amp;nbsp;those that Andy had invested in.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In ZKO, the decision to name conference rooms after people I'd heard of, and the quotes they picked -- some of which I use to this day (e.g. "anything not worth doing is not worth doing well").&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I also wonder what will happen to the nonpaged pool behind the cafeteria, or the 7-bit ASCII colored bars at the main entrance (that used to say "DigitalSoftwa Reengineering" due to an unfortunate line break).&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;And, yes, I enjoyed DEC, but despaired of Digital.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Finally, one small personal tidbit: I remember giving a lecture on 'what is this 2PC thing anyway' to some VMS devs around 1990.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The thing that makes it memorable was that it was in the [Nancy] Lynch conference room.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The quotes on the walls were at least as good as anything in my slides :).&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/49582.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>Where has Jim been?</title><link>http://pluralsight.com/blogs/jimjohn/archive/2007/12/31/49581.aspx</link><pubDate>Mon, 31 Dec 2007 10:39:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2007/12/31/49581.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/49581.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2007/12/31/49581.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/49581.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/49581.aspx</trackback:ping><description>&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I have clearly been away for a while.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This blog effectively shut down about 18 months ago.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For the last few months I've been trying to figure out if I should reopen it, and I set a date of Jan 1 to make that decision.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I've decided to attempt to return to writing entries in this blog.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;STRONG&gt;So what happened?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;At work, the simple answer is that I got extremely busy.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There was a 12-15 month period where I had a series of projects with very short term deadlines.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Almost none of them involved my normal day job (which also pretty much stopped for that same period).&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;At one level it was a pretty interesting period -- I got involved with teams and people that I normally wouldn't have, and was exposed to technologies and groups that I'd previously been fairly ignorant of.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I always enjoy the opportunities to be exposed to an learn new things.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, it did come with the cost that it was extremely time consuming and very exhausting.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;And I'm glad that it mostly seems to be over for now.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;About 10 months ago the biggest time sinks came to an end, and I returned to thinking about the transactions directions and what we could be doing next.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Because so much time had passed, we were now in a rush to get our planning in shape for the next round of releases.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I spent the next few months getting a set of a feature ideas birthed for that next round.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That was as intense a period as any that previous year.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The team is now off making them real, and I believe that they'll prove to be exciting when they ship.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Then, having gotten the work moving, I took stock of where I was.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I realized that I needed a change -- that while I loved the technology and the team, the excitement was ebbing.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I needed to push my envelope again and try something that would stretch me.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;So, about six months ago I changed teams and took a position with the team that does messaging infrastructure -- from the WCF channels through to our enterprise messaging work (which includes MSMQ).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is a very different role for me in many ways: it is more breadth based, while I've been mostly a depth-first architect.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It involves technologies that I've been aware of, but don't have the same level of involvement that I've had with transactions.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;And it is with different people, although, again, it is with folks that have been nearby in the past.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I can't say that life has gotten slower.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I'm still on a learning curve.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I do, however, think that I understand the slope more than I did when I started.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I &lt;SPAN style="FONT-STYLE: italic"&gt;think&lt;/SPAN&gt; I'll be able to find time for this blog now.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We'll have to see.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;STRONG&gt;What does this mean for this blog?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I intend to continue writing here about transactions.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is still a long standing passion of mine.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, you should expect to see a somewhat broader mix of postings.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Some may even be about messaging&amp;#8230;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;I'll try to make sure that I mix in articles with code (since those seem to get the highest readership ;)), but I've never posted purely coding articles, and won't start now.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Oh, and, time willing, I will return to the resource manager project series.&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/49581.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>Vista: An MSDTC proxy enhancement (MLTM)</title><link>http://pluralsight.com/blogs/jimjohn/archive/2006/09/01/36863.aspx</link><pubDate>Fri, 01 Sep 2006 10:47:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2006/09/01/36863.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/36863.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2006/09/01/36863.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/36863.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/36863.aspx</trackback:ping><description>&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;MSDTC has had a structure where there is a proxy (msdtcprx.dll) located in the user's process.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;This implemented the Oletx API, managed some local state, and a set of communication channels back to the MSDTC service (msdtc.exe).&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Much of the processing went on in the MSDTC service -- almost all of it, in fact.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;Given the transaction topologies that MSDTC would be involved in, this had been a reasonable design choice.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Transactional resources were located in server processes, so multiple processes, and quite often multiple systems, were involved.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;That meant that these transactions were going to migrate to the MSDTC service process anyway.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;The only thing that could be up for debate was whether or not the transaction went to the MSDTC service when it was created, or a millisecond or so later.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;That began to change with System.Transactions.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;The amount of logic in the user process went up, the capability went up, and new mechanisms (such as the promotable single phase enlistment) were introduced that kept the transaction local to the process, even if it involved a database.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Even if the transaction should promote to Oletx, System.Transactions would continue to do what it could to limit the amount of information that would flow back to the MSDTC service.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;For instance, volatile enlistments and transaction outcome notifications are multiplexed in the user process, and may not be represented back at the MSDTC service at all.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;With Vista, we also had some new topologies to consider, most especially ones that involved the transactional file system (TxF) or registry (TxR).&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;In those cases the transacted resource is not in another process.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;More importantly, there is no failure mode where TxF or TxR can fail catastrophically and the user process not be impacted.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;Consequently, we've added logic in the MSDTC proxy to be able to create transactions, multiplex voters and outcomes, and manage TxF or TxR resources without going to the MSDTC service.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Much like System.Transactions, the proxy will automatically promote to the MSDTC service if the topology requires it.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;This feature is internally called "MLTM".&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;FONT face=Arial size=2&gt;Consider the implications of this.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;If you look at the example code shown &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2006/08/31/36819.aspx"&gt;here&lt;/A&gt;, you'll note that System.Transactions acquires the DTC ITransaction interface in order to pick up the kernel transaction handle.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Prior to Vista, this would have promoted the transaction to the MSDTC service, but no longer.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;That example should never leave the user process, never add any additional log writes, and only involve the minimal transaction mechanisms in order to execute.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/36863.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>A Vista update: integration between System.Transactions and the transacted file system and registry</title><link>http://pluralsight.com/blogs/jimjohn/archive/2006/08/31/36819.aspx</link><pubDate>Thu, 31 Aug 2006 11:03:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2006/08/31/36819.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/36819.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2006/08/31/36819.aspx#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/36819.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/36819.aspx</trackback:ping><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;I have written earlier (&lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2005/09/13/14803.aspx"&gt;here&lt;/A&gt; and &lt;A href="http://pluralsight.com/blogs/jimjohn/archive/2005/04/27/7811.aspx"&gt;here&lt;/A&gt;) about how to integrate the transactional file and registry services in Vista with System.Transactions.  With the upcoming Vista RC update, there are a number of changes in the APIs for TxF and TxR that impact how to do this integration.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;First, TxF and TxR have changed from APIs that automatically  picked up the ambient kernel transaction and joined it, to one where the developer needs to explicitly show an intention to participate in the transaction.  This is accomplished through the addition of several new APIs, such as CreateFileTransacted.  These new APIs are explicitly transaction-aware.  All existing file and registry APIs return to being explicitly transaction-unaware.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;(For details on the new transaction-aware APIs, see &lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/win32_functions_changed_by_transactions.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/win32_functions_changed_by_transactions.asp&lt;/A&gt;&lt;/SPAN&gt;.)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;All of the new APIs take a kernel transaction handle as an explicit parameter.  This means that if I want to use these new routines from inside a System.Transactions TransactionScope I will need to do some work.  That is what I want to concentrate on here in the form of a partial example.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Let's start by setting up a couple of helper classes and declarations.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;First, we know that we'll be manipulating a kernel transaction handle, so we'll specialize a SafeHandle appropriately:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;using System.Collections.Generic;&lt;BR&gt;using System.Runtime.ConstrainedExecution;&lt;BR&gt;using System.Runtime.InteropServices;&lt;BR&gt;using System.Runtime.Versioning;&lt;BR&gt;using System.Security.Permissions;&lt;BR&gt;using System.Text;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;namespace TxFile&lt;BR&gt;{&lt;BR&gt;    [SecurityPermission(SecurityAction.LinkDemand,UnmanagedCode=true)]&lt;BR&gt;    public sealed class SafeTransactionHandle: SafeHandleZeroOrMinusOneIsInvalid&lt;BR&gt;    {&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;      private SafeTransactionHandle () : base (true) &lt;BR&gt;      {&lt;BR&gt;      }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;      public SafeTransactionHandle (IntPtr preexistingHandle, bool ownsHandle)&lt;BR&gt;       : base (ownsHandle)&lt;BR&gt;      {&lt;BR&gt;       SetHandle (preexistingHandle);&lt;BR&gt;      }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;      [DllImport("Kernel32.dll", SetLastError=true)]&lt;BR&gt;      [ResourceExposure(ResourceScope.Machine)]&lt;BR&gt;      [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]&lt;BR&gt;      private static extern bool CloseHandle (IntPtr handle);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;      [ResourceExposure(ResourceScope.Machine)]&lt;BR&gt;      [ResourceConsumption(ResourceScope.Machine)]&lt;BR&gt;      override protected bool ReleaseHandle ()&lt;BR&gt;      {&lt;BR&gt;          return CloseHandle (handle);&lt;BR&gt;      }&lt;BR&gt;    }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;We also need to declare the new CreateFileTransacted API.  This looks a lot like CreateFile, but with a couple of extra parameters.  The new declaration is:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;[DllImport("Kernel32.Dll",&lt;BR&gt;           &lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;CallingConvention=CallingConvention.StdCall, &lt;BR&gt;           CharSet = CharSet.Unicode)]&lt;BR&gt;internal static extern SafeFileHandle CreateFileTransacted(&lt;BR&gt;    String lpFileName,&lt;BR&gt;    int dwDesiredAccess,&lt;BR&gt;    int dwShareMode,&lt;BR&gt;    IntPtr lpSecurityAttributes,&lt;BR&gt;    int dwCreationDisposition,&lt;BR&gt;    int dwFlagsAndAttributes,&lt;BR&gt;    SafeFileHandle hTemplateFile,&lt;BR&gt;    SafeTransactionHandle txHandle,&lt;BR&gt;    IntPtr miniVersion,&lt;BR&gt;    IntPtr extendedOpenInformation&lt;BR&gt;   );&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Our final declaration is to define the new COM interface that DTC supports, IKernelTransaction.  This interface is available off MSDTC's ITransaction objects.  It's declaration looks like:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;[ComImport]&lt;BR&gt;[Guid("79427A2B-F895-40e0-BE79-B57DC82ED231")]&lt;BR&gt;[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]&lt;BR&gt;public interface IKernelTransaction &lt;BR&gt;{&lt;BR&gt;    void GetHandle( out SafeTransactionHandle ktmHandle );&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;With these helpers and declarations out of the way, we can look at what to do in the mainline code to use CreateFileTransacted in a TransactionScope.  We know that we need the transaction handle, that we can get that from IKernelTransaction, and we know that we can get that from a DTC ITransaction.  That turns into:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;SafeTransactionHandle txHandle;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;IKernelTransaction kernelTx =&lt;BR&gt;   (IKernelTransaction) TransactionInterop.GetDtcTransaction&lt;BR&gt;    (Transaction.Current);&lt;BR&gt;kernelTx.GetHandle (txHandle);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Putting it all together, we would get a TransactionScope pattern that looks like:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;using (TransactionScope s = new TransactionScope ())&lt;BR&gt;{&lt;BR&gt;  SafeTransactionHandle txHandle;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;  IKernelTransaction kernelTx =&lt;BR&gt;   (IKernelTransaction) TransactionInterop.GetDtcTransaction&lt;BR&gt;    (Transaction.Current);&lt;BR&gt;  kernelTx.GetHandle( txHandle );&lt;BR&gt;  ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;  // Do the Win32 file operation such as...&lt;BR&gt;  SafeFileHandle fileHandle = CreateFileTransacted(..., txHandle, null );&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;  s.Complete ();&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/36819.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Jim Johnson</dc:creator><title>An article on 'scopes'</title><link>http://pluralsight.com/blogs/jimjohn/archive/2006/08/25/36017.aspx</link><pubDate>Fri, 25 Aug 2006 10:34:00 GMT</pubDate><guid>http://pluralsight.com/blogs/jimjohn/archive/2006/08/25/36017.aspx</guid><wfw:comment>http://pluralsight.com/blogs/jimjohn/comments/36017.aspx</wfw:comment><comments>http://pluralsight.com/blogs/jimjohn/archive/2006/08/25/36017.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://pluralsight.com/blogs/jimjohn/comments/commentRss/36017.aspx</wfw:commentRss><trackback:ping>http://pluralsight.com/blogs/jimjohn/services/trackbacks/36017.aspx</trackback:ping><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;Stephen Toub has written an interesting &lt;A href="http://msdn.microsoft.com/msdnmag/issues/06/09/NETMatters/default.aspx"&gt;article&lt;/A&gt; on the construction of&amp;nbsp;generic 'scope-like'&amp;nbsp;classes over at .Net Matters.&amp;nbsp; It captures a lot of the ideas that were behind TransactionScope and generalizes them nicely.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Jim.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://pluralsight.com/blogs/jimjohn/aggbug/36017.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>