In WCF, transactions can be propagated across service boundary.
This enables service to participate in a client transaction and it includes multiple services in same transaction, Client itself will act as service or client.
We can specify whether or not client transaction is propagated to service by changing Binding and operational contract configuration
Reference books, you may like:Programming WCF Services: Design and Build Maintainable Service-Oriented Systems
WCF Multi-Layer Services Development with Entity Framework, 4th Edition
Learning WCF: A Hands-on Guide
Even after enabling transaction flow, the client can not use all operations in transaction flow.
We need to specify the TransactionFlowAttribute in operational contract to enable transaction flow.
public interface IService
int Add(int a, int b);
int Subtract(int a, int b);
TransactionFlow can be enabled only at the operation level not at the service level.
|NotAllowed||transactionFlow=”true”||Client cannot propagate its transaction to service even client has transaction|
|Allowed||transactionFlow=”true”||Service will allow to flow client transaction.|
|It is not necessary that service to use client transaction.|
|Allowed||transactionFlow=”false”||If service disallows at binding level, client also should disable at binding level else error will be occurred.|
|Mandatory||transactionFlow=”true”||Both Service and client must use transaction aware binding|
|Mandatory||transactionFlow=”false”||InvalidOperationException will be throw when serice binding disables at binding level.|
|FaultException will be thrown when client disable at its binding level.|
© 2015, admin. All rights reserved.