In BizTalk Server 2006 R2, when the WCF-Custom adapter was used with any binding, the WCF-Adapter would try to determine, at runtime, whether a System.Transactions TransactionScope was required when sending a message over a channel. This involved the following:
NOTE that in the above three steps, step 2 is expensive for dynamic send ports, since for dynamic send ports, we would execute that step every time, and calling CreateBindingElements() multiple times can add up.
In BizTalk 2009, we went ahead and added two properties on the port - "EnableTransaction" and "IsolationLevel". If we find the EnableTransaction property set on the message, then we know whether to use a TransactionScope or not, and hence we don't need to execute those three steps above. However, if we don't find this message context property, then we fall back to the previous behavior.
Hence, for performance, when using dynamic send ports with the WCF-Custom adapter, when setting the context properties for BindingName and BindingType (amongst others), also set the EnableTransaction and IsolationLevel message context properties.