Distributed transaction support in wcf using WS-AT

Hi all,

Could anybody knows where I could find the example of distributed transaction in wcf using ws-at? So it enables 3rd party service (like IBM svc) to join the transactions.

Thank you in advance.

lingga

[232 byte] By [lingga] at [2008-2-8]
# 1

Hi lingga, any WCF client/service using a binding with TransactionFlow enabled AND the transaction protocol set to WSAtomicTransactionOctober2004 will flow WS-AT on the wire (making interop possible).The user programming model stays the same for WS-AT and our native protocol. As an example, see below for how to flow WS-AT using WSHttpBinding and NetTcpBinding.

Documentation for WCF: http://wcf.netfx3.com/ -> Download Documentation CTP

Transaction Sample: Download above documenation and open 'wcf_samples.chm'. Goto Tech Samples -> Binding -> WS -> WS Transaction Flow.

[Using WSHttpBinding]

Code:

WSHttpBinding binding = new WSHttpBinding();

binding.TransactionFlow = true;

Config:

<bindings>

<wsHttpBinding>

<binding name="wsHttpBindingWSAT"

transactionFlow="true" />

</wsHttpBinding >

</bindings>

[Using NetTcpBinding]

Code:

NetTcpBinding binding = new NetTcpBinding();

binding.TransactionFlow = true;

binding.TransactionProtocol = TransactionProtocol.WSAtomicTransactionOctober2004;

Config:

<bindings>

<netTcpBinding>

<binding name="netTcpBindingWSAT"

transactionFlow="true"

transactionProtocol="WSAtomicTransactionOctober2004" />

</netTcpBinding>

</bindings>

Jesse-MSFT at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...

Software Development for Windows Vista

Site Classified